23

Today I faced an error due to which my Android application is getting by SIGNAL 11.

This error usually occurs due to unauthorized memory area access by Android internal storage. Some of the possible scenarios are web access, network communication, server image downloading and such. Mine was the case of browser load url!

http://bootloader.wikidot.com/linux:android:crashlog

I need to launch the browser after a QR code scan.

Application was keep on scanning and launching the browser fluently but the issue occurs after 15-20 attempts of same steps..

I researched a lot and found that its the MEMORY ERROR which occurs in Android Native libraries.. usually when an unknown memory area is tried to access by the android internal storage system.

Finally I revealed that when I saw my application memory usage in the Android application setting section, i found that the cache has been reached to 10 MB..

Rohit Mandiwal
  • 10,258
  • 5
  • 70
  • 83
  • If Robert's solution worked, you might want to mark that as the correct answer.. – Sriram Feb 12 '11 at 06:54
  • I get this when starting a new activity with some complex ListAdapters. Where do I put these webview.clearChache() calls? – JPM May 04 '11 at 04:23
  • JPM, there is no relation with the webview and listview hahaha. It seems that the issue is in your getview method of the adapter specifically with the convertView. See the getview method on this link http://www.softwarepassion.com/android-series-custom-listview-items-and-adapters/ – Rohit Mandiwal May 04 '11 at 07:13
  • 1
    Hi @Rohit, i am facing the same problem while applying ffmpeg library for decoding video, so what i have to do? here is my que link please check it http://stackoverflow.com/questions/11322952/decoding-video-using-ffmpeg-for-android and http://stackoverflow.com/questions/11389751/using-jni-in-my-project-and-geeting-error-fatal-signal-11-sigsegv-at-0x000000 – Rahul Upadhyay Jul 12 '12 at 06:31

2 Answers2

23

Call webview.clearCache(); and webView2.destroyDrawingCache();

That should solve the problem.

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
  • 6
    please explain wy that would solve the issue. I have similar issues with a native library and an explanation could help here. – hcpl Dec 24 '12 at 09:42
  • @hcpl: It's been over a year, and I don't really remember why, but I guess I figured there was some sort of memory leak. – Robert Harvey Dec 24 '12 at 15:12
  • @RobertHarvey I have also facing this issue on WebView. Please tell Where do I call this method ? – Dinesh Apr 29 '13 at 12:50
  • Thanx for solution. Faced same problem with app which has only webView and nothing more - it crashes on some sites. Whats more interesting is the fact that everything works just fine on AOS 2.3.x (MIUI 2.3.5 particularly) but on 4.0.3 it crashes! Now I can see the improvements of AOS 4! Yeah, its really "better"! Multiply this by fact that devices designed for AOS 4 usually has more physical RAM than devices designed for 2.3.x. Moreover even AOS 4 built-in browser crashes on same sites! – Stan Aug 09 '13 at 11:32
1

I have faced the same problem and i had a jni. this fatal exception creates randomly and as i was using it to play audio it crashed about 2min or 6 min or else. After a lots of research i have found that the problem was i had made a native function call from two different thread and when it occurs at the same time it failed.

Another if you have any jni call from android make sure that you have not passed any null as an argument.

rab
  • 207
  • 2
  • 6
  • I have the same problem, I am calling jni method, there is no null argument I am passing also method call inside thread, still, I am getting this error, have you any solution? Please know me What I have to do now? – Priyanka Aug 08 '19 at 05:33