Unexpected behavior when closing a new document

Bug #1079759 reported by James Nicholls
356
This bug affects 23 people
Affects Status Importance Assigned to Milestone
Scratch
Fix Released
High
Niclas Lockner

Bug Description

1. Create a new file in Scratch
2. Add contents, don't save
3. Attempt to quit (window close button or Alt+F4)
4. When the Unsaved Changes dialog pops up, press Escape or Alt+F4 to close it
5. Scratch disappears without saving

Shouldn't the behaviour be to cancel, not to quit without saving changes?

ProblemType: Crash
DistroRelease: elementary 0.2
Package: scratch-text-editor 1.1.1+r920+r913-0+pkg32~precise1 [origin: LP-PPA-elementary-os-daily]
ProcVersionSignature: Ubuntu 3.2.0-33.52-generic 3.2.31
Uname: Linux 3.2.0-33-generic x86_64
ApportVersion: 2.0.1-0ubuntu15+elementary3~precise1
Architecture: amd64
CrashCounter: 1
CrashDB: scratch_text_editor
Date: Fri Nov 16 11:41:11 2012
ExecutablePath: /usr/bin/scratch-text-editor
InstallationMedia: elementary OS 0.2 "Luna" - Build amd64 LIVE Binary 20120914-23:51
MarkForUpload: True
ProcCmdline: scratch-text-editor
ProcEnviron:
 LANGUAGE=en_GB:en
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SegvAnalysis:
 Segfault happened at: 0x41570d <scratch_main_window_get_current_document+74>: mov 0x50(%rax),%rax
 PC (0x0041570d) ok
 source "0x50(%rax)" (0x00000050) not located in a known VMA region (needed readable region)!
 destination "%rax" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: scratch-text-editor
StacktraceTop:
 scratch_main_window_get_current_document ()
 ?? ()
 ?? ()
 ?? ()
 ?? ()
Title: scratch-text-editor crashed with SIGSEGV in scratch_main_window_get_current_document()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Related branches

Revision history for this message
James Nicholls (ryft) wrote :
information type: Private → Public Security
Revision history for this message
RabbitBot (rabbitbot-a) wrote :

StacktraceTop:
 scratch_main_window_get_current_document (self=0x7fff1720ad50) at /build/buildd/scratch-text-editor-1.1.1+r920+r913/obj-x86_64-linux-gnu/src/MainWindow.c:3517
 ?? ()
 ?? ()
 ?? ()
 ?? ()

Revision history for this message
RabbitBot (rabbitbot-a) wrote : Stacktrace.txt
Revision history for this message
RabbitBot (rabbitbot-a) wrote : ThreadStacktrace.txt
Changed in scratch:
status: New → Invalid
Revision history for this message
RabbitBot (rabbitbot-a) wrote : Crash report cannot be processed

Thank you for your report!

However, processing it in order to get sufficient information for the
developers failed (it does not generate a useful symbolic stack trace). This
might be caused by some outdated packages which were installed on your system
at the time of the report:

contractor version 0.2+r37-0+pkg6~precise1 required, but 0.2+r38-0+pkg6~precise1 is available
libgranite1 version 0.2.0~r454-0+pkg45~precise1 required, but 0.2.0~r456-0+pkg45~precise1 is available
pantheon-files version 0.1-0~r1020+pkg10~precise1 required, but 0.1-0~r1021+pkg10~precise1 is available
outdated debug symbol package for dbus: package version 1.4.18-1ubuntu1.3 dbgsym version 1.4.18-1ubuntu1
outdated debug symbol package for libudev0: package version 175-0ubuntu9.2 dbgsym version 175-0ubuntu9
outdated debug symbol package for udev: package version 175-0ubuntu9.2 dbgsym version 175-0ubuntu9
outdated debug symbol package for libproxy1: package version 0.4.7-0ubuntu4.1 dbgsym version 0.4.7-0ubuntu4
outdated debug symbol package for passwd: package version 1:4.1.4.2+svn3283-3ubuntu5.1 dbgsym version 1:4.1.4.2+svn3283-3ubuntu5
libdrm-intel1 version 2.4.39-0ubuntu1 required, but 2.4.32-1ubuntu1 is available
outdated debug symbol package for libdbus-1-3: package version 1.4.18-1ubuntu1.3 dbgsym version 1.4.18-1ubuntu1
outdated debug symbol package for libcups2: package version 1.5.3-0ubuntu4 dbgsym version 1.5.2-9ubuntu1
outdated debug symbol package for fontconfig: package version 2.8.0-3ubuntu9.1 dbgsym version 2.8.0-3ubuntu9
outdated debug symbol package for libc-bin: package version 2.15-0ubuntu10.3 dbgsym version 2.15-0ubuntu10
outdated debug symbol package for glib-networking-services: package version 2.32.1-1ubuntu2 dbgsym version 2.32.1-1
libgranite-common version 0.2.0~r454-0+pkg45~precise1 required, but 0.2.0~r456-0+pkg45~precise1 is available
outdated debug symbol package for libxslt1.1: package version 1.1.26-8ubuntu1.2 dbgsym version 1.1.26-8ubuntu1
libgee2 version 0.6.4-2~precise1 required, but 0.6.4-1 is available
libdrm-radeon1 version 2.4.39-0ubuntu1 required, but 2.4.32-1ubuntu1 is available
libdrm-nouveau1a version 2.4.39-0ubuntu1 required, but 2.4.32-1ubuntu1 is available
outdated debug symbol package for coreutils: package version 8.13-3ubuntu3.1 dbgsym version 8.13-3ubuntu3
outdated debug symbol package for dbus-x11: package version 1.4.18-1ubuntu1.3 dbgsym version 1.4.18-1ubuntu1
libdrm2 version 2.4.39-0ubuntu1 required, but 2.4.32-1ubuntu1 is available
outdated debug symbol package for gvfs-libs: package version 1.12.1-0ubuntu1.1 dbgsym version 1.12.1-0ubuntu1

Please upgrade your system to the latest package versions. If you still
encounter the crash, please file a new report.

Thank you for your understanding, and sorry for the inconvenience!

tags: removed: need-amd64-retrace
Revision history for this message
Mario Guerriero (mefrio-g) wrote : Re: Scratch crashes after closing an unsaved file

I edited the bug description in order to not make it a mere duplicate.

description: updated
Changed in scratch:
status: Invalid → Confirmed
importance: Undecided → Medium
milestone: none → 1.2
summary: - Scratch crashes after closing an unsaved file
+ Unexpected behavior when closing a new document
Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

I have attached a patch addressing this issue and also consolidating code related to the Save on Close function. There were three or four very similar functions in MainWindow, SplitView and Tab so rather than fix each I have replaced them with shared code in MainWindow.

Changed in scratch:
milestone: 2.0 → 2.1
Changed in scratch:
milestone: 2.0.1 → 2.1
Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

Increasing importance because of the data loss the bug causes and because it's still not fixed

tags: added: data-loss
Changed in scratch:
status: Confirmed → Triaged
importance: Medium → High
Niclas Lockner (niclasl)
Changed in scratch:
assignee: nobody → Niclas Lockner (niclasl)
Niclas Lockner (niclasl)
Changed in scratch:
status: Triaged → In Progress
Cody Garver (codygarver)
Changed in scratch:
status: In Progress → Fix Committed
Changed in scratch:
status: Fix Committed → Won't Fix
status: Won't Fix → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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