Bug 393659

Summary: After two days with no problem, the program crashes when adding a text item, or saving
Product: [Applications] krita Reporter: tony <atlavely>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: dimula73, halla
Priority: NOR    
Version First Reported In: 4.0.1   
Target Milestone: ---   
Platform: macOS (DMG)   
OS: macOS   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Crash report from latest Krita crash
attachment-13604-0.html

Description tony 2018-04-29 22:10:27 UTC
Created attachment 112313 [details]
Crash report from latest Krita crash

Building a multilayer document (a map). There are eleven layers now, four are grouped in two groups of two.
In the top layer, I've been adding text (names of cities for my map), with no problem I reach the last one and doing anything with it seems to reliably crash the program. Open the image (a .kra file which is 408.0M in the title bar and 22-23 MB on disk) and enter this text token, and sometimes it crashes after using the Select Shapes Tool to reposition the text (reposition and then click away), sometimes it crashes when I attempt to save the work. But it so far, always crashes.
I haven't tried adding a new layer, or anything else.
I hope I got the part of the crash report you want, but I have the whole thing saved if you want something else.

Let me know what I'm doing wrong, please. If you need more information, please LMK. If I'm running out of some arcane resource, give me a clue how to fix it.

I like the program, and I need a replacement for Adobe Elements, which I though this might be.

Krita 4.0.1 (git 064710e)
macOS 10.13.4; MacBook Pro (Retina, 13 inch, early 2015)
Appreciate your help.
Comment 1 Halla Rempt 2018-04-30 07:44:24 UTC
Please also attach the .kra file.
Comment 2 tony 2018-04-30 13:10:38 UTC
Created attachment 112322 [details]
attachment-13604-0.html

Thanks for the speedy response!
You (Boudewijn Rempt, that is)  should have an invite to a Dropbox folder. The file’s too large to email.
Also, I put three smaller files that appear to have been created when the crash occurred; they won’t open, so I’m not sure they’ll be of value or what they are.
Also, increasing the memory in Preferences/Performance had no effect.
Likewise, opening a new layer and attempting to add the Text there also crashed.
Thanks for your attention, tony



> On Apr 30, 2018, at 3:44 AM, Boudewijn Rempt <bugzilla_noreply@kde.org> wrote:
> 
> https://bugs.kde.org/show_bug.cgi?id=393659
> 
> Boudewijn Rempt <boud@valdyas.org> changed:
> 
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                 CC|                            |boud@valdyas.org
> 
> --- Comment #1 from Boudewijn Rempt <boud@valdyas.org> ---
> Please also attach the .kra file.
> 
> -- 
> You are receiving this mail because:
> You reported the bug.

tony lavely
twitter: @tlavely
Blog http://tonylavely.com/
At Amazon: amazon.com/author/tonylavely
Comment 3 Halla Rempt 2018-05-10 13:45:03 UTC
Hm, of the four files, the ones with the extension after .kra are broken. I guess something really happened during saving. The crash also shows a problem during saving. I can reproduce the crash, too.
Comment 4 tony 2018-05-10 13:51:15 UTC
I don't know that it helps, but I used Adobe Elements to make the text change and the resulting file (so far) works in Krita. I haven't done much editing, but perhaps that gives you some information.
Comment 5 Halla Rempt 2018-05-10 13:56:12 UTC
I'm building a debug version of Krita on my mac now so I can check what's up :-)
Comment 6 Halla Rempt 2018-05-10 14:08:15 UTC
Full backtrace:

