hirenpatel20283 / acra

Automatically exported from code.google.com/p/acra
0 stars 0 forks source link

NullPointerException during ACRA init #138

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I just don't know the way to reproduce the problem. A user has sent me logcat 
of my app crash, which turned to be caused by ACRA 4.2. Here is the logs:

2012-08-16 02:17:51.342 E 10797/ACRA: Error while retrieving crash data
java.lang.NullPointerException
at org.acra.ConfigurationInspector.toString(SourceFile:129)
at org.acra.ErrorReporter.handleException(SourceFile:722)
at org.acra.ErrorReporter.uncaughtException(SourceFile:622)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:854)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:851)
at dalvik.system.NativeStart.main(Native Method)

2012-08-16 02:17:51.352 D 10797/ACRA: Writing crash report file.
2012-08-16 02:17:51.402 E 10797/ACRA: An error occured while writing the report 
file...
java.lang.NullPointerException
at org.acra.CrashReportData.dumpString(SourceFile:94)
at org.acra.CrashReportData.store(SourceFile:546)
at org.acra.ErrorReporter.saveCrashReportFile(SourceFile:891)
at org.acra.ErrorReporter.handleException(SourceFile:740)
at org.acra.ErrorReporter.uncaughtException(SourceFile:622)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:854)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:851)
at dalvik.system.NativeStart.main(Native Method)

********************* The following is the failure during init! 
***********************
2012-08-16 02:17:55.422 E 10797/ACRA: AnyBalance fatal error : Unable to create 
application com.dukei.android.apps.anybalance.AnyBalanceApplication: 
java.lang.NullPointerException
java.lang.RuntimeException: Unable to create application 
com.dukei.android.apps.anybalance.AnyBalanceApplication: 
java.lang.NullPointerException
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3293)
at android.app.ActivityThread.access$2200(ActivityThread.java:121)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:981)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3701)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at org.acra.ConfigurationInspector.toString(SourceFile:129)
at org.acra.ErrorReporter.init(SourceFile:363)
at org.acra.ACRA.initAcra(SourceFile:297)
at org.acra.ACRA.init(SourceFile:238)
at 
com.dukei.android.apps.anybalance.AnyBalanceApplication.onCreate(SourceFile:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:969)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3290)

It seems to be caused by device configuration. Here is the device stats:

build.board=es209ra
build.brand=SEMC
build.cpu_abi=armeabi-v7a
build.device=X10S
build.display=Champ-Tof37-Wo88les-X10-S-V9
build.fingerprint=google/passion/passion:2.3.3/GRI40/102588:user/release-keys
build.host=SEMCHost
build.id=3.0.1.G.0.75
build.manufacturer=Sony Ericsson
build.model=X10S
build.product=X10i_1241-1846
build.tags=release-keys
build.time=1308515086000
build.type=user
build.user=SEMCUser
version.codename=REL
version.incremental=tB_P
version.release=2.3.4
version.sdk_int=10

Original issue reported on code.google.com by dmitry.k...@gmail.com on 15 Aug 2012 at 8:50

GoogleCodeExporter commented 8 years ago
I have the same issue on an acer phone

build.board: March
build.bootloader: unknown
build.brand: Acer
build.cpu_abi: armeabi-v7a
build.cpu_abi2: armeabi
build.device: C8
build.display: Acer_AV041_E350_1.000.08_EMEA_FR
build.fingerprint: Acer/C8_EMEA_FR/C8:4.0.3/IML74K/1343642573:user/release-keys
build.hardware: mt6575
build.host: rj2-yhl
build.id: IML74K
build.manufacturer: Acer
build.model: E350
build.product: C8_EMEA_FR
build.radio: Brand_BaseOS_ModemBSPVersion_Model_M.mmm.cc
build.serial: VWZPYDBM4SJRMR6T
build.tags: release-keys
build.time: 1343642677000
build.type: user
build.user: yhl
version.codename: REL
version.incremental: eng.yhl.1343642573
version.release: 4.0.3
version.sdk_int: 15

Original comment by yann.bia...@gmail.com on 13 Sep 2012 at 7:42

GoogleCodeExporter commented 8 years ago
Same problem here (very serious, as app crashes at startup).

The device where it occurs is the same as in Yann's occurence: ACER E350, 
running Android 4.0.3

Full logcat for information:

