Summary: | Crash on Editting Ingredients | ||
---|---|---|---|
Product: | [Applications] krecipes | Reporter: | Frank Luet <roundfile> |
Component: | general | Assignee: | Unassigned bugs mailing-list <unassigned-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | aacid, mthrift |
Priority: | NOR | ||
Version: | 2.0-beta1 | ||
Target Milestone: | --- | ||
Platform: | Debian stable | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/krecipes/021976224c167003032e4af08df88369411275f2 | Version Fixed In: | 2.2 |
Sentry Crash Report: | |||
Attachments: | New crash information added by DrKonqi |
Description
Frank Luet
2011-12-19 05:24:19 UTC
Created attachment 68909 [details]
New crash information added by DrKonqi
krecipes (2.0-beta1) on KDE Platform 4.5.5 (KDE 4.5.5) using Qt 4.7.0
- What I was doing when the application crashed: Attempting to edit ingredients in a recipe. This involved adding a corrected item, moving it up in the ingredients list and removing the incorrect item. The crash occurs when I attempt to remove the incorrect item.
-- Backtrace (Reduced):
#7 0xb6fa9fdf in KCompTreeNode::remove(QString const&) () from /usr/lib/libkdeui.so.5
#8 0xb6faa2a0 in KCompletion::removeItem(QString const&) () from /usr/lib/libkdeui.so.5
#9 0x08100eb2 in RecipeInputDialog::removeIngredient (this=0x86b9730) at /build/buildd/krecipes-2.0~beta1/src/dialogs/recipeinputdialog.cpp:919
#10 0x081058ed in RecipeInputDialog::qt_metacall (this=0x86b9730, _c=QMetaObject::InvokeMetaMethod, _id=27, _a=0xbf85b918) at /build/buildd/krecipes-2.0~beta1/obj-i686-linux-gnu/src/recipeinputdialog.moc:147
[...]
[...]
#13 0xb4fe0019 in QAbstractButton::clicked(bool) () from /usr/lib/libQtGui.so.4
At some point i could reproduce this and then not. The steps were easy, move the first ingredient down and then delete it. Can you check if you have a recipe in your system that makes it crash? Now the technical reason: the problem is that RecipeInputDialog::removeIngredient calls loadedRecipe->ingList.findSubstitute that just returns a bogus IngredientData because the groupIds of the ingredients didn't match after moving them up/down. And from there it would just crash, one easy way is not call findSubstitute since ing_item->ingredient() will already give you the ingredient so we can just use that for instructionsEdit->removeCompletionItem and loadedRecipe->ingList.removeSubstitute, the problem i fear is that loadedRecipe->ingList.removeSubstitute will just have the same problem, i.e. you won't be relly be able to delete the ingredient, seems like something would be corrupted in the recipe itself. Git commit 021976224c167003032e4af08df88369411275f2 by José Manuel Santamaría Lema. Committed on 01/04/2016 at 11:01. Pushed by joselema into branch 'master'. Set the new editor as default. There are still things to be implemented/fixed in the new editor but it's good enough for git/master. Related: bug 285826 FIXED-IN: 2.2 M +4 -4 src/dialogs/recipeinput/recipeinputdialog.cpp http://commits.kde.org/krecipes/021976224c167003032e4af08df88369411275f2 |