(lldb) bt
* thread #30, name = 'Thread (pooled)', stop reason = EXC_BAD_ACCESS (code=1, address=0x1f00000008)
  * frame #0: 0x0000000101e24c14 libkritaflake.17.dylib`KoShape::compareShapeZIndex(KoShape*, KoShape*) [inlined] KoShape::d_func(this=0x0000001f00000000) const at KoShape.h:1300 [opt]
    frame #1: 0x0000000101e24c14 libkritaflake.17.dylib`KoShape::compareShapeZIndex(KoShape*, KoShape*) [inlined] KoShape::parent(this=0x0000001f00000000) const at KoShape.cpp:1256 [opt]
    frame #2: 0x0000000101e24c14 libkritaflake.17.dylib`KoShape::compareShapeZIndex(s1=0x0000001f00000000, s2=0x000000015e3d3170) at KoShape.cpp:579 [opt]
    frame #3: 0x000000010081300f libkritaui.17.dylib`void std::__1::__sort<bool (*&)(KoShape*, KoShape*), QList<KoShape*>::iterator>(__first=<unavailable>, __last=iterator @ 0x00007000093358b8, __comp=0x00007000093358c0)(KoShape*, KoShape*)) at algorithm:4133 [opt]
    frame #4: 0x000000010080f052 libkritaui.17.dylib`KisShapeLayer::saveShapesToStore(KoStore*, QList<KoShape*>, QSizeF const&) [inlined] void std::__1::sort<QList<KoShape*>::iterator, bool (*)(KoShape*, KoShape*)>(__last=<unavailable>, __comp=(libkritaflake.17.dylib`KoShape::compareShapeZIndex(KoShape*, KoShape*) at KoShape.cpp:564))(KoShape*, KoShape*)) at algorithm:4201 [opt]
    frame #5: 0x000000010080f039 libkritaui.17.dylib`KisShapeLayer::saveShapesToStore(store=0x00000001cd8fae60, shapes=QList<KoShape *> @ 0x0000700009335980, sizeInPt=0x0000700009335938) at kis_shape_layer.cc:493 [opt]
    frame #6: 0x000000010080f7e3 libkritaui.17.dylib`KisShapeLayer::saveLayer(this=<unavailable>, store=0x00000001cd8fae60) const at kis_shape_layer.cc:536 [opt]
    frame #7: 0x0000000112797dcb libkritalibkra.17.0.0.dylib`KisKraSaveVisitor::visit(this=0x0000700009335a60, layer=0x000000015e36f600) at kis_kra_save_visitor.cpp:115 [opt]
    frame #8: 0x000000010165060c libkritaimage.17.dylib`KisNodeVisitor::visitAllInverse(this=0x0000700009335a60, node=<unavailable>, breakOnFail=<unavailable>) at kis_node_visitor.cpp:49 [opt]
    frame #9: 0x00000001127929ab libkritalibkra.17.0.0.dylib`KisKraSaver::saveBinaryData(this=0x00000001cd8bfd30, store=0x00000001cd8fae60, image=KisImageSP @ 0x0000700009335ba0, uri=0x0000700009335bb0, external=true, autosave=<unavailable>) at kis_kra_saver.cpp:198 [opt]
    frame #10: 0x000000011eb65978 kritakraexport.so`KraConverter::buildFile(this=0x0000700009335c10, io=<unavailable>) at kra_converter.cpp:133 [opt]
    frame #11: 0x000000011eb61378 kritakraexport.so`KraExport::convert(this=<unavailable>, document=0x0000000136e98ae0, io=0x0000700009335cc8, (null)=<unavailable>) at kra_export.cpp:62 [opt]
    frame #12: 0x0000000100b0416c libkritaui.17.dylib`KisImportExportManager::doExportImpl(this=0x000000015bfaf220, location=<unavailable>, filter=QSharedPointer<KisImportExportFilter> @ 0x0000700009335d30, exportConfiguration=KisPropertiesConfigurationSP @ 0x0000700009335d50) at KisImportExportManager.cpp:614 [opt]
    frame #13: 0x0000000100b03b7c libkritaui.17.dylib`KisImportExportManager::doExport(this=0x000000015bfaf220, location=0x00000001cd972f38, filter=<unavailable>, exportConfiguration=<unavailable>, alsoAsKra=false) at KisImportExportManager.cpp:578 [opt]
    frame #14: 0x0000000100b046ae libkritaui.17.dylib`QtConcurrent::StoredFunctorCall0<KisImportExportFilter::ConversionStatus, std::__1::__bind<KisImportExportFilter::ConversionStatus (KisImportExportManager::*)(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool), KisImportExportManager*, QString const&, QSharedPointer<KisImportExportFilter>&, KisPinnedSharedPtr<KisPropertiesConfiguration>&, bool&> >::runFunctor() [inlined] decltype(__f=0x00000001cd972f20, __a0=0x00000001cd972f30, __args=<unavailable>)).*fp(std::__1::forward<QString&, QSharedPointer<KisImportExportFilter>&, KisPinnedSharedPtr<KisPropertiesConfiguration>&, bool&>(fp1))) std::__1::__invoke<KisImportExportFilter::ConversionStatus (KisImportExportManager::*&)(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool), KisImportExportManager*&, QString&, QSharedPointer<KisImportExportFilter>&, KisPinnedSharedPtr<KisPropertiesConfiguration>&, bool&, void>(KisImportExportFilter::ConversionStatus (KisImportExportManager::*&&&)(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool), KisImportExportManager*&&&, QString&&&, QSharedPointer<KisImportExportFilter>&&&, KisPinnedSharedPtr<KisPropertiesConfiguration>&&&, bool&&&) at type_traits:4264 [opt]
    frame #15: 0x0000000100b0468e libkritaui.17.dylib`QtConcurrent::StoredFunctorCall0<KisImportExportFilter::ConversionStatus, std::__1::__bind<KisImportExportFilter::ConversionStatus (KisImportExportManager::*)(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool), KisImportExportManager*, QString const&, QSharedPointer<KisImportExportFilter>&, KisPinnedSharedPtr<KisPropertiesConfiguration>&, bool&> >::runFunctor() [inlined] std::__1::__bind_return<KisImportExportFilter::ConversionStatus (KisImportExportManager::*)(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool), std::__1::tuple<KisImportExportManager*, QString, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool>, std::__1::tuple<>, __is_valid_bind_return<KisImportExportFilter::ConversionStatus (KisImportExportManager::*)(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool), std::__1::tuple<KisImportExportManager*, QString, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool>, std::__1::tuple<> >::value>::type std::__1::__apply_functor<KisImportExportFilter::ConversionStatus (__f=0x00000001cd972f20, __bound_args=0x00000001cd972f30)(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool), std::__1::tuple<KisImportExportManager*, QString, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool>, 0ul, 1ul, 2ul, 3ul, 4ul, std::__1::tuple<> >(KisImportExportFilter::ConversionStatus (KisImportExportManager::*&)(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool), std::__1::tuple<KisImportExportManager*, QString, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool>&, std::__1::__tuple_indices<0ul, 1ul, 2ul, 3ul, 4ul>, std::__1::tuple<>&&) at functional:2224 [opt]
    frame #16: 0x0000000100b04652 libkritaui.17.dylib`QtConcurrent::StoredFunctorCall0<KisImportExportFilter::ConversionStatus, std::__1::__bind<KisImportExportFilter::ConversionStatus (KisImportExportManager::*)(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool), KisImportExportManager*, QString const&, QSharedPointer<KisImportExportFilter>&, KisPinnedSharedPtr<KisPropertiesConfiguration>&, bool&> >::runFunctor() [inlined] std::__1::__bind_return<KisImportExportFilter::ConversionStatus (KisImportExportManager::*)(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool), std::__1::tuple<KisImportExportManager*, QString, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool>, std::__1::tuple<>, __is_valid_bind_return<KisImportExportFilter::ConversionStatus (KisImportExportManager::*)(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool), std::__1::tuple<KisImportExportManager*, QString, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool>, std::__1::tuple<> >::value>::type std::__1::__bind<KisImportExportFilter::ConversionStatus (this=0x00000001cd972f20)(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool), KisImportExportManager*, QString const&, QSharedPointer<KisImportExportFilter>&, KisPinnedSharedPtr<KisPropertiesConfiguration>&, bool&>::operator()<>() at functional:2257 [opt]
    frame #17: 0x0000000100b04652 libkritaui.17.dylib`QtConcurrent::StoredFunctorCall0<KisImportExportFilter::ConversionStatus, std::__1::__bind<KisImportExportFilter::ConversionStatus (KisImportExportManager::*)(QString const&, QSharedPointer<KisImportExportFilter>, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool), KisImportExportManager*, QString const&, QSharedPointer<KisImportExportFilter>&, KisPinnedSharedPtr<KisPropertiesConfiguration>&, bool&> >::runFunctor(this=0x00000001cd972f00) at qtconcurrentstoredfunctioncall.h:60 [opt]
    frame #18: 0x0000000100b045a0 libkritaui.17.dylib`QtConcurrent::RunFunctionTask<KisImportExportFilter::ConversionStatus>::run(this=0x00000001cd972f00) at qtconcurrentrunbase.h:108 [opt]
    frame #19: 0x0000000103d1213e QtCore`___lldb_unnamed_symbol288$$QtCore + 222
    frame #20: 0x0000000103d1546c QtCore`___lldb_unnamed_symbol310$$QtCore + 364
    frame #21: 0x00007fff628f9661 libsystem_pthread.dylib`_pthread_body + 340
    frame #22: 0x00007fff628f950d libsystem_pthread.dylib`_pthread_start + 377
    frame #23: 0x00007fff628f8bf9 libsystem_pthread.dylib`thread_start + 13
(lldb)