| Summary: | calligra words crashes, when inserting a spreadsheet shape | ||
|---|---|---|---|
| Product: | [Applications] calligrasheets | Reporter: | Franz Trischberger <franz.trischberger> |
| Component: | general | Assignee: | Calligra Sheets (KSpread) Bugs <calligra-sheets-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | cbo, vasilisk1 |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed In: | ||
| Sentry Crash Report: | |||
|
Description
Franz Trischberger
2012-02-09 11:14:15 UTC
it doesn't crash for me although the shape itself is not working very well It may be you compilation/installation has gone wrong somehow I looked deeper into this:
(gdb) next
37 in /var/tmp/paludis/app-office-calligra-2.3.87/work/calligra-2.3.87/libs/flake/tools/KoCreateShapeStrategy.cpp
(gdb)
39 in /var/tmp/paludis/app-office-calligra-2.3.87/work/calligra-2.3.87/libs/flake/tools/KoCreateShapeStrategy.cpp
(gdb)
37 in /var/tmp/paludis/app-office-calligra-2.3.87/work/calligra-2.3.87/libs/flake/tools/KoCreateShapeStrategy.cpp
(gdb)
40 in /var/tmp/paludis/app-office-calligra-2.3.87/work/calligra-2.3.87/libs/flake/tools/KoCreateShapeStrategy.cpp
(gdb)
41 in /var/tmp/paludis/app-office-calligra-2.3.87/work/calligra-2.3.87/libs/flake/tools/KoCreateShapeStrategy.cpp
(gdb)
42 in /var/tmp/paludis/app-office-calligra-2.3.87/work/calligra-2.3.87/libs/flake/tools/KoCreateShapeStrategy.cpp
(gdb)
44 in /var/tmp/paludis/app-office-calligra-2.3.87/work/calligra-2.3.87/libs/flake/tools/KoCreateShapeStrategy.cpp
(gdb)
47 in /var/tmp/paludis/app-office-calligra-2.3.87/work/calligra-2.3.87/libs/flake/tools/KoCreateShapeStrategy.cpp
(gdb)
50 in /var/tmp/paludis/app-office-calligra-2.3.87/work/calligra-2.3.87/libs/flake/tools/KoCreateShapeStrategy.cpp
(gdb)
Program received signal SIGSEGV, Segmentation fault.
KoCreateShapeStrategy::KoCreateShapeStrategy (this=0x26554f0, tool=<optimized out>, clicked=...) at /var/tmp/paludis/app-office-calligra-2.3.87/work/calligra-2.3.87/libs/flake/tools/KoCreateShapeStrategy.cpp:50
50 in /var/tmp/paludis/app-office-calligra-2.3.87/work/calligra-2.3.87/libs/flake/tools/KoCreateShapeStrategy.cpp
(gdb) print shape
$7 = (KoShape *) 0x0
(gdb) print parent
$9 = (KoCreateShapesTool *) 0x2669400
(gdb) print parent->shapeId
$10 = {QString (const KoCreateShapesTool * const)} 0x7eff2343bad0 <KoCreateShapesTool::shapeId() const>
(gdb) print parent->shapeId()
$11 = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 19094}, alloc = 0, size = 0, data = 0x60d5fa, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}},
static shared_empty = {ref = {_q_value = 219}, alloc = 0, size = 0, data = 0x7eff361bd8ba, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x1fe59f0, static codecForCStrings = 0x0}
So shape is 0 in this context, because parent->shapeId() returned an empty string. Where could I look next?
in sheets/shape/TableShape.cpp line 88 the constructor needs to call: setShapeId(id); where id is some unique string for example: "tableshape" Sorry, it was NOT the shapeId. I printed the value in gdb, and that just returned an empty string. The problem seems to be bound to localization. I am running with german localization. The query in KoShapeFactoryBase.cpp:245 asks for "Name == 'Spreadsheet Shape'". I only get a non-empty offers list, when i ask for "Name == 'Tabellenobjekt'". I am not sure where to fix this. Sorry, incomplete sentence...
>> when i ask for "Name == 'Tabellenobjekt'" it works.
This patch fixes the crash, when running german calligrawords in a german kde-session. When running calligrawords in another localization then the session-localization (e.g.english words in german session) it still will crash.
=====
--- sheets/shape/TableShapeFactory.cpp.org 2012-03-23 09:33:02.258388407 +0100
+++ sheets/shape/TableShapeFactory.cpp 2012-03-23 09:27:13.422362087 +0100
@@ -47,7 +47,7 @@
TableShapeFactory::TableShapeFactory()
- : KoShapeFactoryBase(TableShapeId, i18n("Spreadsheet"), "Spreadsheet Shape")
+ : KoShapeFactoryBase(TableShapeId, i18n("Spreadsheet"), i18n("Spreadsheet Shape"))
{
setToolTip(i18n("Spreadsheet Shape"));
setIcon("spreadsheetshape");
this is not really a words bug but relted to sheets *** Bug 296690 has been marked as a duplicate of this bug. *** Git commit af29c8a7a9d67b476b4de68604e01f1558181b12 by Boudewijn Rempt. Committed on 29/03/2012 at 15:32. Pushed by rempt into branch 'master'. Fix inserting table shape in non-english locale Comparing a translated name with a fixed text isn't going to work... Related: bug 297029 Okay to backport to 2.4? M +2 -0 libs/flake/KoDeferredShapeFactoryBase.h M +2 -7 libs/flake/KoShapeFactoryBase.cpp M +2 -0 sheets/shape/TableShapeDeferredFactory.h M +1 -1 sheets/shape/TableShapeFactory.cpp M +1 -0 sheets/shape/spreadsheetshape-deferred.desktop http://commits.kde.org/calligra/af29c8a7a9d67b476b4de68604e01f1558181b12 Git commit 0f96e4b78756deaba77b2d8d486ea5585bd8f652 by Boudewijn Rempt. Committed on 29/03/2012 at 15:32. Pushed by rempt into branch 'calligra/2.4'. Fix inserting table shape in non-english locale Comparing a translated name with a fixed text isn't going to work... Related: bug 297029 Okay to backport to 2.4? M +2 -0 libs/flake/KoDeferredShapeFactoryBase.h M +2 -7 libs/flake/KoShapeFactoryBase.cpp M +2 -0 sheets/shape/TableShapeDeferredFactory.h M +1 -1 sheets/shape/TableShapeFactory.cpp M +1 -0 sheets/shape/spreadsheetshape-deferred.desktop http://commits.kde.org/calligra/0f96e4b78756deaba77b2d8d486ea5585bd8f652 Thanks, this solves the issues. Patch applied to calligra-2.3.92. |