Hello
In my PROD environment I am getting this issue with BabylonJS React Native :
-[_MTLCommandEncoder dealloc] > -[_MTLCommandEncoder dealloc]:131: failed assertion `Command encoder released without endEncoding'
> : failed assertion `%s'
> Command encoder released without endEncoding > error
Here is a more detailed stack trace :
0 ??? 0x107725a78 ???
1 ??? 0x10c0b403c ???
2 libsystem_pthread.dylib 0x11a34febd pthread_kill + 262
3 libsystem_c.dylib 0x1162446b7 abort + 130
4 libsystem_c.dylib 0x116243a34 __assert_rtn + 314
5 Metal 0x11584435c MTLReportFailure.cold.1 + 43
6 Metal 0x11582ba89 MTLReportFailure + 529
7 MetalTools 0x14f8ef955 -[MTLDebugRenderCommandEncoder dealloc] + 229
8 libobjc.A.dylib 0x1111a57b7 objc_object::sidetable_release(bool, bool) + 177
9 libobjc.A.dylib 0x1111a6f96 AutoreleasePoolPage::releaseUntil(objc_object**) + 172
10 libobjc.A.dylib 0x1111a6e89 objc_autoreleasePoolPop + 192
11 CoreFoundation 0x1146cf8be _CFAutoreleasePoolPop + 22
12 Foundation 0x1132e5217 -[NSAutoreleasePool release] + 133
13 App 0x105334930 bgfx::NSAutoreleasePoolScope::~NSAutoreleasePoolScope() + 32
14 App 0x10532faae bgfx::Context::renderFrame(int) + 510
15 App 0x1053330f0 bgfx::Context::swap() + 384
16 App 0x1053314b7 bgfx::Context::frame(bool) + 919
17 App 0x1048b64d4 Babylon::Graphics::DeviceImpl::Frame() + 228
18 App 0x1048b602f Babylon::Graphics::DeviceImpl::FinishRenderingCurrentFrame() + 367
19 App 0x1047ccf1b BabylonNative::RenderView() + 155
20 App 0x1056ba845 +[BabylonNativeInterop renderView] + 21 (BabylonNativeInterop.mm:71)
21 App 0x1056bedc9 -[EngineView drawRect:] + 521 (EngineViewManager.mm:84)
22 MetalKit 0x1109f3157 -[MTKView draw] + 142
23 MetalKit 0x1109ef5a9 -[MTKViewDisplayLinkTarget draw] + 34
24 QuartzCore 0x113e33917 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 915
25 QuartzCore 0x113f32aa6 display_timer_callback(__CFMachPort*, void*, long, void*) + 395
26 CoreFoundation 0x1145f98ae __CFMachPortPerform + 157
27 CoreFoundation 0x11462dd99 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
28 CoreFoundation 0x11462d140 __CFRunLoopDoSource1 + 617
29 CoreFoundation 0x114627575 __CFRunLoopRun + 2420
30 CoreFoundation 0x114626704 CFRunLoopRunSpecific + 562
31 GraphicsServices 0x11cfb5c8e GSEventRunModal + 139
32 UIKitCore 0x12e34965a -[UIApplication _run] + 928
33 UIKitCore 0x12e34e2b5 UIApplicationMain + 101
34 App 0x1047c2518 main + 104 (main.m:7)
35 dyld_sim 0x110002f21 start_sim + 10
36 dyld 0x207ab5345 start + 1909
I am using this packages :
"@babylonjs/loaders": "^6.40.0",
"@babylonjs/react-native": "^1.8.6",
"@babylonjs/react-native-iosandroid-0-71": "^1.8.6",
"@babylonjs/core": "^6.40.0",
"babylonjs": "^7.25.1",
It crashes from version 14.3 up to 15.8.2 of IOS (working well on Android or other versions of IOS).
The repo is private, so I can’t share it, but I may be able to share small portions of code.
Any help / ideas are welcome !!