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.InternalError: Thread starting during runtime shutdown. Still exists in 4.7 #332

Closed
xmenxwk opened this issue Dec 2, 2015 · 13 comments

Comments

@xmenxwk
Copy link

xmenxwk commented Dec 2, 2015

The problem exists in acra4.7, Android 5.1.1. Device D5803.

java.lang.InternalError: Thread starting during runtime shutdown
at java.lang.Thread.nativeCreate(Native Method)
at java.lang.Thread.start(Thread.java:1063)
at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:920)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1336)
at com.android.okhttp.ConnectionPool.scheduleCleanupAsRequired(ConnectionPool.java:367)
at com.android.okhttp.ConnectionPool.get(ConnectionPool.java:265)
at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:109)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:272)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:382)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:106)
at org.acra.util.HttpRequest.send(SourceFile:123)
at org.acra.sender.HttpSender.send(SourceFile:245)
at org.acra.SendWorker.sendCrashReport(SourceFile:181)
at org.acra.SendWorker.checkAndSendReports(SourceFile:140)
at org.acra.SendWorker.run(SourceFile:76)

@william-ferguson-au
Copy link
Member

Yes, see #313.
OkHttp is non-deterministic about whether it will start a Thread or not. If OkHttp has been used by something within the app prior to the crash, then it might work. If it doesn't then it should send the crash when the app restarts.

One solution that has been proposed is #329
The other is to only send crash reports at app start.

@xmenxwk
Copy link
Author

xmenxwk commented Dec 2, 2015

but #329 is not merged yet.

@william-ferguson-au
Copy link
Member

THat is correct.

\until that time you you avoid the issue by setting sendReportsAtShutdown == false.

@xmenxwk
Copy link
Author

xmenxwk commented Dec 3, 2015

Can it possible that acra first try to report while shutting down, if fails, send on start ? I think acra already doing this. If this is already happening, then I should stick to it. Because this error happens on very little number of devices.

@william-ferguson-au
Copy link
Member

Yes, I believe this is what will happen.

@xmenxwk
Copy link
Author

xmenxwk commented Dec 6, 2015

yes except the app crashes when this InternalError is thrown. I think a try..catch will fix the problem :)

@PaulWoitaschek
Copy link

Same problem here.

I think this is very critical. I have a lot of users which can't start my app because of this. It would be great if a fix could be merged quickly.

@william-ferguson-au
Copy link
Member

How are users unable to start your app for a crash which might happen on shutdown?

@PaulWoitaschek
Copy link

I don't know. I just have lots of crash reports in play store where people are reporting for example

Won't load

or

Crashes on startup

Maybe there is another crash that makes the app shutdown but while crashing this crashes again? Is that possible?

@william-ferguson-au
Copy link
Member

That is possible.

@ghost
Copy link

ghost commented Dec 17, 2015

Today,i just try ACRA. and i got same error. on my application the error just from

Double.parseDouble("xyz");

12-17 16:10:53.420  24543-24543/com.xxx.testacra E/ACRA﹕ ACRA caught a NumberFormatException for com.xxx.testacra
    java.lang.NumberFormatException: Invalid double: "xyz"
            at java.lang.StringToReal.invalidReal(StringToReal.java:63)
            at java.lang.StringToReal.initialParse(StringToReal.java:164)
            at java.lang.StringToReal.parseDouble(StringToReal.java:282)
            at java.lang.Double.parseDouble(Double.java:301)
            at com.xxx.testacra.MainActivity$1.onClick(MainActivity.java:22)
            at android.view.View.performClick(View.java:5076)
            at android.view.View$PerformClick.run(View.java:20279)
            at android.os.Handler.handleCallback(Handler.java:739)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5910)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
12-17 16:10:53.490  24543-24543/com.xxx.testacra E/ACRA﹕ Not adding buildConfig to log. Class Not found : com.xxx.testacra.application.BuildConfig. Please configure 'buildConfigClass' in your ACRA config
12-17 16:10:53.590  24543-25150/? E/ACRA﹕ ACRA caught a InternalError for com.xxx.testacra
    java.lang.InternalError: Thread starting during runtime shutdown
            at java.lang.Thread.nativeCreate(Native Method)
            at java.lang.Thread.start(Thread.java:1063)
            at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:920)
            at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1336)
            at com.android.okhttp.ConnectionPool.scheduleCleanupAsRequired(ConnectionPool.java:366)
            at com.android.okhttp.ConnectionPool.get(ConnectionPool.java:268)
            at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:109)
            at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:370)
            at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:298)
            at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:399)
            at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:110)
            at org.acra.util.HttpRequest.send(HttpRequest.java:122)
            at org.acra.sender.HttpSender.send(HttpSender.java:245)
            at org.acra.SendWorker.sendCrashReport(SendWorker.java:181)
            at org.acra.SendWorker.checkAndSendReports(SendWorker.java:140)
            at org.acra.SendWorker.run(SendWorker.java:76)
12-17 16:10:53.620  24543-25150/? E/ACRA﹕ Not adding buildConfig to log. Class Not found : com.xxx.testacra.application.BuildConfig. Please configure 'buildConfigClass' in your ACRA config
12-17 16:10:53.650  24543-25150/? E/AndroidRuntime﹕ FATAL EXCEPTION: Thread-3095
    Process: com.xxx.testacra, PID: 24543
    java.lang.InternalError: Thread starting during runtime shutdown
            at java.lang.Thread.nativeCreate(Native Method)
            at java.lang.Thread.start(Thread.java:1063)
            at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:920)
            at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1336)
            at com.android.okhttp.ConnectionPool.scheduleCleanupAsRequired(ConnectionPool.java:366)
            at com.android.okhttp.ConnectionPool.get(ConnectionPool.java:268)
            at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:109)
            at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:370)
            at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:298)
            at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:399)
            at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:110)
            at org.acra.util.HttpRequest.send(HttpRequest.java:122)
            at org.acra.sender.HttpSender.send(HttpSender.java:245)
            at org.acra.SendWorker.sendCrashReport(SendWorker.java:181)
            at org.acra.SendWorker.checkAndSendReports(SendWorker.java:140)
            at org.acra.SendWorker.run(SendWorker.java:76)

@william-ferguson-au
Copy link
Member

NB this is being worked in #329

@william-ferguson-au
Copy link
Member

This has been resolved with #344

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants