GNOME Bugzilla – Bug 349883
Crash when trying to open BasicShapes.vdx
Last modified: 2006-10-14 18:40:14 UTC
When trying to open BasicShapes.vdx, dia crashes. I'll see if I can track down the offending source code line later. Here is the backtrace: LIBGLIB-2.0-0! 0038108d() LIBGLIB-2.0-0! 003826ae() LIBGLIB-2.0-0! 0037a5ac() LIBGLIB-2.0-0! 0036b9e5() LIBGLIB-2.0-0! 0035ecbf() VDX! vdx_parse_color + 362 bytes VDX! import_vdx + 2530 bytes VDX! import_vdx + 2174 bytes VDX! import_vdx + 666 bytes DIA-APP! 100073c4() DIA-APP! 10007712() DIA-APP! 10002012() DIA-APP! 10001e52() DIA-APP! 10001532() DIA! 00401010() DIA! 00401135() KERNEL32! 7c816d4f() These are the last lines of the commandline output: ** (dia:5596): DEBUG: Shape 4 [openLtBluePath] ** (dia:5596): DEBUG: vdx_plot_shape 4 ** (dia:5596): DEBUG: get_style_child(Char,26) ** (dia:5596): DEBUG: Looking in sheet 26 [Basic] ** (dia:5596): DEBUG: get_style_child(Para,26) ** (dia:5596): DEBUG: Looking in sheet 26 [Basic] ** (dia:5596): DEBUG: plot_geom ** (dia:5596): DEBUG: Choice 4 ** (dia:5596): DEBUG: line colour 0.200000,0.800000,0.800000 ** (dia:5596): DEBUG: plot_text ** (dia:5596): DEBUG: vdx_parse_shape ** (dia:5596): DEBUG: XML Decoding Shape ** (dia:5596): DEBUG: XML Decoding XForm ** (dia:5596): DEBUG: XML Decoding Event ** (dia:5596): DEBUG: XML Decoding Geom ** (dia:5596): DEBUG: XML Decoding MoveTo ** (dia:5596): DEBUG: XML Decoding LineTo ** (dia:5596): DEBUG: XML Decoding LineTo ** (dia:5596): DEBUG: XML Decoding LineTo ** (dia:5596): DEBUG: XML Decoding LineTo ** (dia:5596): DEBUG: XML Decoding Text ** (dia:5596): DEBUG: XML Decoding text
After commenting out sscanf(s, "#%xd", &colorvalues); c.red = ((colorvalues & 0x00ff0000)>>16) / 255.0; c.green = ((colorvalues & 0x0000ff00)>>8) / 255.0; c.blue = (colorvalues & 0x000000ff) / 255.0; in vdx_parse_color(), the color seems to be ok, but the import crashes at a different point. I think the sscanf() is not working properly with MSVC
AFAIK sscanf works fine. But the plug-in was crashing on me as well. The issues was passing a theShape.NameU being NULL when passed to g_debug(). Passing NULL strings to the C-runtimes string functions is known not to be supported. ** (dia.exe:2080): DEBUG: Shape 4 [openLtBluePath] ** (dia.exe:2080): DEBUG: Text: Open path at 3.810000,11.935000 ** (dia.exe:2080): DEBUG: Shape 5 [(null)] ** (dia.exe:2080): DEBUG: Text: Independent text 2006-10-14 Hans Breuer <hans@breuer.org> * plug-ins/vdx/vdx-import.c : don't try to print("%s", NULL). It is not generally supported and crashes on win32. Fixes bug #349883