Crash when saving a new document

Bug #1070903 reported by jazzynico
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
jazzynico

Bug Description

Reproduced on Windows XP, Inkscape trunk revision 11826, 11804 and 11737 (sorry, I have no older revision on my dev computer).
Not reproduced with 0.48.3.1 and the 0.48.x branch.

I first thought it was due to the recent devlibs changes, but it's apparently older.

Steps:
1. Launch Inkscape.
2. Click on the Save button (or Ctrl+S, or File>Save).
3. Crash with the following message:

---
terminate called after throwing an instance of 'std::logic_error'
  what(): basic_string::_S_construct NULL not valid

Emergency save activated!
Emergency save completed. Inkscape will close now.
---

Saving with File>Save as doesn't triggers the crash, and saving a previously saved document works as expected.

Revision history for this message
jazzynico (jazzynico) wrote :

Also reproduced on Ubuntu 11.04, trunk revision 11826.

no longer affects: inkscape-devlibs
Changed in inkscape:
importance: Undecided → High
milestone: none → 0.49
tags: added: crash regression saving win32
tags: removed: win32
Revision history for this message
jazzynico (jazzynico) wrote :
Revision history for this message
su_v (suv-lp) wrote :

On OS X 10.7.4, testing with archived builds:
- Not reproduced with revision <= 11646
- Reproduced with revision >= 11649

Only occurs if there have been no changes to the current new document.

Changed in inkscape:
status: New → Triaged
Revision history for this message
su_v (suv-lp) wrote :

> #13 sp_file_save_document (parentWindow=..., doc=0x9270f60) at file.cpp:955

Possibly introduced by the changes in r11648:
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/11648>

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

The offending line in r11826:

Glib::ustring msg = Glib::ustring::format(_("No changes need to be saved."), " ", doc->getURI());

We could do with checking what doc->getURI() is returning!

jazzynico (jazzynico)
Changed in inkscape:
assignee: nobody → JazzyNico (jazzynico)
status: Triaged → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :

Patch attached.
Doesn't display the URI in the status bar when saving a new and untouched document.

Revision history for this message
jazzynico (jazzynico) wrote :

Fixed in the trunk, revision 11828.

Changed in inkscape:
milestone: 0.49 → none
status: In Progress → Fix Released
Revision history for this message
su_v (suv-lp) wrote :

Probably related:
Bug #1072391 “'Save a copy' crashes if current new document hasn't been saved yet”
<https://bugs.launchpad.net/inkscape/+bug/1072391>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.