NativeScript / NativeScript/nativescript-cli
If you have invalid xml and run tns run ios or android the app will crash and an error will be shown
未關閉
還沒有人認領這個 Issue。
os: ios
run
to-be-checked
- 主要語言
- JavaScript
- 星號
- 1.1k
- 分支
- 204
- 平均合併
- 1 天 9 小時
- 30 天內合併 PR
- 8
描述
- Create project
- Change the xml to be invalid (e.g. "")
- Run "tns run ios" or "tns run android"
Actual: The app will crash and an error will be shown in console
1 0x109ad6d4b NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*)
2 0x10a17a28e ffi_closure_unix64_inner
3 0x10a17abd2 ffi_closure_unix64
4 0x10aea03c3 -[UIViewController __viewWillAppear😏
5 0x10aea1b12 -[UIViewController viewWillMoveToWindow😏
6 0x10ada56d2 -[UIView(Hierarchy) _willMoveToWindow:withAncestorView😏
7 0x10adb6442 -[UIView(Internal) _addSubview:positioned:relativeTo😏
8 0x10ada4cf8 -[UIView(Hierarchy) addSubview😏
9 0x10ad62c6f -[UIWindow addRootViewControllerViewIfPossible]
10 0x10ad63070 -[UIWindow _setHidden:forced😏
11 0x10ad75ebe -[UIWindow makeKeyAndVisible]
12 0x10a17aa2d ffi_call_unix64
13 0x12799e490
file:///app/tns_modules/tns-core-modules/ui/builder/builder.js:196:56: JS ERROR Error: Building UI from XML. @file:///app/home/home-page.xml:13:5"
Expected: App not to crash and the red label on the device to be shown with the proper text
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
使用 XML 包含無效元素(例如 )的專案重現,然後執行 tns run ios 和 tns run android。從 tns-core-modules/ui/builder/builder.js:196 開始,並將主控台錯誤與裝置的預期行為進行比較;當應用程式不當機且裝置顯示正確的紅色錯誤標籤時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- android, ios, javascript
- 領域
- cli, mobile-dev
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 32/100