viro: ngrok crashing repeatedly

Environment

Please provide the following information about your environment:

  1. Development OS: Mac
  2. Device OS & Version: iOS 12
  3. Version: ViroReact version 2.11.0 and React Native version 0.55.1
  4. Device(s): iPhone X

Description

I have a simple demo for rendering a 3d object in an AR scene that i’ve made an issue about here earlier. When I was working at the office on this, I was able to use the testbed app just fine. I’m at home now, with my phone and macbook pro on the same wifi network. I’ve ensured the ngrok URL i’m entering has no typos. I know this demo works because the code has been unchanged since it was last running it at the office. Now that I’m home I try to run npm run start and enter my ngrok URL into the testbed app on my iphone X and constantly get this Failed to load bundle error and I cannot navigate around this. I tried sideloading it on my iphone with xcode but get a compilation error about a missing config.h file.

Stack trace:

Loading dependency graph, done.
 BUNDLE  [ios, dev] ./index.js ░░░░░░░░░░░░░░░░ 0.0% (0/263)
<--- Last few GCs --->

[76392:0x102801600]    25771 ms: Mark-sweep 888.6 (1012.9) -> 888.5 (962.4) MB, 111.0 / 0.0 ms  (average mu = 0.892, current mu = 0.000) last resort GC in old space requested
[76392:0x102801600]    25877 ms: Mark-sweep 888.5 (962.4) -> 888.5 (948.4) MB, 106.4 / 0.0 ms  (average mu = 0.803, current mu = 0.000) last resort GC in old space requested


<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 0x2a542dd041bd]
Security context: 0x384d56e1e589 <JSObject>
    1: _send [0x384dab25cab9] [internal/child_process.js:715] [bytecode=0x384dab26b879 offset=606](this=0x384d33e8a1f1 <ChildProcess map = 0x384da906be49>,message=0x384dedfcb9c9 <JSArray[4]>,handle=0x384d9f2822e1 <undefined>,options=0x384dedfcba51 <Object map = 0x384d22391c99>,callback=0x384d9f2822e1 <undefined>)
    2: send [0x384dab25ca79] [internal/child_...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/Users/stephentetreault/.nvm/versions/node/v10.4.0/bin/node]
 2: node::OnFatalError(char const*, char const*) [/Users/stephentetreault/.nvm/versions/node/v10.4.0/bin/node]
 3: v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/stephentetreault/.nvm/versions/node/v10.4.0/bin/node]
 4: v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/Users/stephentetreault/.nvm/versions/node/v10.4.0/bin/node]
 5: v8::internal::Heap::AllocateRawWithRetry(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/Users/stephentetreault/.nvm/versions/node/v10.4.0/bin/node]
 6: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/Users/stephentetreault/.nvm/versions/node/v10.4.0/bin/node]
 7: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [/Users/stephentetreault/.nvm/versions/node/v10.4.0/bin/node]
 8: v8::String::Utf8Length() const [/Users/stephentetreault/.nvm/versions/node/v10.4.0/bin/node]
 9: node::StringBytes::Size(v8::Isolate*, v8::Local<v8::Value>, node::encoding) [/Users/stephentetreault/.nvm/versions/node/v10.4.0/bin/node]
10: int node::StreamBase::WriteString<(node::encoding)1>(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/stephentetreault/.nvm/versions/node/v10.4.0/bin/node]
11: void node::StreamBase::JSMethod<node::LibuvStreamWrap, &(int node::StreamBase::WriteString<(node::encoding)1>(v8::FunctionCallbackInfo<v8::Value> const&))>(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/stephentetreault/.nvm/versions/node/v10.4.0/bin/node]
12: v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/Users/stephentetreault/.nvm/versions/node/v10.4.0/bin/node]
13: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/Users/stephentetreault/.nvm/versions/node/v10.4.0/bin/node]
14: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/Users/stephentetreault/.nvm/versions/node/v10.4.0/bin/node]
15: 0x2a542dd041bd
16: 0x2a542dd13429
17: 0x2a542dd13429
18: 0x2a542dd0c223
Abort trap: 6

Screenshot of error: image from ios 1

Reproducible Demo

This doesn’t appear to happen consistently, since all of today it was fine but now with unchanged code I cannot get the testbed app up and running. This would be my personal repo to refer to.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15

Most upvoted comments

losing this @achuvm thanks so much for your help, but I definitely found out the issue. On the 3d object I was working with, the original texture PNGs were MASSIVE (like 60+mb). I cloned those files and resized the PNGs to be < 1mb however I screwed up somewhere and left one reference in to the 60mb PNG file. So Viro/RN was trying to load this massive PNG and of course the asset was going to choke things, which kept causing the crash…

Thanks again for your efforts at helping resolve this and sorry for such a stupid mistake!