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 332177 - Batch mode crash
Batch mode crash
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: exports
0.95-preX
Other Windows
: Normal normal
: 0.95
Assigned To: Dia maintainers
Dia maintainers
: 332476 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-02-22 13:26 UTC by Rob McDonald
Modified: 2006-07-15 17:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Rob McDonald 2006-02-22 13:26:22 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>
Comment 1 Rob McDonald 2006-02-22 13:27:05 UTC
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>
Comment 2 Hans Breuer 2006-02-24 18:51:46 UTC
*** Bug 332476 has been marked as a duplicate of this bug. ***
Comment 3 Hans Breuer 2006-02-24 23:39:44 UTC
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 )
	
Comment 4 Hans Breuer 2006-02-24 23:40:26 UTC
Ooops, forgot to close as fixed.
Comment 5 Mateus César Gröess 2006-02-26 14:05:39 UTC
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.

Comment 6 Hans Breuer 2006-02-26 14:22:55 UTC
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.
Comment 7 Hans Breuer 2006-07-15 17:23:16 UTC
moving away form 0.95-pre1 to delete that label afterwards. Sorry for the noise.