iOS Debug build fails: use of dynamic_cast requires -frtti (Babylon Native f4d9efb)

Aperta
#774 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp, ios, react-native

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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".

Lingua principale
C++
Stelle
437
Fork
72
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di BabylonJS/BabylonReactNative

Tutte le issue di BabylonJS/BabylonReactNative

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.