Reputation: 1819
I have searched for many answer on this site for this error code.But none of them really helped :(
In my context, my activity has a webview which will load news content( article) from somewhere on the internet.
After moving to other screens several times, I got that signal
before my app got crashed.
No other information from stack trace that seems to be helpful in this case. Fatal signal 11 (SIGSEGV) at 0x00000200 (code=1)
Anyone has experienced this problem before? Any clue is appreciated.
Upvotes: 1
Views: 5417
Reputation: 12847
SIGSEV faults occur when memory is corrupt.
There are a huge number of reasons why the memory block you are addressing is corrupt. It could be faulty hardware or most likely faulty code
2 things to do to track down the issue
1) Try your code on a different device (or emulator) WITH THE SAME OS VERSION. If all is good then you know you have a hardware issue.
2) Track down the line of code that is causing the problem using Log.d statements littered throughout the activity that is crashing and carefully inspect your log cat output to see haw far your code gets.
Use "@@@@" in your log.d message e.g. Log.d("TAG", "@@@@ onCreate 1");
to make your log messages stand out from the rest of the garbage that gets spewed out into a log.
Once you have been able to track down the line of code that is causing the problem then take a long hard look at the variables used within that line to make sure they are not null as this will be the most likely cause.
Also ensure that all threads have been safely terminated in onPause or onDestroy events (web page loading, async tasks etc...) and make sure that any call backs methods that you trigger are checked to not be null before calling them.
Upvotes: 2
Reputation: 3491
I had a same issue before. In my case, it's usually happen when user leaves the screen or exit app while the web view is still loading, but you know, web view loads URL on a different thread, so after loaded content, it cannot render content on GUI and the reason is the context of web view (activity) has been destroyed.
To avoid this exception, you should check if web view is loading content then stop it in onPause() method by calling mWebView.stopLoading().
Hopefully this will help you.
Upvotes: 1