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

Crash When changing min and max hours #291

Open
MurugeshwaranM opened this issue Sep 15, 2022 · 0 comments
Open

Crash When changing min and max hours #291

MurugeshwaranM opened this issue Sep 15, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@MurugeshwaranM
Copy link

Changing min and max hours
In the project I am working min and max hours will be changing depends on the day. Let say on Monday the min hour is 8 and max hour is 20 and on Tuesday the min hour is 7 and max hour is 19. My calendar mode is day view, when I scroll from Monday to Tuesday the app crashes and it shows the below error.

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.text.StaticLayout.draw(android.graphics.Canvas)' on a null object reference at com.alamkanak.weekview.TimeColumnRenderer$render$1$1.invoke(TimeColumnRenderer.kt:58) at com.alamkanak.weekview.TimeColumnRenderer$render$1$1.invoke(TimeColumnRenderer.kt:7) at com.alamkanak.weekview.CanvasExtensionsKt.withTranslation(CanvasExtensions.kt:11) at com.alamkanak.weekview.TimeColumnRenderer.render(TimeColumnRenderer.kt:57) at com.alamkanak.weekview.WeekView.performRendering(WeekView.kt:132) at com.alamkanak.weekview.WeekView.onDraw(WeekView.kt:106) at android.view.View.draw(View.java:23898) at android.view.View.buildDrawingCacheImpl(View.java:23164) at android.view.View.buildDrawingCache(View.java:23024) at android.view.View.updateDisplayListIfDirty(View.java:22735) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:5339) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:5311) at android.view.View.updateDisplayListIfDirty(View.java:22714) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:5339) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:5311) at android.view.View.updateDisplayListIfDirty(View.java:22714) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:5339) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:5311) at android.view.View.updateDisplayListIfDirty(View.java:22714) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:5339) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:5311) at android.view.View.updateDisplayListIfDirty(View.java:22714) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:5339) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:5311) at android.view.View.updateDisplayListIfDirty(View.java:22714) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:5339) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:5311) at android.view.View.updateDisplayListIfDirty(View.java:22714) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:5339) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:5311) at android.view.View.updateDisplayListIfDirty(View.java:22714) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:5339) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:5311) at android.view.View.updateDisplayListIfDirty(View.java:22714) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:602) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:608) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:684) at android.view.ViewRootImpl.draw(ViewRootImpl.java:5432) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:5140) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:4204) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2911) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10458) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1108) at android.view.Choreographer.doCallbacks(Choreographer.java:866) at android.view.Choreographer.doFrame(Choreographer.java:797) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1092) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8663) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

Additional context

  • Android version: 12
  • WeekView version: 5.3.2
@MurugeshwaranM MurugeshwaranM added the bug Something isn't working label Sep 15, 2022
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

1 participant