Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markor crashes on startup on SailfishOS with Android AppSupport after allowing storage access #2424

Open
4 tasks done
ntninja opened this issue Sep 24, 2024 · 5 comments
Open
4 tasks done

Comments

@ntninja
Copy link

ntninja commented Sep 24, 2024

⚠️ This issue respects the following points: ⚠️

  • This is a bug. Not a question or feature request.
  • The topic is not already reported at Issues. (I've searched it).
  • Markor is up to date. See Releases for the latest version. Updates are available from F-Droid and GitHub.
  • The bug is still present in the latest development version (git master). (Please download and try the test version of Markor, named Marder. Don't worry; Markor and Marder appear as completely separate applications. You can install both side-by-side, and Markor settings are not touched. In case the issue is resolved there, you don't need to create a bug report. The change will be part of the next Markor update.)

Description

App crashes on startup, this is a regression in 2.12.5+. Version 2.12.4 and older do not exhibit this crash.

Steps to reproduce

  1. Install Markor / Mardor
  2. Complete tutorial
  3. Press “OK” in “Storage permission required to read and write files” dialog
  4. Press “Allow” in “Allow Markor to access photos and media on your device?” SFOS popup
  5. Swipe the “Allow access to manage all files” permission in opened Android settings
  6. Close Android settings
  7. Open Markor again

Information

Android version: 11 patch level 05/12/2023 (on SailfishOS 4.6.0.15)
Device: Sony Xperia 10 II - Dual SIM
App Version: 2.12.5

Firmware is SailfishOS, not Android-based, but includes an Android-based compatibility layer called “AppSupport“. If you think this is an issue with the Android environment, I can report it with them too, but they tend to be rather slow in updating due to lack of staff…

Source

F-Droid

Format / File type

Not specific

Additional info / Log

Log on Markor 2.12.5:


09-24 19:55:37.871    13    13 E cutils  : Failed to mkdirat(/mnt/media_rw/8ff87de4-0b37-4799-b09a-82773e869e07/Android): Read-only file system
09-24 19:55:37.873  9179  9179 W ContextImpl: Failed to ensure /storage/8ff87de4-0b37-4799-b09a-82773e869e07/Android/data/net.gsantner.markor/files: android.os.ServiceSpecificException:  (code -30)
09-24 19:55:37.855   175   376 I chatty  : uid=1000(system) AlienService identical 2 lines
09-24 19:55:37.857   175   376 E AlienService: Failed to set drag resizing mode
09-24 19:55:37.906   175   226 W ActivityTaskManager: resizeTask not allowed on task=Task{e9ca8b #4175 visible=true type=standard mode=fullscreen translucent=false A=10039:de.danoeh.antennapod U=0 StackId=4175 sz=1}
09-24 19:55:37.907   175   226 W ActivityTaskManager: resizeTask not allowed on task=Task{60bcaae #4185 visible=true type=standard mode=fullscreen translucent=false A=1000:com.android.settings U=0 StackId=4185 sz=2}
09-24 19:55:38.022    13    13 E cutils  : Failed to mkdirat(/mnt/media_rw/8ff87de4-0b37-4799-b09a-82773e869e07/Android): Read-only file system
09-24 19:55:38.023  9179  9247 W ContextImpl: Failed to ensure /storage/8ff87de4-0b37-4799-b09a-82773e869e07/Android/data/net.gsantner.markor/files: android.os.ServiceSpecificException:  (code -30)
09-24 19:55:38.198  9179  9247 E AndroidRuntime: FATAL EXCEPTION: pool-2-thread-1
09-24 19:55:38.198  9179  9247 E AndroidRuntime: Process: net.gsantner.markor, PID: 9179
09-24 19:55:38.198  9179  9247 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference
09-24 19:55:38.198  9179  9247 E AndroidRuntime:        at net.gsantner.opoc.frontend.filebrowser.GsFileBrowserListAdapter.lambda$loadFolder$9(Unknown Source:330)
09-24 19:55:38.198  9179  9247 E AndroidRuntime:        at net.gsantner.opoc.frontend.filebrowser.GsFileBrowserListAdapter.$r8$lambda$TWVJW-w70YRy2cjUS49nudys7G4(SourceFile:0)
09-24 19:55:38.198  9179  9247 E AndroidRuntime:        at net.gsantner.opoc.frontend.filebrowser.GsFileBrowserListAdapter$$ExternalSyntheticLambda1.run(SourceFile:0)
09-24 19:55:38.198  9179  9247 E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
09-24 19:55:38.198  9179  9247 E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
09-24 19:55:38.198  9179  9247 E AndroidRuntime:        at java.lang.Thread.run(Thread.java:923)
09-24 19:55:37.908   175   226 I chatty  : uid=1000(system) android.display identical 1 line
09-24 19:55:37.909   175   226 W ActivityTaskManager: resizeTask not allowed on task=Task{60bcaae #4185 visible=true type=standard mode=fullscreen translucent=false A=1000:com.android.settings U=0 StackId=4185 sz=2}
09-24 19:55:38.209   175  9252 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
09-24 19:55:38.209   175   430 W ActivityTaskManager:   Force finishing activity net.gsantner.markor/.activity.MainActivity
09-24 19:55:38.259  9179  9247 I Process : Sending signal. PID: 9179 SIG: 9

Log on latest Nightly / Marder:

09-24 20:13:43.374    13    19 E cutils  : Failed to mkdirat(/mnt/media_rw/8ff87de4-0b37-4799-b09a-82773e869e07/Android): Read-only file system
09-24 20:13:43.375  9795  9795 W ContextImpl: Failed to ensure /storage/8ff87de4-0b37-4799-b09a-82773e869e07/Android/data/net.gsantner.markor_test/files: android.os.ServiceSpecificException:  (code -30)
09-24 20:13:43.465    13    19 E cutils  : Failed to mkdirat(/mnt/media_rw/8ff87de4-0b37-4799-b09a-82773e869e07/Android): Read-only file system
09-24 20:13:43.466  9795  9795 W ContextImpl: Failed to ensure /storage/8ff87de4-0b37-4799-b09a-82773e869e07/Android/data/net.gsantner.markor_test/files: android.os.ServiceSpecificException:  (code -30)
09-24 20:13:43.469  9795  9795 D AndroidRuntime: Shutting down VM
09-24 20:13:43.494  9795  9795 E AndroidRuntime: FATAL EXCEPTION: main
09-24 20:13:43.494  9795  9795 E AndroidRuntime: Process: net.gsantner.markor_test, PID: 9795
09-24 20:13:43.494  9795  9795 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getName()' on a null object reference
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at net.gsantner.opoc.frontend.filebrowser.GsFileBrowserListAdapter.getVirtualFolders(GsFileBrowserListAdapter.java:154)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at net.gsantner.opoc.frontend.filebrowser.GsFileBrowserListAdapter.<init>(GsFileBrowserListAdapter.java:138)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at net.gsantner.opoc.frontend.filebrowser.GsFileBrowserFragment.onViewCreated(GsFileBrowserFragment.java:125)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:2987)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:546)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:282)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2189)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2100)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.fragment.app.FragmentManager.execSingleAction(FragmentManager.java:1971)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.fragment.app.BackStackRecord.commitNow(BackStackRecord.java:305)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.viewpager2.adapter.FragmentStateAdapter.placeFragmentInViewHolder(FragmentStateAdapter.java:341)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.viewpager2.adapter.FragmentStateAdapter.onViewAttachedToWindow(FragmentStateAdapter.java:276)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.viewpager2.adapter.FragmentStateAdapter.onViewAttachedToWindow(FragmentStateAdapter.java:67)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.recyclerview.widget.RecyclerView.dispatchChildAttached(RecyclerView.java:7867)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.recyclerview.widget.RecyclerView$5.addView(RecyclerView.java:893)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.recyclerview.widget.ChildHelper.addView(ChildHelper.java:107)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.recyclerview.widget.RecyclerView$LayoutManager.addViewInt(RecyclerView.java:8902)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.recyclerview.widget.RecyclerView$LayoutManager.addView(RecyclerView.java:8860)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.recyclerview.widget.RecyclerView$LayoutManager.addView(RecyclerView.java:8848)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1645)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1591)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:668)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4309)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:4012)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4578)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.view.View.layout(View.java:22844)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.view.ViewGroup.layout(ViewGroup.java:6389)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at androidx.viewpager2.widget.ViewPager2.onLayout(ViewPager2.java:527)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.view.View.layout(View.java:22844)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.view.ViewGroup.layout(ViewGroup.java:6389)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.view.View.layout(View.java:22844)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.view.ViewGroup.layout(ViewGroup.java:6389)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.view.View.layout(View.java:22844)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.view.ViewGroup.layout(ViewGroup.java:6389)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.view.View.layout(View.java:22844)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.view.ViewGroup.layout(ViewGroup.java:6389)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.view.View.layout(View.java:22844)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.view.ViewGroup.layout(ViewGroup.java:6389)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.view.View.layout(View.java:22844)
09-24 20:13:43.494  9795  9795 E AndroidRuntime:        at android.view.ViewGroup.layout(ViewGroup.java:6389)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at com.android.internal.policy.DecorView.onLayout(DecorView.java:787)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at android.view.View.layout(View.java:22844)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at android.view.ViewGroup.layout(ViewGroup.java:6389)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3470)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2938)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1952)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8171)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at android.view.Choreographer.doCallbacks(Choreographer.java:796)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at android.view.Choreographer.doFrame(Choreographer.java:731)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:938)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:99)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:223)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:7656)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:599)
09-24 20:13:43.496  9795  9795 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
09-24 20:13:43.519   175  9870 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
09-24 20:13:43.521   175  4044 W ActivityTaskManager:   Force finishing activity net.gsantner.markor_test/net.gsantner.markor.activity.MainActivity
09-24 20:13:43.647  9795  9795 I Process : Sending signal. PID: 9795 SIG: 9
09-24 20:13:43.647   175   223 W Looper  : Slow dispatch took 107ms android.fg h=com.android.server.DropBoxManagerService$DropBoxManagerBroadcastHandler c=null m=1
09-24 20:13:43.682  9057  9071 W System  : A resource failed to call release. 
09-24 20:13:43.747    41    41 I Zygote  : Process 9795 exited due to signal 9 (Killed)
@gsantner
Copy link
Owner

Sorry but honest said, don't own such a device, don't know anyone locally owning one either and assume you are one of thery few using it there.

Feel free to make fixes/improvements by merge request however.

@ntninja
Copy link
Author

ntninja commented Sep 24, 2024

I see, any ideas given its a regression between 2.12.4 and 2.12.5?

@gsantner
Copy link
Owner

gsantner commented Sep 24, 2024 via email

@ntninja
Copy link
Author

ntninja commented Sep 28, 2024

@gsantner: Thank you for your reply! I tried the android-apk from https://github.com/gsantner/markor/actions/runs/11023272817 and it crashes as like the other Mardor version I tried unfortunately.

@ntninja
Copy link
Author

ntninja commented Sep 28, 2024

I also reported this to SFOS developers, but I doubt they’ll do anything about it unless I can pinpoint the exact issue here…

https://forum.sailfishos.org/t/markor-2-12-5-crashes-in-android-appsupport-while-2-12-4-worked/20145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants