Re: [gtkmm] FileChooserDialog dies in c'tor



As always when debugging, try to create a simpler test case. And if
necessary, then translate that test case to C code. This line looks
important, so you might look at that source code:

#6  0x404d40b7 in gtk_settings_get_for_screen (screen=0x0) at
gtksettings.c:466

valgrind is also very useful - it might show more important memory errors
that cause these symptoms.

> This is probably a long shot - but I'm at the end of
> my wits on this one.
>
> An application crashes in FileChooserDialog c'tor
> allocated on a stack like so:
>
> void foo ()
> {
> crash>  Gtk::FileChooserDialog f ("Select Deck File",
>   		  Gtk::FILE_CHOOSER_ACTION_OPEN);
>     ...
> }
>
> It happens with one particular installation of gtkmm2 2.4.4.
> Everywhere else I tried (2 other machines) the code works
> as expected.
>
> The trace follows. Perhaps someone might have an idea or
> a suggestion of any kind, or could recognize the problem.
>
> thanks in advance,
> -Vlad
>
> ---start---
>
> (gdb) run
> Starting program: /home/steve/src/Granule/granule-1.1.0/src/granule
> .cshrc: No such file or directory.
> [New Thread 1024 (LWP 8918)]
>
> Gtk-CRITICAL **: file gtksettings.c: line 447
> (gtk_settings_get_for_screen): assertion `GDK_IS_SCREEN (screen)' failed
> aborting...
>
> Program received signal SIGABRT, Aborted.
> [Switching to Thread 1024 (LWP 8918)]
> 0x40a6edf1 in kill () from /lib/libc.so.6
> (gdb) where
> #0  0x40a6edf1 in kill () from /lib/libc.so.6
> #1  0x40a0e06d in pthread_kill () from /lib/libpthread.so.0
> #2  0x40a0e5eb in raise () from /lib/libpthread.so.0
> #3  0x40a704d9 in abort () from /lib/libc.so.6
> #4  0x4089791d in g_logv (log_domain=0x405967d3 "Gtk",
> log_level=1084305440,
>      format=0x40596a00 "file %s: line %d (%s): assertion `%s' failed",
> args1=0xbfffda0c "¸;` ¿\001") at gmessages.c:522
> #5  0x40897946 in g_log (log_domain=0x405967d3 "Gtk",
> log_level=G_LOG_LEVEL_CRITICAL,
>      format=0x40596a00 "file %s: line %d (%s): assertion `%s' failed")
> at gmessages.c:541
> #6  0x404d40b7 in gtk_settings_get_for_screen (screen=0x0) at
> gtksettings.c:466
> #7  0x4044bcec in remove_settings_signal (impl=0x8230b08, screen=0x0) at
> gtkfilechooserdefault.c:3561
> #8  0x4044bfe5 in gtk_file_chooser_default_screen_changed
> (widget=0x8230b08, previous_screen=0x0)
>      at gtkfilechooserdefault.c:3680
> #9  0x4084b89c in g_cclosure_marshal_VOID__OBJECT (closure=0x814f478,
> return_value=0x0, n_param_values=2,
>      param_values=0x8230b08, invocation_hint=0xbfffdbc8,
> marshal_data=0x4044bfb0) at gmarshal.c:636
> #10 0x408381f5 in g_type_class_meta_marshal (closure=0x814f478,
> return_value=0x0, n_param_values=2,
> param_values=0xbfffdcd0,
>      invocation_hint=0xbfffdbc8, marshal_data=0x0) at gclosure.c:514
> #11 0x40837f33 in g_closure_invoke (closure=0x814f478, return_value=0x0,
> n_param_values=2, param_values=0xbfffdcd0,
>      invocation_hint=0xbfffdbc8) at gclosure.c:437
> #12 0x4084a295 in signal_emit_unlocked_R (node=0x814f4b8, detail=0,
> instance=0x8230b08, emission_return=0x0,
>      instance_and_params=0xbfffdcd0) at gsignal.c:2474
> #13 0x40849878 in g_signal_emit_valist (instance=0x8230b08,
> signal_id=136503408, detail=0, var_args=0xbfffde60
> "\b\v#\b\021")
>      at gsignal.c:2195
> #14 0x40849b56 in g_signal_emit (instance=0x8230b08, signal_id=66,
> detail=0) at gsignal.c:2239
> #15 0x4057f4ee in do_screen_change (widget=0x8230b08, old_screen=0x42,
> new_screen=0x8129d48) at gtkwidget.c:4765
> #16 0x4057f594 in gtk_widget_propagate_hierarchy_changed_recurse
> (widget=0x8230b08, client_data=0xbfffdf50) at
> gtkwidget.c:4789
> #17 0x403e7a0c in gtk_box_forall (container=0x822e010,
> include_internals=1,
>      callback=0x4057f500
> <gtk_widget_propagate_hierarchy_changed_recurse>,
> callback_data=0xbfffdf50) at gtkbox.c:701
> #18 0x4041cafa in gtk_container_forall (container=0x822e010,
>      callback=0x4057f500
> <gtk_widget_propagate_hierarchy_changed_recurse>,
> callback_data=0xbfffdf50) at gtkcontainer.c:1264
> #19 0x4057f5e2 in gtk_widget_propagate_hierarchy_changed_recurse
> (widget=0x822e010, client_data=0xbfffdf50) at
> gtkwidget.c:4792
> #20 0x4057f69b in _gtk_widget_propagate_hierarchy_changed
> (widget=0x822e010, previous_toplevel=0x0) at gtkwidget.c:4829
> #21 0x4057e670 in gtk_widget_set_parent (widget=0x822e010, parent=0x2)
> at gtkwidget.c:4290
> #22 0x403e6e05 in gtk_box_pack_start (box=0x822b550, child=0x822e010,
> expand=1, fill=1, padding=135437640) at gtkbox.c:388
> #23 0x40445425 in gtk_file_chooser_dialog_constructor (type=135536488,
> n_construct_properties=2, construct_params=0x822b178)
>      at gtkfilechooserdialog.c:392
> #24 0x4083abf2 in g_object_newv (object_type=135536488, n_parameters=2,
> parameters=0x822b080) at gobject.c:941
> #25 0x40681e11 in Object (this=0xbfffe3e0, __vtt_parm=0x6,
> construct_params= 0x8141f68) at object.cc:233
> #26 0x401fe93c in Object (this=0xbfffe3e0, __vtt_parm=0x40292b18,
> construct_params= 0xbfffe240) at object.cc:35
> #27 0x40258249 in Widget (this=0xbfffe3e0, __vtt_parm=0x40292b14,
> construct_params= 0xbfffe240) at widget.cc:5034
> #28 0x401cf699 in Container (this=0xbfffe3e0, __vtt_parm=0x40292b10,
> construct_params= 0xbfffe240) at container.cc:658
> #29 0x401b7039 in Bin (this=0xbfffe3e0, __vtt_parm=0x40292b0c,
> construct_params= 0xbfffe240) at bin.cc:195
> #30 0x4025f919 in Window (this=0xbfffe3e0, __vtt_parm=0x40292b08,
> construct_params= 0xbfffe240) at window.cc:432
> #31 0x401d2839 in Dialog (this=0xbfffe3e0, __vtt_parm=0x40292b04,
> construct_params= 0xbfffe240) at dialog.cc:191
> #32 0x401dd413 in FileChooserDialog (this=0xbfffe3e0, title= 0xbfffe3d0,
> action=FILE_CHOOSER_ACTION_OPEN)
>
>
> ---the end---
>
>
> --
> _____________________________________________________________
> Vladislav Grinchenko       http://home.comcast.net/~3rdshift/
>                                  e-mail: 3rdshift comcast net
>
>       Focus on quality, and productivity will follow.
> _____________________________________________________________
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>


Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]