[KPhotoAlbum] Crash when renaming categories (and possible fix)

Johannes Zarl johannes at zarl.at
Sun Jul 6 17:32:03 BST 2014


Hi Tobias,

Thanks for the bugreport and analysis!

Looking into the CategoryItem code it turned out that the code had a bit of a 
split-brain situation (some places used _text and others _category). Thus, 
removing the redundancies fixed the root-cause of the bug...

Cheers,
  Johannes

On Sunday 06 July 2014 10:11:36 Tobias Leupold wrote:
> Hi list!
> 
> I found a crash situation in current git master. You can produce it like so:
> 
> * Open the "Categories" settings page
> * Rename a category
> * Click "Apply"
> * Rename it again
> * Click "Apply" again
> 
> --> KPA crashes.
> 
> I think this is due to _categoryOrig in CategoryItem.cpp not being set to
> the current (updated) category name, but still pointing to the original
> name (it is overwritten by the submit function).
> 
> I'm not perfectly sure if this is okay and works fine. It's only a tiny
> change, but with this, the crash does not occur anymore and all renaming
> seems still to be working:
> https://github.com/l3u/kphotoalbum/compare/fix_rename_crash
> 
> Could you please review this?
> 
> Yours, Tobias
> _______________________________________________
> KPhotoAlbum mailing list
> KPhotoAlbum at mail.kdab.com
> https://mail.kdab.com/mailman/listinfo/kphotoalbum




More information about the Kphotoalbum mailing list