Fatal Signal 11 (Sigsegv) at 0X00000000 (Code=1) - Phonegap

Android: Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1) in getOutputStream

Thanks @ChrisStratton for pointing me. Here is working code.
Now I don't understand how it worked earlier.

OkHttpClient okHttpClient = new OkHttpClient();
try {
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(null, null, null);
okHttpClient.setSslSocketFactory(sslContext.getSocketFactory());
} catch (GeneralSecurityException ignored) {
}

// open a URL connection to the Servlet
fileInputStream = mImagePath.getContentStream();
URL url = new URL(Api.url(Api.Methods.UPLOAD_IMAGE));

conn = okHttpClient.open(url); // FIX!!!
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setRequestMethod("POST");

Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 6049 (WebViewCoreThre)

You're hitting a null pointer dereference. Judging by the code and the PC, I'd guess jNativePointer is zero. Add a log message at the top of the function to confirm.

java.lang.Error: signal 11 (SIGSEGV), code 10 (?), fault addr 006e006f

There are following reason to face this issue:

  • The error is because of some sort of memory issue
  • Segment Violations can occur due to a wide range of problems (usually
    bad pointer or array over/under flows) and is not systemic to any one
    type of software or product.
  • If you have programming (or are using) a plugin that in turn uses
    native C/C++ code through the NDK, this may indicate a bug in that
    native code. Otherwise, this is a bug in the firmware of the device
    or emulator you are testing upon.
  • If you can reproduce this in an emulator, on a Nexus device with the
    original ROM, or on a variety of devices from different
    manufacturers, it is probably a bug in Android itself. In that case,
    please create a sample project that can reproduce the error, and post
    it along with the entire stack trace to http://b.android.com, the
    Android OS issue tracker.
  • If you are only encountering this on one device or one third-party
    ROM, it is probably a more specific bug -- your best bet is to
    contact the device manufacturer or ROM publisher with your symptoms.
  • And one more thing i want to acknoledge regarding this issue is that
    the most of samsung device has memory allocation issuees due to some
    sort of customize OS.


Related Topics



Leave a reply



Submit