GNOME Bugzilla – Bug 694025
Dia crashes immediately upon start (0.97 & 0.98) in (k|x)ubuntu 12.10
Last modified: 2013-08-16 12:09:18 UTC
When starting dia from the menu, it is visible for a second and disappears At the command line I get: --------------------- Steps to reproduce: Start dia (either menu or command line) What is seen (menu): The gui flashes for a second and then disappears What is seen (command line): The gui flashes for a second and then disappears, and the following errors are printed in the console: ~$ dia sys:1: Warning: attempting to add an interface (DiaInteractiveRendererInterface) to class (DiaGdkRenderer) after class_init ** (dia-normal:19560): CRITICAL **: dia_renderer_set_size: assertion `irenderer != NULL' failed ** (dia-normal:19560): CRITICAL **: dia_renderer_set_size: assertion `irenderer != NULL' failed Segmentation fault (core dumped) Expected behavior: dia gui starts normal ---------------------- I have xubuntu 12.10, with bumblebee, I have since installed kde-full, which may (or may not) be the reason for this, but it worked before I installed kde-full and it does not work now. Last date Dia 0.98 worked with certainty was 2013-02-03. I was hit by the bug 2013-02-15 -------------------- possibly related/the same bug. https://bugs.launchpad.net/ubuntu/+source/dia/+bug/1102960 It is said there that dia works at command line and that it is only the gui that fails.
Thanks for taking the time to report this bug. Without a stack trace from the crash it's very hard to determine what caused it. Can you get us a stack trace? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks in advance!
Created attachment 236506 [details] Ubuntu apport crash report from /var/crash Attached: Ubuntu apport crash report of a crash. Plain text, containing among other things a base64 encoded core dump. The file is too big, so I send it as a split rar-compressed file: _usr_bin_dia-normal.1000.crash.part1.rar _usr_bin_dia-normal.1000.crash.part2.rar _usr_bin_dia-normal.1000.crash.part3.rar _usr_bin_dia-normal.1000.crash.part4.rar To unpack to '_usr_bin_dia-normal.1000.crash' copy files to an empty folder and run this command: unrar e *1.rar or just right-click and "extract"
Created attachment 236507 [details] second part of the split archive
Created attachment 236508 [details] third part of split archive
Created attachment 236509 [details] fourth and last part of split archive
Please extract the stacktrace from the archive and paste it here. Thanks in advance!
More interesting than the call stack would be the output of dia --version --verbose Apparently you are using a GLib version including the "improvement" described here (Google: attempting to add an interface): http://blogs.gnome.org/desrt/2012/11/05/a-warning-about-glib/ Unfortunately that's incompatible with the current implementation in Dia. As a result the interface is not added and Dia is crashing on it's first use. You can work around it by not using the DiaGdkRenderer for display rendering. WIth a useable user interface edit the configuration file $(HOME)/.dia/persistence to include: <dia:boolean role="view_antialised"> <dia:attribute name="booleanvalue"> <dia:boolean val="true"/> </dia:attribute> </dia:boolean> i.e. make the antialiased rendering default. And please don't use the View/AntiAliased menu item to toggle the renderer later, because that would trigger the crash again.
The extracted stacktrace: --------------------- Stacktrace: #0 0x000000000043051c in ?? () No symbol table info available. #1 0x00007fec141a45c5 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #2 0x00007fec141a4908 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #3 0x00007fec141a4d72 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #4 0x00007fec1568bc77 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 No symbol table info available. #5 0x000000000041bae5 in main () No symbol table info available. StacktraceAddressSignature: /usr/bin/dia-normal:11:x86_64:/usr/bin/dia-normal+3051c:/lib/x86_64-linux-gnu/libglib-2.0.so.0.3504.0+485c5:/lib/x86_64-linux-gnu/libglib-2.0.so.0.3504.0+48908:/lib/x86_64-linux-gnu/libglib-2.0.so.0.3504.0+48d72:/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.13+133c77:/usr/bin/dia-normal+1bae5 StacktraceTop: ?? () g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 Tags: third-party-packages quantal ThreadStacktrace: . Thread 4 (Thread 0x7fec0c867700 (LWP 428)): #0 0x00007fec133ea303 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87 resultvar = <optimized out> oldtype = 0 result = <optimized out> #1 0x00007fec141a489c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #2 0x00007fec141a4d72 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #3 0x00007fec122c5c26 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 No symbol table info available. #4 0x00007fec141c85e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #5 0x00007fec136c8e9a in start_thread (arg=0x7fec0c867700) at pthread_create.c:308 __res = <optimized out> pd = 0x7fec0c867700 now = <optimized out> unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -8001134227550177627, 140734631946736, 140651799148992, 0, 3, 8011441680480138917, 8011450836186494629}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}} not_first_call = 0 pagesize_m1 = <optimized out> sp = <optimized out> freesize = <optimized out> __PRETTY_FUNCTION__ = "start_thread" #6 0x00007fec133f5cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 No locals. #7 0x0000000000000000 in ?? () No symbol table info available. . Thread 3 (Thread 0x7febfca94700 (LWP 429)): #0 pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:215 No locals. #1 0x00007fec141e40e5 in g_cond_wait_until () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #2 0x00007fec1417a8d1 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #3 0x00007fec141c8d2a in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #4 0x00007fec141c85e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #5 0x00007fec136c8e9a in start_thread (arg=0x7febfca94700) at pthread_create.c:308 __res = <optimized out> pd = 0x7febfca94700 now = <optimized out> unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -8001134227550177627, 140734631950272, 140651532995008, 0, 3, 8007887898374764197, 8011450836186494629}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}} not_first_call = 0 pagesize_m1 = <optimized out> sp = <optimized out> freesize = <optimized out> __PRETTY_FUNCTION__ = "start_thread" #6 0x00007fec133f5cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 No locals. #7 0x0000000000000000 in ?? () No symbol table info available. . Thread 2 (Thread 0x7fec0d6e1700 (LWP 426)): #0 0x00007fec133ea303 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87 resultvar = <optimized out> oldtype = 0 result = <optimized out> #1 0x00007fec141a489c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #2 0x00007fec141a49c4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #3 0x00007fec141a4a21 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #4 0x00007fec141c85e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #5 0x00007fec136c8e9a in start_thread (arg=0x7fec0d6e1700) at pthread_create.c:308 __res = <optimized out> pd = 0x7fec0d6e1700 now = <optimized out> unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -8001134227550177627, 140734631947984, 140651814328768, 0, 3, 8011437629252236965, 8011450836186494629}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}} not_first_call = 0 pagesize_m1 = <optimized out> sp = <optimized out> freesize = <optimized out> __PRETTY_FUNCTION__ = "start_thread" #6 0x00007fec133f5cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 No locals. #7 0x0000000000000000 in ?? () No symbol table info available. . Thread 1 (Thread 0x7fec15ffa940 (LWP 424)): #0 0x000000000043051c in ?? () No symbol table info available. #1 0x00007fec141a45c5 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #2 0x00007fec141a4908 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #3 0x00007fec141a4d72 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #4 0x00007fec1568bc77 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 No symbol table info available. #5 0x000000000041bae5 in main () No symbol table info available. ---------------------
(In reply to comment #7) > More interesting than the call stack would be the output of > dia --version --verbose > Apparently you are using a GLib version including the "improvement" > described here (Google: attempting to add an interface): > http://blogs.gnome.org/desrt/2012/11/05/a-warning-about-glib/ > > Unfortunately that's incompatible with the current implementation in Dia. > As a result the interface is not added and Dia is crashing on it's first use. > > You can work around it by not using the DiaGdkRenderer for display rendering. > WIth a useable user interface edit the configuration file > $(HOME)/.dia/persistence to include: > > <dia:boolean role="view_antialised"> > <dia:attribute name="booleanvalue"> > <dia:boolean val="true"/> > </dia:attribute> > </dia:boolean> > > i.e. make the antialiased rendering default. And please don't use the > View/AntiAliased menu item to toggle the renderer later, because that would > trigger the crash again. This worked indeed! Thanks so much.
Looking into this a bit... Is there a reason why the implementation for an interface defined in lib/ on an object also defined in lib/ is living in app/? If the implementation were moved into lib/ and setup by DiaGdkRenderer itself then there would be no problems...
For the record, I just (locally) fixed bug 694108 to make pygobject work with glib 2.35.x. But I still get this (or a slightly different) crash with dia. Ryan's on that.
Created attachment 236765 [details] [review] DiaGdkRenderer: implement interface from class The implementation of DiaInteractiveRenderer for DiaGdkRenderer was located in a separate file and only added to the class after an instance had already been created. This no longer works as of the GLib changes described in https://bugzilla.gnome.org/show_bug.cgi?id=687659 Move the implementation into the class, solving the issue. Also: remove a couple of declarations from render_gdk.h for function that no longer exist.
(In reply to comment #10) > Is there a reason why the implementation for an interface defined in lib/ on an > object also defined in lib/ is living in app/? > There is a logical split between the interactive bits and the pure rendering. There are a lot of renderers implemented with Dia but only few are interactive. The logical split it supported by an optional interface. From my point of view the issue here is not that this can not be fixed (or worked around) but unfortunately there is no mechanism to change the past. Dia was working fully within the contract when released and now the incompatible change from GLib (bug 687659) make it crash on start-up.
It's true that the change in GLib is incompatible with Dia, but one could argue that adding interfaces after object instantiation with an undocumented implementation detail. I admit that it's a stretch, and we didn't document that it's _not_ allowed either, but every single example of nominal GObject usage that has ever been written has interfaces being registered from the _get_type() function. GLib has never had a policy of "bugs compatible" behaviour or supporting unsupported use of our APIs. We even broke Gtk itself a couple of cycles ago (in the segfault-on-startup sense) due to unsupported use of our APIs. So much for the "official" line; I admit that this argument is kinda weak in this particular case. From a practical standpoint, making this change in GLib will allow us to remove quite some complicated code in gtype.c, reducing our use of locks (and allowing us to fix a rather difficult deadlock as well) and also improve performance of object instantiation. It has broken only a few things that most people have been happy to apply patches to fix.
Review of attachment 236765 [details] [review]: I've just pushed a different approach maintaining the logical split as outlined in comment 13. This is not tested against the incompatible version of GLib but is following the new rules.
Pushed as https://git.gnome.org/browse/dia/commit/?id=213bdfe956bf8fe57c86316f68a09408fef1647e No change on the dia-0-97 branch yet.
This now affects Debian unstable as well.
Pushed to branch dia-0-97 as: https://git.gnome.org/browse/dia/commit/?h=dia-0-97&id=7ac3e9ffac09f99a1aa2fe97a4dc0a688c9746b0