React native app crashes due to some out of memory error how to fix this
Because of the below error app crashes , i couldn't figure out what is the exact problem and what is the cause
java.lang.RuntimeException:
at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:383)
at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run (Native Method)
at android.os.Handler.handleCallback (Handler.java:751)
at android.os.Handler.dispatchMessage (Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:29)
at android.os.Looper.loop (Looper.java:154)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run (MessageQueueThreadImpl.java:192)
at java.lang.Thread.run (Thread.java:762)
Caused by: java.lang.reflect.InvocationTargetException:
at java.lang.reflect.Method.invoke (Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:372)
Caused by: java.lang.OutOfMemoryError:
at java.lang.AbstractStringBuilder.<init> (AbstractStringBuilder.java:64)
at java.lang.StringBuilder.<init> (StringBuilder.java:98)
at libcore.net.UriCodec.decode (UriCodec.java:273)
at android.net.Uri.decode (Uri.java:1946)
at android.net.Uri$AbstractPart.getDecoded (Uri.java:1976)
at android.net.Uri$StringUri.getSchemeSpecificPart (Uri.java:560)
at cl.json.ShareFile.isBase64File (ShareFile.java:66)
at cl.json.ShareFile.isFile (ShareFile.java:61)
at cl.json.social.ShareIntent.open (ShareIntent.java:74)
at cl.json.social.GenericShare.open (GenericShare.java:18)
at cl.json.RNShareModule.open (RNShareModule.java:94)
react-native react-android
add a comment |
Because of the below error app crashes , i couldn't figure out what is the exact problem and what is the cause
java.lang.RuntimeException:
at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:383)
at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run (Native Method)
at android.os.Handler.handleCallback (Handler.java:751)
at android.os.Handler.dispatchMessage (Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:29)
at android.os.Looper.loop (Looper.java:154)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run (MessageQueueThreadImpl.java:192)
at java.lang.Thread.run (Thread.java:762)
Caused by: java.lang.reflect.InvocationTargetException:
at java.lang.reflect.Method.invoke (Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:372)
Caused by: java.lang.OutOfMemoryError:
at java.lang.AbstractStringBuilder.<init> (AbstractStringBuilder.java:64)
at java.lang.StringBuilder.<init> (StringBuilder.java:98)
at libcore.net.UriCodec.decode (UriCodec.java:273)
at android.net.Uri.decode (Uri.java:1946)
at android.net.Uri$AbstractPart.getDecoded (Uri.java:1976)
at android.net.Uri$StringUri.getSchemeSpecificPart (Uri.java:560)
at cl.json.ShareFile.isBase64File (ShareFile.java:66)
at cl.json.ShareFile.isFile (ShareFile.java:61)
at cl.json.social.ShareIntent.open (ShareIntent.java:74)
at cl.json.social.GenericShare.open (GenericShare.java:18)
at cl.json.RNShareModule.open (RNShareModule.java:94)
react-native react-android
add a comment |
Because of the below error app crashes , i couldn't figure out what is the exact problem and what is the cause
java.lang.RuntimeException:
at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:383)
at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run (Native Method)
at android.os.Handler.handleCallback (Handler.java:751)
at android.os.Handler.dispatchMessage (Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:29)
at android.os.Looper.loop (Looper.java:154)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run (MessageQueueThreadImpl.java:192)
at java.lang.Thread.run (Thread.java:762)
Caused by: java.lang.reflect.InvocationTargetException:
at java.lang.reflect.Method.invoke (Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:372)
Caused by: java.lang.OutOfMemoryError:
at java.lang.AbstractStringBuilder.<init> (AbstractStringBuilder.java:64)
at java.lang.StringBuilder.<init> (StringBuilder.java:98)
at libcore.net.UriCodec.decode (UriCodec.java:273)
at android.net.Uri.decode (Uri.java:1946)
at android.net.Uri$AbstractPart.getDecoded (Uri.java:1976)
at android.net.Uri$StringUri.getSchemeSpecificPart (Uri.java:560)
at cl.json.ShareFile.isBase64File (ShareFile.java:66)
at cl.json.ShareFile.isFile (ShareFile.java:61)
at cl.json.social.ShareIntent.open (ShareIntent.java:74)
at cl.json.social.GenericShare.open (GenericShare.java:18)
at cl.json.RNShareModule.open (RNShareModule.java:94)
react-native react-android
Because of the below error app crashes , i couldn't figure out what is the exact problem and what is the cause
java.lang.RuntimeException:
at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:383)
at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run (Native Method)
at android.os.Handler.handleCallback (Handler.java:751)
at android.os.Handler.dispatchMessage (Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:29)
at android.os.Looper.loop (Looper.java:154)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run (MessageQueueThreadImpl.java:192)
at java.lang.Thread.run (Thread.java:762)
Caused by: java.lang.reflect.InvocationTargetException:
at java.lang.reflect.Method.invoke (Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:372)
Caused by: java.lang.OutOfMemoryError:
at java.lang.AbstractStringBuilder.<init> (AbstractStringBuilder.java:64)
at java.lang.StringBuilder.<init> (StringBuilder.java:98)
at libcore.net.UriCodec.decode (UriCodec.java:273)
at android.net.Uri.decode (Uri.java:1946)
at android.net.Uri$AbstractPart.getDecoded (Uri.java:1976)
at android.net.Uri$StringUri.getSchemeSpecificPart (Uri.java:560)
at cl.json.ShareFile.isBase64File (ShareFile.java:66)
at cl.json.ShareFile.isFile (ShareFile.java:61)
at cl.json.social.ShareIntent.open (ShareIntent.java:74)
at cl.json.social.GenericShare.open (GenericShare.java:18)
at cl.json.RNShareModule.open (RNShareModule.java:94)
react-native react-android
react-native react-android
asked Nov 15 '18 at 4:38
T Jagadish GuptaT Jagadish Gupta
138
138
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
My understanding is that there are two ways to analyze this:
- Integrate a tool like Crashlytics in your app and let it help you
- Try to figure out which part of your code caused this. This is possible if the crash occurs when you do something specific in the app which causes the crash. If it happens arbitrarily, this approach won't work. If, however, the crash happens when you render a specific component, or when you execute a specific function, then you can try commenting out parts of the code, and by trial-and-error, pinpoint the problematic code.
I used both approaches. The first one is easier, but it requires one-time integration work.
If you use expo, you should use Sentry instead of Crashlytics.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53312517%2freact-native-app-crashes-due-to-some-out-of-memory-error-how-to-fix-this%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
My understanding is that there are two ways to analyze this:
- Integrate a tool like Crashlytics in your app and let it help you
- Try to figure out which part of your code caused this. This is possible if the crash occurs when you do something specific in the app which causes the crash. If it happens arbitrarily, this approach won't work. If, however, the crash happens when you render a specific component, or when you execute a specific function, then you can try commenting out parts of the code, and by trial-and-error, pinpoint the problematic code.
I used both approaches. The first one is easier, but it requires one-time integration work.
If you use expo, you should use Sentry instead of Crashlytics.
add a comment |
My understanding is that there are two ways to analyze this:
- Integrate a tool like Crashlytics in your app and let it help you
- Try to figure out which part of your code caused this. This is possible if the crash occurs when you do something specific in the app which causes the crash. If it happens arbitrarily, this approach won't work. If, however, the crash happens when you render a specific component, or when you execute a specific function, then you can try commenting out parts of the code, and by trial-and-error, pinpoint the problematic code.
I used both approaches. The first one is easier, but it requires one-time integration work.
If you use expo, you should use Sentry instead of Crashlytics.
add a comment |
My understanding is that there are two ways to analyze this:
- Integrate a tool like Crashlytics in your app and let it help you
- Try to figure out which part of your code caused this. This is possible if the crash occurs when you do something specific in the app which causes the crash. If it happens arbitrarily, this approach won't work. If, however, the crash happens when you render a specific component, or when you execute a specific function, then you can try commenting out parts of the code, and by trial-and-error, pinpoint the problematic code.
I used both approaches. The first one is easier, but it requires one-time integration work.
If you use expo, you should use Sentry instead of Crashlytics.
My understanding is that there are two ways to analyze this:
- Integrate a tool like Crashlytics in your app and let it help you
- Try to figure out which part of your code caused this. This is possible if the crash occurs when you do something specific in the app which causes the crash. If it happens arbitrarily, this approach won't work. If, however, the crash happens when you render a specific component, or when you execute a specific function, then you can try commenting out parts of the code, and by trial-and-error, pinpoint the problematic code.
I used both approaches. The first one is easier, but it requires one-time integration work.
If you use expo, you should use Sentry instead of Crashlytics.
edited Nov 15 '18 at 11:55
answered Nov 15 '18 at 5:23
YossiYossi
1,9892823
1,9892823
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53312517%2freact-native-app-crashes-due-to-some-out-of-memory-error-how-to-fix-this%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown