After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 543288 - infinite recursion on Gtk::FileChooser::get_preview_widget
infinite recursion on Gtk::FileChooser::get_preview_widget
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: general
2.13.x
Other All
: Normal critical
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2008-07-16 14:52 UTC by Jens Georg
Modified: 2008-07-16 15:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jens Georg 2008-07-16 14:52:27 UTC
Steps to reproduce:
call get_preview_widget on any filechooser derivative

Stack trace:
No stack trace, only application Lockup

Other information:
Problem seems to be c&p:

from filechooser.cc(419ff)
const Gtk::Widget* FileChooser::get_preview_widget() const
{
  return const_cast<FileChooser*>(this)->get_preview_widget();
}

Gtk::Widget* FileChooser::get_preview_widget()
{
  return const_cast<FileChooser*>(this)->get_preview_widget();
}

I think the non-const version should read

return Glib::wrap(gtk_file_chooser_get_preview_widget(cobj()));
Comment 1 Murray Cumming 2008-07-16 15:56:06 UTC
Very strange. Fixed (but not generally in gmmproc) in svn trunk and the gtkmm-2-12 branch:

2008-07-16  Murray Cumming  <murrayc@murrayc.com>

	* gtk/src/filechooser.hg: get_preview_widget(): Move the const 
	overload after the non-const one, because gmmproc otherwise seems to 
	make both just calls to the non-const one. We really need to stop 
	gmmproc from doing that, first figuring out why.
	Luckily, I don't think we put them in this order very often.
	Bug #543288 (Jens Georg)