Summary: | crash opening a .psd file | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Jaime Torres <jtamate> |
Component: | General | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | halla |
Priority: | NOR | ||
Version First Reported In: | git master (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/calligra/de57c712c2f152962c5faf59a90859eaae0cfd39 | Version Fixed In: | |
Sentry Crash Report: |
Description
Jaime Torres
2015-05-19 05:49:10 UTC
Hi! Is this with all psd files, or a specific one? If the latter, could you share the file with us? Thanks! Hello, Unfortunately, with all the .psd I have in local, the ones in krita tests and the one I tried first. calligra/krita/plugins/formats/psd/tests/data/testing_psd_ls.psd calligra/krita/plugins/formats/psd/tests/data/sources/100x100lab8.psd Best Regards. Run under valgrind there is the significant output: ==24854== Conditional jump or move depends on uninitialised value(s) ==24854== at 0x50F6824: int const& qMin<int>(int const&, int const&) (in /opt/kde4/lib/libkritaui.so.14.0.0) ==24854== by 0x520164C: KisFavoriteResourceManager::updateFavoritePresets() (kis_favorite_resource_manager.cpp:331) ==24854== by 0x5202075: KoResourceServer<KisPaintOpPreset, SharedPointerStroragePolicy<KisSharedPtr<KisPaintOpPreset> > >::addObserver(KoResourceServerObserver<KisPaintOpPreset, SharedPointerStroragePolicy<KisSharedPtr<KisPaintOpPreset> > >*, bool) (KoResourceServer.h:422) ==24854== by 0x5200E93: KisFavoriteResourceManager::KisFavoriteResourceManager(KisPaintopBox*) (kis_favorite_resource_manager.cpp:172) ==24854== by 0x51D5AE2: KisPaintopBox::KisPaintopBox(KisViewManager*, QWidget*, char const*) (kis_paintop_box.cc:369) ==24854== by 0x518E121: KisControlFrame::KisControlFrame(KisViewManager*, QWidget*, char const*) (kis_control_frame.cpp:120) ==24854== by 0x534B3A1: KisViewManager::KisViewManager(QWidget*, KActionCollection*) (KisViewManager.cpp:317) ==24854== by 0x5320AA7: KisMainWindow::KisMainWindow() (KisMainWindow.cpp:282) ==24854== by 0x53320C8: KisPart::createMainWindow() (KisPart.cpp:258) ==24854== by 0x52F119F: KisApplication::start() (KisApplication.cpp:314) ==24854== by 0x402BE7: main (main.cc:167) ==24854== Invalid read of size 8 ==24854== at 0x2DBFF470: QMap<QString, KisSharedPtr<KisDynamicSensor> >::size() const (in /opt/kde4/lib/libkritalibpaintop.so.14.0.0) ==24854== by 0x2DBFDB3D: QMap<QString, KisSharedPtr<KisDynamicSensor> >::values() const (qmap.h:866) ==24854== by 0x2DBFD8DC: KisCurveOption::sensors() (in /opt/kde4/lib/libkritalibpaintop.so.14.0.0) ==24854== by 0x2DC0CDC2: KisMultiSensorsModel::rowCount(QModelIndex const&) const (kis_multi_sensors_model_p.cpp:42) ==24854== by 0xBA3236A: QAbstractItemModel::hasIndex(int, int, QModelIndex const&) const (qabstractitemmodel.cpp:1636) ==24854== by 0xBA3270A: QAbstractListModel::index(int, int, QModelIndex const&) const (qabstractitemmodel.cpp:3276) ==24854== by 0xAD21F4F: QAbstractItemView::setModel(QAbstractItemModel*) (qabstractitemview.cpp:664) ==24854== by 0x2DC0D9C6: KisMultiSensorsSelector::KisMultiSensorsSelector(QWidget*) (kis_multi_sensors_selector.cpp:44) ==24854== by 0x2DC00298: Ui_WdgCurveOption::setupUi(QWidget*) (ui_wdgcurveoption.h:63) ==24854== by 0x2DBFF990: KisCurveOptionWidget::KisCurveOptionWidget(KisCurveOption*, bool) (kis_curve_option_widget.cpp:48) ==24854== by 0x2DC13A0C: KisFlowOpacityOptionWidget::KisFlowOpacityOptionWidget() (kis_pressure_flow_opacity_option_widget.cpp:39) ==24854== by 0x2EEC08E0: KisBrushOpSettingsWidget::KisBrushOpSettingsWidget(QWidget*) (kis_brushop_settings_widget.cpp:52) ==24854== Address 0x28 is not stack'd, malloc'd or (recently) free'd ==24854== Weird -- nothing about those backtraces have anything to do with loading psd's -- it seems to happen somewhere in creating the ui for the brush options. I must say that I didn't try to open other image types. :-( But does the bug still happen for you? Yes, also in branch calligra/2.9 ( recompiled after git pull & git branch calligra/2.9 ). Now tested with a .jpg file. Same problem creating a new image. I don't remember how to use reviewboard :-(. Please, do the commit if you like the patch. This little patch fixes the crash for me. diff --git a/krita/plugins/paintops/libpaintop/kis_multi_sensors_model_p.cpp b/krita/plugins/paintops/libpaintop/kis_multi_sensors_model_p.cpp index 9822f78..b38f249 100644 --- a/krita/plugins/paintops/libpaintop/kis_multi_sensors_model_p.cpp +++ b/krita/plugins/paintops/libpaintop/kis_multi_sensors_model_p.cpp @@ -39,7 +39,12 @@ void KisMultiSensorsModel::setCurveOption(KisCurveOption *curveOption) int KisMultiSensorsModel::rowCount(const QModelIndex &/*parent*/) const { - return m_curveOption->sensors().size(); + if (m_curveOption) { + return m_curveOption->sensors().size(); + } + else { + return 0; + } } QVariant KisMultiSensorsModel::data(const QModelIndex &index, int role) const Could you try with a fresh user or a clean config? Obviously, this doesn't happen for everyone, so there must be something in your settings or collection of resources that Krita chokes on, and we need to figure out what that is, and then fix it! Oh, cool, thanks -- I hadn't seen the patch yet :-) Git commit de57c712c2f152962c5faf59a90859eaae0cfd39 by Boudewijn Rempt. Committed on 21/05/2015 at 07:19. Pushed by rempt into branch 'calligra/2.9'. Patch by Jaime Torres. Thanks! CCMAIL:jtamate@gmail.com I'm still wondering, though why this crash happened for Jaime... M +6 -1 krita/plugins/paintops/libpaintop/kis_multi_sensors_model_p.cpp http://commits.kde.org/calligra/de57c712c2f152962c5faf59a90859eaae0cfd39 |