[krecipes] [Bug 289334] Crash on Editting Ingredients

Albert Astals Cid aacid at kde.org
Sat Feb 21 14:53:41 UTC 2015


https://bugs.kde.org/show_bug.cgi?id=289334

Albert Astals Cid <aacid at kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aacid at kde.org

--- Comment #2 from Albert Astals Cid <aacid at kde.org> ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Krecipes-devel mailing list