Skip to main content
I
3mo ago

React native App Crashing for wrong URL

If I pass a wrong url to the Rive component on my react native app it is crashing the entire application

So I have uploaded the testing.riv file to my site and the url is https://mywebsite.com/testing.riv

If somehow someone passes the wrong URL or it gets corrupted,
for example like https://mywebsite.com/testing-222.riv

this file(testing-222) does not exist in this case ideally the component should not be rendered at all and we can use the onError prop to log the error, but what currently happening is that it is crashing the entire application for the wrong URL

here is my component

<Rive
  fit={Fit.Fill}
  autoplay={false}
  url="https://mywebsite.com/testing.riv"
/>

Versions:

"rive-react-native": "^8.3.0",
"react-native": "0.72.4",

This is IOS crash log

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000020
Exception Codes: 0x0000000000000001, 0x0000000000000020
VM Region Info: 0x20 is not in any region.  Bytes before following region: 4372848608
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                      104a46000-104a49000    [   12K] r-x/r-x SM=COW  /Users/USER/Library/Developer/CoreSimulator Devices/data/Containers/Bundle/Application/MyApp.app/MyApp
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [1418]

Triggered by Thread:  0

Kernel Triage:
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter


Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   <translation info unavailable>	       0x10871cf30 ???
1   RiveRuntime                   	       0x111a024d4 -[RiveFile artboard:] + 46
2   RiveRuntime                   	       0x111a22fd4 0x1119f8000 + 176084
3   RiveRuntime                   	       0x111a1a6b8 0x1119f8000 + 140984
4   RiveRuntime                   	       0x111a1951d 0x1119f8000 + 136477
5   RiveRuntime                   	       0x111a1d2fa 0x1119f8000 + 152314
6   RiveRuntime                   	       0x111a1d398 0x1119f8000 + 152472
7   RiveRuntime                   	       0x111a01e46 __67-[RiveFile initWithHttpUrl:loadCdn:customAssetLoader:withDelegate:]_block_invoke_2 + 205
8   libdispatch.dylib             	       0x12205e3ec _dispatch_call_block_and_release + 12
9   libdispatch.dylib             	       0x12205f6d8 _dispatch_client_callout + 8
10  libdispatch.dylib             	       0x12206e48c _dispatch_main_queue_drain + 1420
11  libdispatch.dylib             	       0x12206def2 _dispatch_main_queue_callback_4CF + 31
12  CoreFoundation                	       0x120bcdaf4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
13  CoreFoundation                	       0x120bc842f __CFRunLoopRun + 2463
14  CoreFoundation                	       0x120bc76ad CFRunLoopRunSpecific + 557
15  GraphicsServices              	       0x12a9bd08f GSEventRunModal + 137
16  UIKitCore                     	       0x132dfead1 -[UIApplication _run] + 972
17  UIKitCore                     	       0x132e03551 UIApplicationMain + 123
18  MyApp.debug.dylib	       0x1124f7f60 __debug_main_executable_dylib_entry_point + 96 (main.m:7)
19  dyld_sim                      	       0x10d3023e0 start_sim + 10
20  dyld                          	       0x204bce366 start + 1942
 
3 replies
I
V
3mo ago

That's really annoying, sorry. I'll let the engineers know. Thanks.

I
3mo ago

Thanks for the quick response, any ETA on when will this be checked and fixed?

V
2mo ago

Hi this is still happening, any ETA on when it will be resolved, cheers