Bug 272410

Summary: Words crashes on picking "Blank Document" in template dialog with one document already open.
Product: calligrawords Reporter: Elvis Stansvik <elvstone>
Component: generalAssignee: Calligra Words Bugs <calligra-words-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: halla
Priority: NOR    
Version: Git   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Backtrace of the crash.

Description Elvis Stansvik 2011-05-04 08:49:03 UTC
Created attachment 59597 [details]
Backtrace of the crash.

Version:           svn (using KDE 4.6.2) 
OS:                Linux

With two documents open, both with some edits in them, closing one of them and choosing "Discard" shows the document template dialog. Picking "Blank Document" after that will crash Words.

Reproducible: Always

Steps to Reproduce:
1) Start Words.
2) Pick "Blank Document".
3) Type "Hello".
4) Ctrl+N
5) Pick "Blank Document".
6) Type "World".
7) Ctrl+W
8) Pick "Discard".
9) Pick "Blank Document".
10) Crash.

Actual Results:  
Crash. See attached backtrace.

Expected Results:  
Not crash. And should the document template dialog really show up when I have one document open and close/discard the other?

It seems to only happen when there are two simultaneously open documents. E.g. without steps 4-6 above, the crash won't happen.

I'm running master from Git, latest commit I have is d64665c.
Comment 1 Halla Rempt 2011-05-04 08:51:15 UTC
I can reproduce.
Comment 2 Peter Simonsson 2011-08-08 15:13:33 UTC
Git commit 4022dcdc57a70087599447908f56671f5e85ddac by Peter Simonsson.
Committed on 08/08/2011 at 17:07.
Pushed by psn into branch 'master'.

Fix crash on opening template in words

The crash occurs due to tool options docker trying to access
widgets that's already been deleted. To avoid this I reset the
widgets in the tool options dialog when a new document is loaded.

REVIEW: 102242
BUG: 272410

M  +12   -0    libs/main/KoToolDocker.cpp
M  +4    -0    libs/main/KoMainWindow.cpp
M  +5    -0    libs/main/KoDockerManager.cpp
M  +2    -0    libs/main/KoToolDocker_p.h
M  +2    -0    libs/main/KoDockerManager.h

http://commits.kde.org/calligra/4022dcdc57a70087599447908f56671f5e85ddac
Comment 3 srikanth Tiyyagura 2011-08-10 03:43:31 UTC
Git commit 1d2b2e347c3140d7a16e296cd23cc30beb186c29 by Srikanth Tiyyagura, on behalf of Peter Simonsson.
Committed on 08/08/2011 at 17:07.
Pushed by tiyyagura into branch 'krita_resource-management-tagging-tiyyagura'.

Fix crash on opening template in words

The crash occurs due to tool options docker trying to access
widgets that's already been deleted. To avoid this I reset the
widgets in the tool options dialog when a new document is loaded.

REVIEW: 102242
BUG: 272410

M  +12   -0    libs/main/KoToolDocker.cpp
M  +4    -0    libs/main/KoMainWindow.cpp
M  +5    -0    libs/main/KoDockerManager.cpp
M  +2    -0    libs/main/KoToolDocker_p.h
M  +2    -0    libs/main/KoDockerManager.h

http://commits.kde.org/calligra/1d2b2e347c3140d7a16e296cd23cc30beb186c29