GNOME Bugzilla – Bug 728921
dia-0.97.3_pre20140417 crashes while export png
Last modified: 2019-03-20 12:01:09 UTC
Created attachment 275093 [details] strace attached while export to png dia crashed while export to Pixbuf[png], export to cairo PNG generated a zero size file, same behavior with jpeg format. Didn't test all formats. Related report on gentoo.org is: https://bugs.gentoo.org/show_bug.cgi?id=508566 Here's trace in gdb: 09:25:12 /tmp $ gdb /usr/bin/dia GNU gdb (Gentoo 7.7 p1) 7.7 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://bugs.gentoo.org/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/bin/dia...(no debugging symbols found)...done. (gdb) set args /learn-sys/doc/squid/方案2.dia (gdb) run Starting program: /usr/bin/dia /learn-sys/doc/squid/方案2.dia warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Gtk-Message: Failed to load module "gnomesegvhandler" [New Thread 0x7fffe8107700 (LWP 9739)] [New Thread 0x7fffde654700 (LWP 9740)] [New Thread 0x7fffdd86c700 (LWP 9741)] [New Thread 0x7fffdd06b700 (LWP 9742)] [New Thread 0x7fffcffff700 (LWP 9743)] [Thread 0x7fffdd86c700 (LWP 9741) exited] [Thread 0x7fffdd06b700 (LWP 9742) exited] [New Thread 0x7fffdd06b700 (LWP 9744)] The program 'dia' received an X Window System error. This probably reflects a bug in the program. The error was 'BadValue (integer parameter out of range for operation)'. (Details: serial 9852 error_code 2 request_code 53 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) [Thread 0x7fffcffff700 (LWP 9743) exited] [Thread 0x7fffde654700 (LWP 9740) exited] [Thread 0x7fffe8107700 (LWP 9739) exited] [Thread 0x7ffff7fa48c0 (LWP 9734) exited] [Inferior 1 (process 9734) exited with code 01] (gdb) Attachment was from strace, just a export time trace, not full trace.
Dia passes a value to X which that does not like. It may be you diagram being too big for X or something. From the error message "'BadValue (integer parameter out of range for operation)'. (Details: serial 9852 error_code 2 [...]" given I can not tell more, but the crash definitely depends on the diagram. Could you provided the diagram /learn-sys/doc/squid/方案2.dia, so that I can try to reproduce? Also please follow the note given in the debug output and start dis with the additional --sync command line switch.
Created attachment 275292 [details] The file caused crashing. The file attached :)
The file does not give me a BadValue on three X11 installations I've checked (Linux Mint 16 32 bit; XQuartz 2.7.5 and Gentoo x64). But there is something wrong - only on Gentoo - I get prints on the console: dia-0-97 $ app/run_dia.sh --integrated Runs length error: 2 != 6 Glyph length error: 5 != 1 Runs length error: 2 != 6 Glyph length error: 5 != 1 Runs length error: 2 != 6 Glyph length error: 5 != 1 Runs length error: 2 != 6 Glyph length error: 5 != 1 Runs length error: 4 != 5 Glyph length error: 3 != 1 Glyph length error: 3 != 2 Glyph length error: 2 != 3 Runs length error: 2 != 6 Glyph length error: 6 != 1 Runs length error: 1 != 3 Glyph length error: 9 != 1 Also only on Gentoo there is a huge difference in text representation between the GDK/X11 and the Antialiased (cairo) display of the file. I've checked lib/diagdkrenderer.c but did not find anything wrong specific to this issue. Next thing to check would probably be the pango-ft2 backend and it's dependencies ...
The same behaviour when I add "Cisco - Misc"->"CiscoWorks Man" on an empty diagram and tying to export as "Pixbuf[png] (*.png)". (dia:19512): GdkPixbuf-CRITICAL **: gdk_pixbuf_new: assertion 'width > 0' failed Program received signal SIGTRAP, Trace/breakpoint trap. 0x00007ffff55ac023 in g_logv () from /usr/lib64/libglib-2.0.so.0 (gdb) bt
+ Trace 233726
git-master version works for me under Gentoo x64 and exports to "Pixbuf[png] (*.png)"/"Cairo PNG (*.png)" successfully! So we wait for 0.97.3 release!
If it's still broken in 0.97 branch, 0.97.3 will also be affected :(
(In reply to comment #6) > If it's still broken in 0.97 branch, 0.97.3 will also be affected :( Thanks for Your remark Pacho! It helped me to found "good" commit by using git bisect (and replacing "git good"<->"git bad" commands): https://git.gnome.org/browse/dia/commit/?h=dia-0-97&id=8b8ae09fcc16cc0522679099728f779e291d959c It seems that current bug can be marked as fixed. :) While 0.97.3 is not ready I've prepared a temporary ebuild: https://git.backbone.ws/portage/overlay/source/master:app-office/dia.
Do I understand correctly that the bug indeed is fixed by my commit from 2014-04-18 which almost certainly is not part of dia-0.97.3_pre20140417 ? For me both reported issue here look slightly unrelated, one talking about potential font/text problem (only somewhat reproduceable on gentoo for me). And the other potentially a bounding box (or diagram extent) calculation problem. Are both really gone just after applying the fix for bug 728405?
(In reply to comment #8) > Do I understand correctly that the bug indeed is fixed by my commit from > 2014-04-18 which almost certainly is not part of dia-0.97.3_pre20140417 ? Reported by Drunkard Zhang Bounding problem is fixed by Your commit when it applied to dia-0.97.3_pre20140417 without any other new commits! Dia is no longer crashing. > For me both reported issue here look slightly unrelated, one talking about > potential font/text problem (only somewhat reproduceable on gentoo for me). > And the other potentially a bounding box (or diagram extent) calculation > problem. > Are both really gone just after applying the fix for bug 728405? I couldn't reproduce font/text problem. I've checkout 01d2be5 which should be commited when Your wrote post at 2014-05-11 14:16:12 UTC. But neither it o any following commits show any font/text difference or print errors like "Runs length error: 2 != 6". (pictures: http://backbone.ws/trash/dia_screenshots/01d2be5). May I should build with specific options to see the messages (I've used ./autogen.sh --prefix=/usr && make && app/run_dia.sh)?
Package versions on my system that not reproduce font/text bug: dev-libs/glib-2.40.0-r1 media-libs/freetype-2.5.3-r1 media-libs/libart_lgpl-2.3.21-r1 media-libs/libpng-1.2.51 media-libs/libpng-1.6.10 x11-libs/gtk+-2.24.23 x11-libs/gtk+-3.10.8 x11-libs/pango-1.36.3-r2 x11-libs/cairo-1.12.16-r3 dev-libs/atk-2.10.0 media-libs/fontconfig-2.10.92 x11-libs/libXfixes-5.0.1 x11-libs/libXrender-0.9.8 x11-libs/libXi-1.7.2 x11-libs/libXcursor-1.1.14 x11-libs/libXdamage-1.1.4-r1 x11-libs/pixman-0.32.4 x11-libs/libXext-1.3.2 x11-libs/libXcomposite-0.4.4-r1 x11-libs/libXrandr-1.4.2 media-libs/mesa-10.2.1 x11-libs/libxcb-1.10 media-libs/harfbuzz-0.9.28 x11-libs/libX11-1.6.2 x11-libs/libdrm-2.4.54 media-gfx/graphite2-1.2.4-r1
(In reply to comment #9) > May I should build with specific options to see the messages (I've used > ./autogen.sh --prefix=/usr && make && app/run_dia.sh)? Should not be necessary. The questionable messages are coming from Dia's source code text_line_adjust_layout_line() as printf. There might be a bug with Dia's use of pango_layout_get_line_readonly(). So the next step I would try is using agin pango_layout_get_line() instead because text_line_adjust_layout_line() is modifying the contents of the line.
(In reply to comment #11) > So the next step I would try is using agin pango_layout_get_line() instead > because text_line_adjust_layout_line() is modifying the contents of the line. Does not help or hurt apparently. Also building --without-freetype does not fix the issue, though the text representation with the GDK renderer changes. Still I think the issue should be related to the pango-ft backend, which is still used by GDK even when disable in Dia. But just updating dependencies did not help, either. Dia version 0.97.2, compiled 15:43:27 Jul 6 2014 Compiler: GCC 4.6.3 with : threads cairo libart Library versions (at compile time) libpng : 1.5.13 (1.5.13) freetype: 2.4.11 libxml : 2.9.0 (2.9.0) glib : 2.32.4 (2.32.4) pango : 1.30.1 (1.30.1) cairo : 1.10.2 (1.10.2) gtk+ : 2.24.16 (2.24.16) Dia version 0.97.2, compiled 15:43:27 Jul 6 2014 Compiler: GCC 4.6.3 with : threads cairo libart Library versions (at compile time) libpng : 1.5.13 (1.5.13) freetype: 2.4.11 libxml : 2.9.0 (2.9.0) glib : 2.38.2 (2.32.4) pango : 1.36.3 (1.30.1) cairo : 1.12.16 (1.10.2) gtk+ : 2.24.23 (2.24.16)
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/dia/issues/339.