Bug 473138 - Black screen when trying to open PDF on Android 14
Summary: Black screen when trying to open PDF on Android 14
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Android Other
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-08 09:35 UTC by Richard
Modified: 2024-08-28 08:44 UTC (History)
1 user (show)

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


Attachments
Dummy PDF from w3.org (https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf) (12.95 KB, application/pdf)
2023-08-08 09:35 UTC, Richard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard 2023-08-08 09:35:44 UTC
Created attachment 160826 [details]
Dummy PDF from w3.org (https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf)

SUMMARY

I've only tested with PDFs yet, but any time I try to open any PDF the app only goes black and after a while Android just gives the option to kill the app as it's not reacting. Doesn't matter if I open the PDF from within Okular or if I use an open with dialog. Of course Android 14 (latest beta on Pixel 6) is still in development, but if stable isn't released within the next week it will be by next month and I doubt much will change until then. I can also try to convert the test PDF I attached into other supported formats to check if it's limited to the PDF backend or if it's a general problem. I also exported a bug report but it's too big to be attached (even after unzipping and compressing with 7z it's 11,6 MB). So if anybody has a suggestion how to send it in let me know.



STEPS TO REPRODUCE
1. Open any PDF

OBSERVED RESULT
Black screen

EXPECTED RESULT
PDF being displayed


SOFTWARE/OS VERSIONS
Android: 14 UPB4.230623.007
Okular: 1.3.0 (from KDE's F-Droid Repo)
About Okular: Okular 23.04.3, KDE Framework 5.108.0, Qt 5.15.10 (built against 5.15.10)
Comment 1 Richard 2023-08-08 19:51:20 UTC
Same result with png, tiff, ps; with djvu and xps/oxps I got the error that it couldn't find a plugin to handle them, even though the F-Droid page claims they are supported.
Comment 2 Albert Astals Cid 2023-08-09 16:34:40 UTC
Can you confirm this only happens to you with Android 14? i.e Android 13 on the same phone works?
Comment 3 Richard 2023-08-09 17:32:51 UTC
I can't confirm nor deny that, I've just learned about that F-Droid repository and have been on the beta since the first one dropped. I just assumed that if it wouldn't have worked on 13 somebody would have reported that. Also I assumed that it's unlikely to be device specific as what Google ships is more or less stock Android and if this breaks it's usually because some OEM screwed stuff up. So chances would be if it's due to a change in Android 14 it would affect other devices too when they get the update, unless it's s big that's going to be fixed until then.
Comment 4 Richard 2023-08-10 18:23:29 UTC
I've just checked out the PDF import tool of KDE Itinerary. It also shows a black screen and crashes, but afterward it does have the data from the PDF imported. So it only seems to be a problem with displaying the content, not with reading it.

Also from F-Droid, v23.04.3 with Qt 5.15.10 and poppler 23.06.0
Comment 5 Albert Astals Cid 2023-08-10 21:29:28 UTC
> I can't confirm nor deny that

Would need to be good to get someone to confirm if the update to Android 14 is what breaks this or not.
Comment 6 Richard 2023-08-13 18:48:03 UTC
Maybe someone can verify by using Android Studio and its built-in set of VM images. At least that's the easiest way to test if the switch from Android 13 to 14 breaks stuff. Even though I have no idea how to tell it to boot an arm64 image instead of an x86 one (just to make sure that's no influence). I'd love to do that, but my laptop is far from powerful enough to pull that off.
Comment 7 Albert Astals Cid 2024-08-17 10:58:44 UTC
We fixed this last year

"Cherry picked commit from Qt6 in order to fix black screen issue in Okular Android" from https://community.kde.org/GSoC/2023/StatusReports/ShivoditGill
Comment 8 Richard 2024-08-17 11:04:36 UTC
(In reply to Albert Astals Cid from comment #7)
> We fixed this last year
> 
> "Cherry picked commit from Qt6 in order to fix black screen issue in Okular
> Android" from https://community.kde.org/GSoC/2023/StatusReports/ShivoditGill

I can't check as I'm no longer on Android 14. But installing it fresh from the KDE F-Droid repo on 15 Beta 4.2, it is broken again. Opening the app doesn't show anything other than a blank screen, so does trying to open a PDF in it from a file manager.
Comment 9 Richard 2024-08-17 11:06:48 UTC
(In reply to Richard from comment #8)
> (In reply to Albert Astals Cid from comment #7)
> > We fixed this last year
> > 
> > "Cherry picked commit from Qt6 in order to fix black screen issue in Okular
> > Android" from https://community.kde.org/GSoC/2023/StatusReports/ShivoditGill
> 
> I can't check as I'm no longer on Android 14. But installing it fresh from
> the KDE F-Droid repo on 15 Beta 4.2, it is broken again. Opening the app
> doesn't show anything other than a blank screen, so does trying to open a
> PDF in it from a file manager.

I can check next week as the Pixel 9 devices ship with 14 though.
Comment 10 Richard 2024-08-22 18:12:22 UTC
(In reply to Richard from comment #9)
> (In reply to Richard from comment #8)
> > (In reply to Albert Astals Cid from comment #7)
> > > We fixed this last year
> > > 
> > > "Cherry picked commit from Qt6 in order to fix black screen issue in Okular
> > > Android" from https://community.kde.org/GSoC/2023/StatusReports/ShivoditGill
> > 
> > I can't check as I'm no longer on Android 14. But installing it fresh from
> > the KDE F-Droid repo on 15 Beta 4.2, it is broken again. Opening the app
> > doesn't show anything other than a blank screen, so does trying to open a
> > PDF in it from a file manager.
> 
> I can check next week as the Pixel 9 devices ship with 14 though.

Just tested on Pixel 9 and Pixel Tablet on Android 14, same result on both. So whatever you fixed, it wasn't enough.
Comment 11 Albert Astals Cid 2024-08-25 19:33:55 UTC
Which build are you testing?
Comment 12 Richard 2024-08-26 08:19:26 UTC
Whatever was the latest in the KDE F-Droid repo. As no part of the app is accessible, I couldn't even go to the About Okular screen. From what I can tell from the page in F-Droid it's still 1.3.0 added on 02/10/24, so it must be newer than what I used a year ago, but it has the same version number.
Comment 13 Albert Astals Cid 2024-08-28 06:47:07 UTC
1.3 is mega old, please try unstable 24.11.70 from https://cdn.kde.org/android/nightly/fdroid/repo/
Comment 14 Richard 2024-08-28 08:44:31 UTC
Yes, that one is working. It's far from perfect but at least it can display PDF files.