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

Đang mở
#774 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp, ios, react-native
Lĩnh vực
build-system, mobile

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
C++
Star
437
Fork
72
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của BabylonJS/BabylonReactNative

Tất cả issue của BabylonJS/BabylonReactNative

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.