10-08 19:24:49.312 26121 26138 E ACRA    : Failed to send crash report for 
1349652154000-approved.stacktrace
10-08 19:24:49.312 26121 26138 E ACRA    : org.acra.b.f: Error while sending 
report to Google Form.
10-08 19:24:49.312 26121 26138 E ACRA    :  at org.acra.b.b.a(SourceFile:64)
10-08 19:24:49.312 26121 26138 E ACRA    :  at 
org.acra.ErrorReporter.a(SourceFile:850)
10-08 19:24:49.312 26121 26138 E ACRA    :  at 
org.acra.ErrorReporter.a(SourceFile:960)
10-08 19:24:49.312 26121 26138 E ACRA    :  at org.acra.n.run(SourceFile:142)
10-08 19:24:49.312 26121 26138 E ACRA    : Caused by: 
java.net.SocketTimeoutException: Read timed out
10-08 19:24:49.312 26121 26138 E ACRA    :  at 
org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_read(Native Method)
10-08 19:24:49.312 26121 26138 E ACRA    :  at 
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.read(Open
SSLSocketImpl.java:671)
10-08 19:24:49.312 26121 26138 E ACRA    :  at 
org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInp
utBuffer.java:103)
10-08 19:24:49.312 26121 26138 E ACRA    :  at 
org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInput
Buffer.java:191)
10-08 19:24:49.312 26121 26138 E ACRA    :  at 
org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.
java:82)
10-08 19:24:49.312 26121 26138 E ACRA    :  at 
org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:1
74)
10-08 19:24:49.312 26121 26138 E ACRA    :  at 
org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(Abstract
HttpClientConnection.java:180)
10-08 19:24:49.312 26121 26138 E ACRA    :  at 
org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultC
lientConnection.java:235)
10-08 19:24:49.312 26121 26138 E ACRA    :  at 
org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(Abstra
ctClientConnAdapter.java:259)
10-08 19:24:49.312 26121 26138 E ACRA    :  at 
org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecut
or.java:279)
10-08 19:24:49.312 26121 26138 E ACRA    :  at 
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:12
1)
10-08 19:24:49.312 26121 26138 E ACRA    :  at 
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirecto
r.java:428)
10-08 19:24:49.312 26121 26138 E ACRA    :  at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:5
55)
10-08 19:24:49.312 26121 26138 E ACRA    :  at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:4
87)
10-08 19:24:49.312 26121 26138 E ACRA    :  at org.acra.c.d.a(SourceFile:59)
10-08 19:24:49.312 26121 26138 E ACRA    :  at org.acra.b.b.a(SourceFile:62)
10-08 19:24:49.312 26121 26138 E ACRA    :  ... 3 more
10-08 19:24:49.312 26121 26138 D ACRA    : #checkAndSendReports - finish
10-08 19:24:49.319 26121 26121 D stk     : text=Classic Words Free
10-08 19:24:49.321 26121 26121 E ACRA    : Classic Words Free fatal error : 
Unable to create application 
com.lulo.scrabble.classicwords.MyApplicationForACRA: 
java.lang.NullPointerException
10-08 19:24:49.321 26121 26121 E ACRA    : java.lang.RuntimeException: Unable 
to create application com.lulo.scrabble.classicwords.MyApplicationForACRA: 
java.lang.NullPointerException
10-08 19:24:49.321 26121 26121 E ACRA    :  at 
android.app.ActivityThread.handleBindApplication(ActivityThread.java:4013)
10-08 19:24:49.321 26121 26121 E ACRA    :  at 
android.app.ActivityThread.access$1300(ActivityThread.java:127)
10-08 19:24:49.321 26121 26121 E ACRA    :  at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1214)
10-08 19:24:49.321 26121 26121 E ACRA    :  at 
android.os.Handler.dispatchMessage(Handler.java:99)
10-08 19:24:49.321 26121 26121 E ACRA    :  at 
android.os.Looper.loop(Looper.java:137)
10-08 19:24:49.321 26121 26121 E ACRA    :  at 
android.app.ActivityThread.main(ActivityThread.java:4524)
10-08 19:24:49.321 26121 26121 E ACRA    :  at 
java.lang.reflect.Method.invokeNative(Native Method)
10-08 19:24:49.321 26121 26121 E ACRA    :  at 
java.lang.reflect.Method.invoke(Method.java:511)
10-08 19:24:49.321 26121 26121 E ACRA    :  at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
10-08 19:24:49.321 26121 26121 E ACRA    :  at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
10-08 19:24:49.321 26121 26121 E ACRA    :  at 
dalvik.system.NativeStart.main(Native Method)
10-08 19:24:49.321 26121 26121 E ACRA    : Caused by: 
java.lang.NullPointerException
at org.acra.ConfigurationInspector.toString(SourceFile:129)
at org.acra.ErrorReporter.init(SourceFile:363)
at org.acra.ACRA.initAcra(SourceFile:297)
at org.acra.ACRA.init(SourceFile:238)
at com.lulo.scrabble.classicwords.MyApplicationForACRA.onCreate(SourceFile:67)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:969)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4010)

Original comment by daseba...@gmail.com on 8 Oct 2012 at 5:48

GoogleCodeExporter commented 8 years ago
It it can help to put a +1, just reporting that I face such (scarce) exception, 
with ACRA v4.3...

"""
Caused by: java.lang.NullPointerException
at org.acra.ConfigurationInspector.toString(ConfigurationInspector.java:129)
at org.acra.ErrorReporter.init(ErrorReporter.java:363)
at org.acra.ACRA.initAcra(ACRA.java:297)
at org.acra.ACRA.init(ACRA.java:238)
"""

Original comment by the.edou...@gmail.com on 11 Oct 2012 at 8:34

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Maybe it's a dumb question, but can I prevent my app to crash at startup by 
surrounding ACRA.init() by try + catch ?

Original comment by daseba...@gmail.com on 11 Oct 2012 at 9:34

GoogleCodeExporter commented 8 years ago

Original comment by kevin.gaudin on 11 Oct 2012 at 10:09

GoogleCodeExporter commented 8 years ago
This should be fixed in this snapshot release:
https://oss.sonatype.org/content/groups/public/ch/acra/acra/4.3.1-SNAPSHOT/acra-
4.3.1-20121013.120720-2.jar

Original comment by kevin.gaudin on 13 Oct 2012 at 12:11

GoogleCodeExporter commented 8 years ago
Delivered in v4.3.1: https://github.com/downloads/ACRA/acra/acra-4.3.1.zip

Original comment by kevin.gaudin on 16 Oct 2012 at 9:15

GoogleCodeExporter commented 8 years ago
Thank you.

Original comment by mcoll...@gmail.com on 19 Feb 2013 at 1:53