Font loading issue #9

Closed
opened 2022-07-24 08:47:20 +00:00 by AmineB · 1 comment
Owner

For some reason, font won't load on some devices.

The resource ID is wrong, and an exception is thrown.

Maybe display some dialog that warn the user that if the font is wrong, there is something blocking the font download ? (but display it once)

java.lang.Throwable: Font loading issue: Resource ID #0x1
	at apps.amine.bou.readerforselfoss.fragments.ArticleFragment.a(ArticleFragment.kt:133)
	at androidx.fragment.app.c.b(Fragment.java:2439)
	at androidx.fragment.app.i.a(FragmentManager.java:1460)
	at androidx.fragment.app.i.f(FragmentManager.java:1784)
	at androidx.fragment.app.i.a(FragmentManager.java:1852)
	at androidx.fragment.app.a.f(BackStackRecord.java:802)
	at androidx.fragment.app.i.b(FragmentManager.java:2625)
	at androidx.fragment.app.i.a(FragmentManager.java:2411)
	at androidx.fragment.app.i.b(FragmentManager.java:2366)
	at androidx.fragment.app.i.b(FragmentManager.java:2243)
	at androidx.fragment.app.a.e(BackStackRecord.java:654)
	at androidx.fragment.app.m.b(FragmentStatePagerAdapter.java:168)
	at androidx.viewpager.widget.ViewPager.a(ViewPager.java:1244)
	at androidx.viewpager.widget.ViewPager.d(ViewPager.java:1092)
	at androidx.viewpager.widget.ViewPager.onMeasure(ViewPager.java:1622)
	at android.view.View.measure(View.java:19881)
	at androidx.constraintlayout.widget.ConstraintLayout.a(ConstraintLayout.java:1248)
	at androidx.constraintlayout.widget.ConstraintLayout.onMeasure(ConstraintLayout.java:1593)
	at android.view.View.measure(View.java:19881)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6083)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
	at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:143)
	at android.view.View.measure(View.java:19881)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6083)
	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)
	at android.widget.LinearLayout.measureVertical(LinearLayout.java:758)
	at android.widget.LinearLayout.onMeasure(LinearLayout.java:640)
	at android.view.View.measure(View.java:19881)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6083)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
	at android.view.View.measure(View.java:19881)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6083)
	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)
	at android.widget.LinearLayout.measureVertical(LinearLayout.java:758)
	at android.widget.LinearLayout.onMeasure(LinearLayout.java:640)
	at android.view.View.measure(View.java:19881)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6083)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
	at com.android.internal.policy.DecorView.onMeasure(DecorView.java:694)
	at android.view.View.measure(View.java:19881)
	at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2275)
	at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1366)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1619)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6344)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
	at android.view.Choreographer.doCallbacks(Choreographer.java:686)
	at android.view.Choreographer.doFrame(Choreographer.java:621)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
	at android.os.Handler.handleCallback(Handler.java:751)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:154)
	at android.app.ActivityThread.main(ActivityThread.java:6236)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)\n
For some reason, font won't load on some devices. The resource ID is wrong, and an exception is thrown. Maybe display some dialog that warn the user that if the font is wrong, there is something blocking the font download ? (but display it once) ``` java.lang.Throwable: Font loading issue: Resource ID #0x1 at apps.amine.bou.readerforselfoss.fragments.ArticleFragment.a(ArticleFragment.kt:133) at androidx.fragment.app.c.b(Fragment.java:2439) at androidx.fragment.app.i.a(FragmentManager.java:1460) at androidx.fragment.app.i.f(FragmentManager.java:1784) at androidx.fragment.app.i.a(FragmentManager.java:1852) at androidx.fragment.app.a.f(BackStackRecord.java:802) at androidx.fragment.app.i.b(FragmentManager.java:2625) at androidx.fragment.app.i.a(FragmentManager.java:2411) at androidx.fragment.app.i.b(FragmentManager.java:2366) at androidx.fragment.app.i.b(FragmentManager.java:2243) at androidx.fragment.app.a.e(BackStackRecord.java:654) at androidx.fragment.app.m.b(FragmentStatePagerAdapter.java:168) at androidx.viewpager.widget.ViewPager.a(ViewPager.java:1244) at androidx.viewpager.widget.ViewPager.d(ViewPager.java:1092) at androidx.viewpager.widget.ViewPager.onMeasure(ViewPager.java:1622) at android.view.View.measure(View.java:19881) at androidx.constraintlayout.widget.ConstraintLayout.a(ConstraintLayout.java:1248) at androidx.constraintlayout.widget.ConstraintLayout.onMeasure(ConstraintLayout.java:1593) at android.view.View.measure(View.java:19881) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6083) at android.widget.FrameLayout.onMeasure(FrameLayout.java:185) at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:143) at android.view.View.measure(View.java:19881) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6083) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464) at android.widget.LinearLayout.measureVertical(LinearLayout.java:758) at android.widget.LinearLayout.onMeasure(LinearLayout.java:640) at android.view.View.measure(View.java:19881) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6083) at android.widget.FrameLayout.onMeasure(FrameLayout.java:185) at android.view.View.measure(View.java:19881) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6083) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464) at android.widget.LinearLayout.measureVertical(LinearLayout.java:758) at android.widget.LinearLayout.onMeasure(LinearLayout.java:640) at android.view.View.measure(View.java:19881) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6083) at android.widget.FrameLayout.onMeasure(FrameLayout.java:185) at com.android.internal.policy.DecorView.onMeasure(DecorView.java:694) at android.view.View.measure(View.java:19881) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2275) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1366) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1619) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6344) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874) at android.view.Choreographer.doCallbacks(Choreographer.java:686) at android.view.Choreographer.doFrame(Choreographer.java:621) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6236) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)\n ```
AmineB added this to the Version 2 milestone 2022-09-13 14:37:52 +00:00
AmineB modified the milestone from Version 2 to A little better 2022-09-13 14:37:59 +00:00
AmineB added this to the Dev project 2022-11-02 19:07:54 +00:00
Author
Owner

This is now working.

This is now working.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Louvorg/ReaderForSelfoss-multiplatform#9
No description provided.