Bug 302435

Summary: segmentation fault if a value in a foreign sheet is used in a formula
Product: [Applications] calligrasheets Reporter: Benedikt Schmidt <benediktibk>
Component: functionsAssignee: Calligra Sheets (KSpread) Bugs <calligra-sheets-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: luigi.toscano, mkruisselbrink
Priority: NOR    
Version: 2.4.1   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:

Description Benedikt Schmidt 2012-06-24 10:10:17 UTC
If I try to use a cell from an other sheet in a formula the application crashes with a segmentation fault.

Reproducible: Always

Steps to Reproduce:
1. create new (default) spreadsheet
2. assign the cell on the first sheet the value of another sheet (e.g. =Sheet2!A1)
3. press enter
Actual Results:  
The application crashes:
benediktibk@crub-gentoo ~/Dokumente/Universitaet $ calligrasheets 
sheets(3003)/kdecore (KLibrary) kde4Factory: The library "/usr/lib64/kde4/stateshape.so" does not offer a qt_plugin_instance function.
sheets(3003)/koffice (lib kopageapp) KoOdfLoadingContext::KoOdfLoadingContext: could not parse manifest document 
Disc in /dev/sr0 is a Video DVD
Disc in /dev/sr0 is a Video DVD
Disc in /dev/sr0 is a Video DVD
Disc in /dev/sr0 is a Video DVD
Disc in /dev/sr0 is a Video DVD
sheets(3003)/koffice (lib kopageapp) KoOdfLoadingContext::KoOdfLoadingContext: could not parse manifest document 
sheets(3003)/koffice (lib kopageapp) KoOdfLoadingContext::KoOdfLoadingContext: could not parse manifest document 
sheets(3003)/koffice (lib kopageapp) KoOdfLoadingContext::KoOdfLoadingContext: could not parse manifest document 
sheets(3003)/kdeui (KAction) KActionCollection::setComponentData: this does not work on a KActionCollection containing actions! 
sheets(3003)/kdeui (KAction) KActionCollection::setComponentData: this does not work on a KActionCollection containing actions! 
sheets(3003)/kdecore (trader) KServiceTypeTrader::defaultOffers: KServiceTypeTrader: serviceType  "KSpread/Plugin"  not found 
sheets(3003)/kdecore (trader) KServiceTypeTrader::defaultOffers: KServiceTypeTrader: serviceType  "KSpread/Plugin"  not found 
Enchant dict for "en_US" 0x360bd20 
Enchant dict for "en_US" 0x360bd20 
Enchant dict for "en_US" 0x360bd20 
Enchant dict for "en_US" 0x360bd20 
Enchant dict for "en_US" 0x360bd20 
Enchant dict for "en_US" 0x360bd20 
QMetaObject::invokeMethod: No such method KoToolBox::1update()()
QMetaObject::invokeMethod: No such method KoToolBox::1update()()
Speicherzugriffsfehler


Expected Results:  
Assign the value, I assume :-)
Comment 1 Luigi Toscano 2012-08-08 20:53:54 UTC
(In reply to comment #0)
> If I try to use a cell from an other sheet in a formula the application
> crashes with a segmentation fault.
> 
Did it happen when you typed:
=SHEETS(Sheetname!
(when typing the exclamation mark?)

If yes, it could be the same issue I've found in https://bugs.kde.org/show_bug.cgi?id=304825
Comment 2 Benedikt Schmidt 2012-08-09 08:33:05 UTC
No, I typed nothing. I created the formula through a mouse click and this resulted in =Sheet2!A1
Comment 3 Marijn Kruisselbrink 2012-09-13 02:10:53 UTC
> Git commit 82d6e2f6ea1a42e5099dd4b4be173cf1f5ed2084 by Marijn Kruisselbrink.
> Committed on 13/08/2012 at 03:00.
> Pushed by mkruisselbrink into branch 'master'.
>
> Fix infinite loop when closing the cell editor while a different sheet is active.
>
> Changing of the active sheet should be done before we end referenceMode, otherwise changing the sheet ends up closing the editor, even if we are already in the process of doing so.
>
> M  +2    -2    sheets/ui/Selection.cpp
>
> http://commits.kde.org/calligra/82d6e2f6ea1a42e5099dd4b4be173cf1f5ed2084