
Tue, 8 Jan 2008 03:17:47 -0400 "bulia byak" <buliabyak@...400...> kirjoitti:
Like others I have been getting intermittent and unpredictable (though quite often) crashes when opening or importing pdf files. I found where it crashes but I have no idea why. So I just commented out one line, which seems to have fixed it for me - likely at the expense of a memory leak. Please test if this fixes the crashes for you.
This is the line 711 in src/extension/internal/pdfinput/pdf-input.cpp:
//delete pdf_doc;
I'm at a loss when it comes to such mysterious crashes - there's definitely no double delete here and nothing obviously fishy. So if anyone can discover the true reason please share it with us.
I looked into this, and I belive I found the problem.
PDFDoc constructor takes a pointer to GooString containing the filename. PDFDoc object stores this pointer, and will try to delete it when destructed. Because Inkscape deleted that string too, it crashed.
Fix committed in SVN, try if it works.