GNOME Bugzilla – Bug 332177
Batch mode crash
Last modified: 2006-07-15 17:23:16 UTC
When trying to export a diagram from the command line, dia for Windows crashes. A Windows error dialog pops up: dia.exe - Application Error The instruction at "0x00a01551" referenced memory at "0x00000008". The memory could not be "read". Below is a log of my console session. I also tried the similar syntax suggested by Hans. F:\Data\Thesis\Figures\Dia\tmp>e:dia foo.dia --filter=mp --export=foo.mp (dia:1452): Gdk-CRITICAL **: gdk_pango_context_get_for_screen: assertion `GDK_IS_SCREEN (screen)' fa iled (dia:1452): Pango-CRITICAL **: pango_context_set_language: assertion `context != NULL' failed (dia:1452): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed (dia:1452): Pango-CRITICAL **: pango_context_load_font: assertion `context != NULL' failed (dia:1452): Gdk-CRITICAL **: gdk_pango_context_get_for_screen: assertion `GDK_IS_SCREEN (screen)' fa iled (dia:1452): Pango-CRITICAL **: pango_context_set_language: assertion `context != NULL' failed (dia:1452): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed (dia:1452): Pango-CRITICAL **: pango_layout_new: assertion `context != NULL' failed (dia:1452): Pango-CRITICAL **: pango_layout_set_text: assertion `layout != NULL' failed (dia:1452): Pango-CRITICAL **: pango_layout_set_attributes: assertion `layout != NULL' failed (dia:1452): Pango-CRITICAL **: pango_layout_set_indent: assertion `layout != NULL' failed (dia:1452): Pango-CRITICAL **: pango_layout_set_justify: assertion `layout != NULL' failed (dia:1452): Pango-CRITICAL **: pango_layout_set_alignment: assertion `layout != NULL' failed (dia:1452): Pango-CRITICAL **: pango_layout_get_iter: assertion `PANGO_IS_LAYOUT (layout)' failed F:\Data\Thesis\Figures\Dia\tmp>
F:\Data\Thesis\Figures\Dia\tmp>e:dia --version --verbose Dia version 0.95-pre1, compiled 21:34:13 Feb 13 2006 Compiler: MSC 1200 with : threads cairo libart Library versions libpng : 1.2.8 (1.2.8) libxml : 2.6.19 (2.6.11) glib : 2.8.5 (2.6.5) pango : version not available gtk+ : 2.8.9 (2.6.8) F:\Data\Thesis\Figures\Dia\tmp>
*** Bug 332476 has been marked as a duplicate of this bug. ***
This was not a matter of gtk version but instead my usage of pydia and thus pygtk was hiding the missing call to gtk_init() in Dia - cause pygtk was calling it for me. 2006-02-25 Hans Breuer <hans@breuer.org> * app/app_procs.c(app_init) : if GDK_WINDOWING_WIN32 call gtk_init() in any case. In contrast to X11/*nix displays are not optional on windoze. And we need some help of gtk to render text to bitmaps. ( Rob McDonald, bug #332177 )
Ooops, forgot to close as fixed.
I did not understand the change made to app/app_procs.c. Looking at ... http://cvs.gnome.org/viewcvs/dia/app/app_procs.c?r1=1.172&r2=1.173 ... I see the following lines included: #ifdef GDK_WINDOWING_WIN32 /* * On windoze there is no command line without display so this call is harmless. * But it is needed to avoid failing in gdk functions just because there is a * display check. Still a little hack ... */ //gtk_init(&argc, &argv); #endif Shouldn't "//" in begining of gtk_init line be removed? The code as it is now has no effect according to my little C knowledge.
Yes, thanks for noticing. 2006-02-26 Hans Breuer <hans@breuer.org> * app/app_procs.c : removed // from gtk_init() [shouldn't have commited my test code]. Really closes #332177, thanks Mateus César Gröess.
moving away form 0.95-pre1 to delete that label afterwards. Sorry for the noise.