CRASH: Save As extension scripts
I spent a few moments trying to update and fix the XCF and ZIP output extensions. I believe the XCF extension functions correctly because I can intercept the temporary file and it is an appropriately layered XCF. Inkscape, however, crashes. Is the appropriate method still to hand back the converted file on STDOUT? Ted, do you have any ideas? Backtraces follow.
Aaron Spike
save as xcf:
(gdb) bt #0 0xffffe410 in __kernel_vsyscall () #1 0xb6811875 in raise () from /lib/tls/i686/cmov/libc.so.6 #2 0xb6813201 in abort () from /lib/tls/i686/cmov/libc.so.6 #3 0xb7282f4a in g_logv () from /usr/lib/libglib-2.0.so.0 #4 0xb7282f89 in g_log () from /usr/lib/libglib-2.0.so.0 #5 0xb7283006 in g_assert_warning () from /usr/lib/libglib-2.0.so.0 #6 0xb727002c in g_io_channel_write_chars () from /usr/lib/libglib-2.0.so.0 #7 0xb7b43263 in Glib::IOChannel::write () from /usr/lib/libglibmm-2.4.so.1 #8 0xb7b432d0 in Glib::IOChannel::write () from /usr/lib/libglibmm-2.4.so.1 #9 0x08519a4b in Inkscape::Extension::Implementation::Script::save ( this=0x883c5f0, module=0x8832d38, doc=0x8946e00, filenameArg=0xb2409f0 "/home/aaron/Desktop/drawing.xcf") at extension/implementation/script.h:199 #10 0x08510997 in Inkscape::Extension::Output::save (this=0x8832d38, doc=0x8946e00, uri=0xb2409f0 "/home/aaron/Desktop/drawing.xcf") at extension/output.cpp:215 #11 0x0850f3dc in Inkscape::Extension::save (key=0x8832d38, doc=0x8946e00, filename=0xb207e34 "/home/aaron/Desktop/drawing.xcf", setextension=false, check_overwrite=true, official=true) at extension/system.cpp:280 #12 0x0808e52a in file_save (parentWindow=@0x9697ed8, doc=0x8946e00, uri=@0xbfad6b40, key=0x8832d38, saveas=true, official=true) at file.cpp:520 #13 0x0808db16 in sp_file_save_dialog (parentWindow=@0x9697ed8, doc=0x8946e00, is_copy=true) at file.cpp:750 ---Type <return> to continue, or q <return> to quit--- #14 0x0808e49a in sp_file_save_as (parentWindow=@0x9697ed8) at file.cpp:820 #15 0x0838a2a0 in sp_action_perform (action=0x894ce38, data=0x0) at helper/action.cpp:181 #16 0xb7519c09 in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0 #17 0xb750c772 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #18 0xb751d323 in ?? () from /usr/lib/libgobject-2.0.so.0 #19 0x094807e8 in ?? () #20 0x00000000 in ?? ()
save as zip:
(gdb) bt #0 0xffffe410 in __kernel_vsyscall () #1 0xb67c3875 in raise () from /lib/tls/i686/cmov/libc.so.6 #2 0xb67c5201 in abort () from /lib/tls/i686/cmov/libc.so.6 #3 0xb7234f4a in g_logv () from /usr/lib/libglib-2.0.so.0 #4 0xb7234f89 in g_log () from /usr/lib/libglib-2.0.so.0 #5 0xb7235006 in g_assert_warning () from /usr/lib/libglib-2.0.so.0 #6 0xb722202c in g_io_channel_write_chars () from /usr/lib/libglib-2.0.so.0 #7 0xb7af5263 in Glib::IOChannel::write () from /usr/lib/libglibmm-2.4.so.1 #8 0xb7af52d0 in Glib::IOChannel::write () from /usr/lib/libglibmm-2.4.so.1 #9 0x08519a4b in Inkscape::Extension::Implementation::Script::save (this=0x88326c0, module=0x8835b50, doc=0x8946e00, filenameArg=0xb61e3d8 "/home/aaron/Desktop/drawing.zip") at extension/implementation/script.h:199 #10 0x08510997 in Inkscape::Extension::Output::save (this=0x8835b50, doc=0x8946e00, uri=0xb61e3d8 "/home/aaron/Desktop/drawing.zip") at extension/output.cpp:215 #11 0x0850f3dc in Inkscape::Extension::save (key=0x8835b50, doc=0x8946e00, filename=0xb5ef67c "/home/aaron/Desktop/drawing.zip", setextension=false, check_overwrite=true, official=true) at extension/system.cpp:280 #12 0x0808e52a in file_save (parentWindow=@0x9697ed8, doc=0x8946e00, uri=@0xbfc0ac70, key=0x8835b50, saveas=true, official=true) at file.cpp:520 #13 0x0808db16 in sp_file_save_dialog (parentWindow=@0x9697ed8, doc=0x8946e00, is_copy=true) at file.cpp:750 #14 0x0808e49a in sp_file_save_as (parentWindow=@0x9697ed8) at file.cpp:820 #15 0x0838a2a0 in sp_action_perform (action=0x894ce38, data=0x0) at helper/action.cpp:181 #16 0xb74cbc09 in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0 #17 0xb74be772 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #18 0xb74cf323 in ?? () from /usr/lib/libgobject-2.0.so.0 #19 0x094807e8 in ?? () #20 0x00000000 in ?? () (gdb)
On Mon, 2008-02-11 at 07:44 -0600, Aaron Spike wrote:
Is the appropriate method still to hand back the converted file on STDOUT?
Yes. Are you handing binary data though? Perhaps it's an ASCII binary thing?
Ted, do you have any ideas? Backtraces follow.
<snip>
#6 0xb727002c in g_io_channel_write_chars () from /usr/lib/libglib-2.0.so.0
This is a GIO call, what version of GTK+ are you using?
--Ted
Ted Gould wrote:
On Mon, 2008-02-11 at 07:44 -0600, Aaron Spike wrote:
Is the appropriate method still to hand back the converted file on STDOUT?
Yes. Are you handing binary data though? Perhaps it's an ASCII binary thing?
Yes both XCF and ZIP contain binary data. The procedure I'm using hasn't changed and yet this crash has appeared. I do something like:
sys.stdout.write(data)
Even if it was an ASCII<->Binary problem I wouldn't expect Inkscape to crash. I would expect at worst that the resulting file would be corrupt. Can you reproduce this crash on your end with latest SVN? Just make a few layers with stuff in them and save as XCF.
Ted, do you have any ideas? Backtraces follow.
<snip> > #6 0xb727002c in g_io_channel_write_chars () from /usr/lib/libglib-2.0.so.0
This is a GIO call, what version of GTK+ are you using?
I'm using Gutsy, so I'd have to guess I'm using the version listed at packages.ubuntu.com (i.e. 2.12.0-1ubuntu3). But I would have to check at home to be sure.
Aaron Spike
participants (2)
-
Aaron Spike
-
Ted Gould