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

[Bug]: debug apk startup crash!!!!! #1809

Open
3 tasks done
docwei2050 opened this issue Jan 14, 2025 · 2 comments
Open
3 tasks done

[Bug]: debug apk startup crash!!!!! #1809

docwei2050 opened this issue Jan 14, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@docwei2050
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Is there a StackOverflow question about this issue?

  • I have searched StackOverflow

What happened?

  Caused by: android.os.strictmode.DiskReadViolation
                                                                                                	at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1707)
                                                                                                	at libcore.io.BlockGuardOs.access(BlockGuardOs.java:74)
                                                                                                	at libcore.io.ForwardingOs.access(ForwardingOs.java:128)
                                                                                                	at android.app.ActivityThread$AndroidOs.access(ActivityThread.java:10127)
                                                                                                	at java.io.UnixFileSystem.checkAccess(UnixFileSystem.java:332)
                                                                                                	at java.io.File.exists(File.java:829)
                                                                                                	at android.graphics.fonts.HwTypefaceEx.isUsingOnlineVariableFont(HwTypefaceEx.java:570)
                                                                                                	at android.graphics.fonts.HwTypefaceEx.isSupportFontWeightVariable(HwTypefaceEx.java:486)
                                                                                                	at android.graphics.fonts.SystemFonts.loadHwSystemFonts(SystemFonts.java:610)
                                                                                                	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:8958)
                                                                                                	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
                                                                                                	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:3084)
                                                                                                	at android.os.Handler.dispatchMessage(Handler.java:118)
                                                                                                	at android.os.Looper.loopOnce(Looper.java:237) 
                                                                                                	at android.os.Looper.loop(Looper.java:325) 
                                                                                                	at android.app.ActivityThread.main(ActivityThread.java:10305) 
                                                                                                	at java.lang.reflect.Method.invoke(Native Method) 
                                                                                                	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:635) 
                                                                                                	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:957) 

Relevant logcat output

2025-01-15 09:29:55.760 19315-19315 AndroidRuntime          com....apps.nowinandroid.demo.debug  E  FATAL EXCEPTION: main
                                                                                                    Process: com.google.samples.apps.nowinandroid.demo.debug, PID: 19315
                                                                                                    java.lang.RuntimeException: StrictMode ThreadPolicy violation
                                                                                                    	at android.os.StrictMode$AndroidBlockGuardPolicy.onThreadPolicyViolation(StrictMode.java:1924)
                                                                                                    	at android.os.StrictMode$AndroidBlockGuardPolicy.lambda$handleViolationWithTimingAttempt$0(StrictMode.java:1838)
                                                                                                    	at android.os.StrictMode$AndroidBlockGuardPolicy.$r8$lambda$8cEr3yopH2m54_yi5FS7GfNsTW0(Unknown Source:0)
                                                                                                    	at android.os.StrictMode$AndroidBlockGuardPolicy$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:997)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:111)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:237)
                                                                                                    	at android.os.Looper.loop(Looper.java:325)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:10305)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:635)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:957)
                                                                                                    Caused by: android.os.strictmode.DiskReadViolation
                                                                                                    	at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1707)
                                                                                                    	at libcore.io.BlockGuardOs.access(BlockGuardOs.java:74)
                                                                                                    	at libcore.io.ForwardingOs.access(ForwardingOs.java:128)
                                                                                                    	at android.app.ActivityThread$AndroidOs.access(ActivityThread.java:10127)
                                                                                                    	at java.io.UnixFileSystem.checkAccess(UnixFileSystem.java:332)
                                                                                                    	at java.io.File.exists(File.java:829)
                                                                                                    	at android.graphics.fonts.HwTypefaceEx.isUsingOnlineVariableFont(HwTypefaceEx.java:570)
                                                                                                    	at android.graphics.fonts.HwTypefaceEx.isSupportFontWeightVariable(HwTypefaceEx.java:486)
                                                                                                    	at android.graphics.fonts.SystemFonts.loadHwSystemFonts(SystemFonts.java:610)
                                                                                                    	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:8958)
                                                                                                    	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:3084)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:118)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:237) 
                                                                                                    	at android.os.Looper.loop(Looper.java:325) 
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:10305) 
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method) 
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:635) 
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:957) 

Code of Conduct

  • I agree to follow this project's Code of Conduct
@docwei2050 docwei2050 added the bug Something isn't working label Jan 14, 2025
@Jaehwa-Noh
Copy link
Contributor

Related with #1788

@karanatwal
Copy link

In my Samsung S20+ Android 14 I fixed the crash by commenting setStrictModePolicy function used inside NiaApplication.kt file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants