GNOME Bugzilla – Bug 155430
Crash in startup after modifying a shape to add a textbox
Last modified: 2006-01-06 10:36:59 UTC
I modified the pc_minitower.shape file to add a textbox (after the aspect ratio line). After saving the shape file, launching dia results in a crash. Here's the line that I added: <textbox x1="0" y1="2.3" x2="5" y2="5.3" align="center" resize="no"/> The dos prompt window says: ** (dia.exe:5120): WARNING **: No attribute text (00000000) or no data(00000000) in this attribute (dia.exe:5120): GLib-GObject-CRITICAL **: file gobject.c: line 1561 (g_object_ref): assertion `G_IS_OBJECT (object)' failed I tried modifying the x and y coordinates of the textbox several different ways, but each time, I get the same results.
*** Bug 157756 has been marked as a duplicate of this bug. ***
I'm getting the same error, having created a custom shape with a textbox. It works when I comment out the textbox. This is dia 0.94. I get the problem on Redhat (Red Hat Enterprise Linux WS release 3 (Taroon Update 3)), but not on Mac OS X 10.3 (compiled with a lot of Fink packages). Here is a backtrace. Is there more information I can provide to get this fixed? (gdb) run Starting program: /usr/ed-pkg/wild.phc/b/binh/dia [Thread debugging using libthread_db enabled] [New Thread -1218579040 (LWP 20491)] ** (dia:20491): WARNING **: No attribute text ((nil)) or no data((nil)) in this attribute (dia:20491): GLib-GObject-CRITICAL **: file gobject.c: line 1319 (g_object_ref): assertion `G_IS_OBJECT (object)' failed Program received signal SIGSEGV, Segmentation fault.
+ Trace 51979
Thread NaN (LWP 20491)
I debugged this a bit more. Forget about Redhat vs Mac OS X; it's simpler than that. When you use a certain shape, it ends up in ~/.dia/defaults.dia. If you add a textbox to it when it's cached there, you get this error, since Dia can't find the default property value in defaults.dia. That is the source of the first warning. (lib/proplist.c, line 158; BTW, I think the attribute name should be enclosed in quotes. I lost some time grepping for "No attribute text") As a result of this, Dia tries to use a NULL font, which gives the segfault and backtrace above. Workaround: Whenever you add a textbox to a shape, remove ~/.dia/defaults.dia. Solution: Better default value for text properties, I guess. Not sure if I can do this myself; I don't know the code very well. I'll see what I can do.
Thanks for debugging. There are some changes in cvs which should avoid crashing and also give more meaningful error messages. 2004-11-26 Hans Breuer <hans@breuer.org> * lib/diaerror.[ch] : (new file) start of better error handling * lib/Makefile.am lib/makefile.msc lib/libdia.def: added new files/funcs * lib/proplist.c lib/propinternals.h (prop_list_load) : allow to propagate error to caller. Also set PXP_NOTSET to avoid applying unset properties, fixes bug #155255 * lib/propobject.c lib/prop_sdarray.c : still spewing g_warnings but now with context information
Adjusting target to help finding 0.94 dups already fixed (this is the one I was looking for)
*** Bug 316798 has been marked as a duplicate of this bug. ***
*** Bug 325719 has been marked as a duplicate of this bug. ***