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

            Bug ID: 388800
           Summary: File save/export still broken
           Product: krita
           Version: git master
          Platform: Compiled Sources
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: File formats
          Assignee: krita-bugs-n...@kde.org
          Reporter: aly...@rosenzweig.io
  Target Milestone: ---

I compiled the latest Krita master on an armhf machine using deevad's guide
along with some ugly patches to work around OpenGL issues. Krita works fine,
mostly.

That said, saving/exporting is completely broken (in many cases leading to
segfaults and never actually working). Checking backtraces and stderr, this
appears related to #361973 which was marked as resolved; the symptoms are still
appearing here despite having the patches given. For instance, by default in
the file dialog, only folders are shown despite the default liberal filter.
Selecting a particularly filter (like "krita" or "png") causes the entire
directory to show, regardless of the actual types of the files.

I'm running on Debian buster under i3. No DE is installed, as is the case with
the other issue. Krita is from source but all dependencies -- including Qt --
are from the repositories.

Segfault from "save as" looks like:

Thread 1 "krita" received signal SIGSEGV, Segmentation fault.
QString::QString (other=..., this=0xbeffeb24) at
/usr/include/arm-linux-gnueabihf/qt5/QtCore/qstring.h:907
907     { Q_ASSERT(&other != this); d->ref.ref(); }
(gdb) bt
#0  QString::QString (other=..., this=0xbeffeb24) at
/usr/include/arm-linux-gnueabihf/qt5/QtCore/qstring.h:907
#1  KoFileDialog::setMimeTypeFilters (this=this@entry=0xbeffec10,
mimeTypeList=..., defaultMimeType=...) at
/mnt/krita/src/libs/widgetutils/KoFileDialog.cpp:122
#2  0xb6d94824 in KisMainWindow::saveDocument (this=this@entry=0x3aff7b0,
document=0x489b888, saveas=<optimized out>, saveas@entry=false, 
    isExporting=isExporting@entry=false) at
/mnt/krita/src/libs/ui/KisMainWindow.cpp:1062
#3  0xb6d95458 in KisMainWindow::slotFileSave (this=0x3aff7b0) at
/mnt/krita/src/libs/ui/KisMainWindow.cpp:1438
#4  0xb6d980d4 in KisMainWindow::qt_static_metacall (_o=0x3aff7b0,
_c=<optimized out>, _id=<optimized out>, _a=0xbeffed54)
    at
/mnt/krita/build/libs/ui/kritaui_autogen/include/moc_KisMainWindow.cpp:301
#5  0xb4833274 in QMetaObject::activate(QObject*, int, int, void**) () from
/lib/arm-linux-gnueabihf/libQt5Core.so.5
#6  0xb4e37512 in QAction::triggered(bool) () from
/lib/arm-linux-gnueabihf/libQt5Widgets.so.5
#7  0xb4e39086 in QAction::activate(QAction::ActionEvent) () from
/lib/arm-linux-gnueabihf/libQt5Widgets.so.5
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) 

The segfault can be avoided by applying:

diff --git a/libs/widgetutils/KoFileDialog.cpp
b/libs/widgetutils/KoFileDialog.cpp
index e2c90b50c5..4927d2aeb5 100644
--- a/libs/widgetutils/KoFileDialog.cpp
+++ b/libs/widgetutils/KoFileDialog.cpp
@@ -118,6 +118,7 @@ void KoFileDialog::setMimeTypeFilters(const QStringList
&mimeTypeList, QString d

     QString defaultFilter;

+    /*
     if (!defaultMimeType.isEmpty()) {
         QString suffix =
KisMimeDatabase::suffixesForMimeType(defaultMimeType).first();

@@ -129,7 +130,7 @@ void KoFileDialog::setMimeTypeFilters(const QStringList
&mimeTypeList, QString d
         if (defaultFilters.size() > 0) {
             defaultFilter = defaultFilters.first();
         }
-    }
+    }*/

     d->defaultFilter = defaultFilter;
 }

but even with this block commented out, saving is as broken as ever.

---

Exporting does not segfault; it merely does not work. The usual "Export to PNG"
window does not even show up.

Meanwhile, stderr is full of errors like:

No file found for "image/png.xml" , even though update-mime-info said it would
exist.
Either it was just removed, or the directory doesn't have executable
permission... ()

and critically, when trying to export as a PNG (for instance):

SAFE ASSERT (krita): "!job.mimeType.isEmpty()" in file
/mnt/krita/src/libs/ui/KisDocument.cpp, line 524.

Any assistance would be appreciated :)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to