iOS Debug build fails: use of dynamic_cast requires -frtti (Babylon Native f4d9efb)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- cpp, ios, react-native
- Domain
- build-system, mobile
Research direction
Start by reading the generated ReactNativeBabylon.xcodeproj Debug configuration and the CMake debug flags described in the issue. Trace how ENABLE_RTTI and NDEBUG affect the XMLHttpRequest.cpp build through napi-inl.h and jsi's Object::getHostObject<T>(). Done means the iOS Debug build compiles without breaking Release builds; the payload gives a workaround but no test or project-generation entry point.
Written by the indexing model from the issue text.
Description
Environment: @babylonjs/react-native 2.0.7 (Babylon Native f4d9efb), React Native 0.81.6 (legacy architecture), Hermes, Xcode 27.1, iOS 27.0 Simulator (iPhone 17), macOS 27.0.1.
Babylon Native now compiles with -fno-rtti (ENABLE_RTTI follows ENABLE_SANITIZERS). The generated
ReactNativeBabylon.xcodeproj Debug configuration has no NDEBUG, so jsi's
Object::getHostObject<T>() keeps assert(isHostObject<T>()), which instantiates std::dynamic_pointer_cast.
XMLHttpRequest.cpp (via napi-inl.h ObjectWrap<T>::Unwrap) then fails to compile. Release builds are fine.
Workaround: regenerate the project with
-DCMAKE_CXX_FLAGS_DEBUG="-g -DNDEBUG" -DCMAKE_OBJCXX_FLAGS_DEBUG="-g -DNDEBUG".
- Dominant language
- C++
- Stars
- 437
- Forks
- 72
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from BabylonJS/BabylonReactNative
-
Docs: New Architecture is not supported; GUI text needs a fontPossibly taken @CedricGuillemet claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
BabylonJS/BabylonReactNative#777 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 54/100
BabylonJS/BabylonReactNative#776 ·
-
Playground Metro fails to start: exclusionList is not a functionPossibly taken @CedricGuillemet claimed this today. Open
Difficulty 3/5 1-2 days Newbie friendliness 58/100
BabylonJS/BabylonReactNative#775 ·
-
JS thread deadlocks in NativeEngine::SubmitCommands when an engine is disposed and a new one created quicklyPossibly taken @CedricGuillemet claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 47/100
BabylonJS/BabylonReactNative#773 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
BabylonJS/BabylonReactNative#667 ·
All issues in BabylonJS/BabylonReactNative
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
gofractally/psibase#2379 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
simnJS/AnyPS5#735 · 1 comment ·
Maintainers usually reply within 1 day
-
needs-format
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Niko1221/Strata#7719 · 1 comment ·
Maintainers usually reply within 4 days