Bug 447862 - Could not open a PDF file in Krita 5.0.0 in macOS
Summary: Could not open a PDF file in Krita 5.0.0 in macOS
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 5.0.0
Platform: macOS (DMG) macOS
: NOR normal
Target Milestone: ---
Assignee: amyspark
URL: https://invent.kde.org/graphics/krita...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-01-02 23:45 UTC by Keith Kmichik
Modified: 2022-01-05 02:30 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
four page .pdf test file (1.07 MB, application/pdf)
2022-01-03 15:46 UTC, Ahab Greybeard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Kmichik 2022-01-02 23:45:04 UTC
SUMMARY
***
I am not certain what version of Krita I was using, but I could open a PDF file.  After upgrading to Krita 5.0.0, I could no longer open a PDF file.  It was not listed in the supported formats.  
I installed Krita 4.4.7 and I was able to open a PDF file.  

NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Installed Krita 5.0.0
2. Tried to open a PDF file
3. 

OBSERVED RESULT
File would not open

EXPECTED RESULT
I expected the file to open

SOFTWARE/OS VERSIONS
Windows: 
macOS: Monterey 12.0.1
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Ahab Greybeard 2022-01-03 15:46:14 UTC
Created attachment 145080 [details]
four page .pdf test file

I can't test macOS but for Linux and Windows 10 I see the following:-

Linux:

4.4.8 takes 5 seconds to open the 'Archoil' .pdf file.
On Closing, there is no warning or offer to Save, etc.

5.0.0 takes about 40 seconds to open the document.
On Closing, there is no warning or offer to Save.

Windows 10:
4.4.8 takes 5 seconds to open it.
On Closing, it gives a warning and an offer to Save, etc.

5.0.0 takes 40 seconds to open it.
On Closing, it does not give any warning etc.
Comment 2 amyspark 2022-01-03 23:17:42 UTC
Not a Krita bug, rather CI; our dependencies build for macOS is *still* broken because of a failed fontconfig build: https://binary-factory.kde.org/job/Krita_Nightly_MacOS_Dependency_Build/119/consoleText
Comment 3 vanyossi 2022-01-03 23:37:32 UTC
fontconfig seems to need autotools
Comment 4 Bug Janitor Service 2022-01-04 02:15:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1272
Comment 5 amyspark 2022-01-04 08:56:36 UTC
Git commit 2814f3f7a555b8359230e157c306dbd53576dddc by L. E. Segovia.
Committed on 04/01/2022 at 02:13.
Pushed by rempt into branch 'master'.

Fix macOS fontconfig build

Modifications to autotools-based builds MUST use the `-Z` parameter to
patch, otherwise they will trigger autoreconf.

And, for the sake of acknowledgment,  let's use the patch from GitLab
as well.

R  +20   -2    3rdparty/ext_fontconfig/0001-Fix-FC_DEFAULT_FONTS-on-macOS.patch [from: 3rdparty/ext_fontconfig/macOS_sedErrorFix.diff - 060% similarity]
M  +1    -1    3rdparty/ext_fontconfig/CMakeLists.txt

https://invent.kde.org/graphics/krita/commit/2814f3f7a555b8359230e157c306dbd53576dddc
Comment 6 amyspark 2022-01-04 12:28:50 UTC
The commit didn't fix the build because its modifications need to be precompiled with autoreconf (as they are applied to a tarball, not the git repo).

For future reference, we need to document how to handle autotools-based patches.
Comment 7 Bug Janitor Service 2022-01-04 13:56:13 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1278
Comment 8 vanyossi 2022-01-05 02:30:48 UTC
Git commit 602e55754200d02dcd463b0d666a7bebaf4ec76b by Ivan Yossi, on behalf of L. E. Segovia.
Committed on 05/01/2022 at 02:30.
Pushed by ivany into branch 'master'.

Fix patch for fontconfig triggering autoreconf

Both .am and compiled files need to be updated. Let's also make sure
their modification times don't change, either.

M  +40   -11   3rdparty/ext_fontconfig/0001-Fix-FC_DEFAULT_FONTS-on-macOS.patch

https://invent.kde.org/graphics/krita/commit/602e55754200d02dcd463b0d666a7bebaf4ec76b