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

java.lang.RuntimeException: Unable to start activity ComponentInfo{nl.hnogames.domoticz/nl.hnogames.domoticz.PlanActivity}: java.lang.NullPointerException #154

Closed
galadril opened this issue Dec 30, 2015 · 2 comments

Comments

@galadril
Copy link
Owner

java.lang.RuntimeException: Unable to start activity ComponentInfo{nl.hnogames.domoticz/nl.hnogames.domoticz.PlanActivity}: java.lang.NullPointerException
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2118)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2145)
    at android.app.ActivityThread.access$600(ActivityThread.java:130)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1211)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:4847)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:535)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
    at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
    at nl.hnogames.domoticz.PlanActivity.onCreate(PlanActivity.java:40)
    at android.app.Activity.performCreate(Activity.java:5187)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)
    ... 11 more
@galadril
Copy link
Owner Author

Same happens sometimes for the CameraActivity:

java.lang.RuntimeException: Unable to start activity ComponentInfo{nl.hnogames.domoticz/nl.hnogames.domoticz.CameraActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2118)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2145)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1211)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4847)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:535)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at nl.hnogames.domoticz.CameraActivity.onCreate(CameraActivity.java:42)
at android.app.Activity.performCreate(Activity.java:5187)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)
... 11 more

@galadril galadril added the bug label Dec 30, 2015
@RoadXY
Copy link
Contributor

RoadXY commented Dec 30, 2015

Line 40 of PlanActivity is:
String selectedPlan = bundle.getString("PLANNAME");
In the onCreate method.

Looks like the bundle is empty.
The same for CameraActivity.

Check and if null end the activity?

galadril added a commit that referenced this issue Dec 31, 2015
#154 NullPointer exception on PlanActivity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants