I found that when getObject(_env->rt)
in 761st line of napi-inl.h
is called third time, _value.kind_
becomes UndefinedKind
(which should be ObjectKind
) and it is sent to getObject
and crashes.
Thus it seems to prohibits initialization.
I couldn’t put breakpoint on exact same line on iOS side thus I only used package from npm(only has binaries for that) for mobile side.
but I was able to put breakpoint at BabylonNativeInterop.mm
of both side, so I put a breakpoint at BabylonNative::Initialize
on 39th line of it.
Yes, macOS side crashed after exactly three times, but iOS side launched flawlessly.
So it can be assumed that 761st line of napi-inl.h
is a procedure of initialization invoked by BabylonNative::Initialize
, so on iOS side, since BabylonNative::Initialize
didn’t crashed, therefore I guess getObject
didn’t asserted. am I right?
ping @ryantrem , as suggested
+
I found another case that broke in same line: await BabylonNative.initializationPromise
in ReactNativeEngine.ts
.
according to that thread, his (or maybe her) case was caused by OpenGL settings, but macOS does not uses OpenGL anymore - it uses Metal.
then maybe my problem is related to Metal API settings?