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.ExceptionInInitializerError Caused by: java.lang.NullPointerException: in == null at java.util.Properties.load(Properties.java:246) #46

Closed
potyl opened this Issue May 11, 2015 · 4 comments

Comments

2 participants
@potyl

potyl commented May 11, 2015

I tried adding leak canary to our app and we get this crash:

java.lang.ExceptionInInitializerError
  at org.eclipse.mat.hprof.HprofIndexBuilder.fill(HprofIndexBuilder.java:54)
  at org.eclipse.mat.parser.internal.SnapshotFactory.parse(SnapshotFactory.java:193)
  at org.eclipse.mat.parser.internal.SnapshotFactory.openSnapshot(SnapshotFactory.java:106)
  at com.squareup.leakcanary.HeapAnalyzer.openSnapshot(HeapAnalyzer.java:134)
  at com.squareup.leakcanary.HeapAnalyzer.checkForLeak(HeapAnalyzer.java:87)
  at com.squareup.leakcanary.internal.HeapAnalyzerService.onHandleIntent(HeapAnalyzerService.java:56)
  at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
  at android.os.Handler.dispatchMessage(Handler.java:102)
  at android.os.Looper.loop(Looper.java:145)
  at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: java.lang.NullPointerException: in == null
  at java.util.Properties.load(Properties.java:246)
  at org.eclipse.mat.util.MessageUtil.(MessageUtil.java:28)
  at org.eclipse.mat.util.MessageUtil.(MessageUtil.java:13)
  ... 10 more
@pyricau

This comment has been minimized.

Member

pyricau commented May 11, 2015

Do you use Android Studio or Eclipse?

@potyl

This comment has been minimized.

potyl commented May 11, 2015

Android Studio with gradle (and proguad)

@pyricau

This comment has been minimized.

Member

pyricau commented May 11, 2015

The resource file is not available in the classpath. Not sure why. We could change HAHA to just use class constants, that properties file isn't really worth anything. In the meantime, it's probably something specific about your gradle conf that prevents picking up those properties files.

@potyl

This comment has been minimized.

potyl commented May 11, 2015

Thanks for the pointer, I'll try to see if our gradle conf is doing something odd with the resource file.

pyricau added a commit that referenced this issue May 12, 2015

Update to HAHA 1.2
* HAHA 1.2 has no .properties resource file which should fix #46

@pyricau pyricau closed this in #59 May 12, 2015

Yky pushed a commit to Yky/leakcanary that referenced this issue Feb 21, 2016

Update to HAHA 1.2
* HAHA 1.2 has no .properties resource file which should fix square#46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment