-
Notifications
You must be signed in to change notification settings - Fork 82
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
ava.lang.NullPointerException: Attempt to invoke virtual method 'void com.ramijemli.percentagechartview.renderer.BaseModeRenderer.setProgress(float, boolean)' on a null object reference #27
Comments
I have almost the same issue, except it crashes with the following error:
|
Same problem here: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.ramijemli.percentagechartview.renderer.BaseModeRenderer.setProgress(float, boolean)' on a null object reference I was not able to simulate error, but I got it in the crash report. |
@BorisLegovic all you have to do is turn your phone a few times and you'll see that npe thrown. |
I'm handling on resume so this shouldn't be thrown. |
I solved this error by importing library manually in the app, and then running the app. This is occurred because of
When the View is detached from Window, renderer object is destroyed. And this happens when you lock the device or when the view is basically detached. I solved it by commenting the renderer part in |
Hi. I also have problem in adding library to project manually. So I can't use the solution given by "vedprakashwagh". Thanks in advance. |
Yes, I am experiencing this same issue. And @vedprakashwagh is right about the cause of the problem, I had the same conclusion |
I faced this problem too. However, I have used it in bottom sheet dialog. So, I remove whole the view with binding.root.removeAllViews() in onDismiss(). Keep in mind. |
For me the stacktrace was in
My activity don't really need to save state, it's rotation is locked anyways, so I've used |
I was facing same issue in stack trace it was clear that it is coming in onDestroyView so instead i download library code i extend PercentageChartView and override method
|
Hi thanks |
Using a progressbar if I rotate the screen a few times or try to reload a few times eventually the library crashes with
Process: com.phpni.member_android, PID: 6451
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.ramijemli.percentagechartview.renderer.BaseModeRenderer.setProgress(float, boolean)' on a null object reference
at com.ramijemli.percentagechartview.PercentageChartView.setProgress(PercentageChartView.java:421)
The text was updated successfully, but these errors were encountered: