NativeScript / NativeScript/nativescript-cli
App hangs on unhandled exception when launched with `tns run`
還沒有人認領這個 Issue。
- 主要語言
- JavaScript
- 星號
- 1.1k
- 分支
- 204
- 平均合併
- 1 天 9 小時
- 30 天內合併 PR
- 8
描述
Please, provide the details below:
When you run a {N} application on a device using tns run and an unhandled ObjectiveC exception is raised, then the UI on the device freezes and the application doesn't terminate.
Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo?
Yes.
Tell us about the problem
The issue seems to be related to the way the application is started by the CLI. It uses lldb to launch and debug it on the device. Whenever an unhandled exception is detected by the debugger it breaks execution and awaits for commands on stdin. The CLI however doesn't send anything and the app appears as if it has hung.
Which platform(s) does your issue occur on?
iOS
Please provide the following version numbers that your issue occurs with:
- CLI: 3.2.1
- Cross-platform modules: 3.2.0
- Runtime(s): 3.2.0
Please tell us how to recreate the issue in as much detail as possible.
Launch an application which causes an unhandled ObjectiveC exception using tns run ios.
Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.
Put this line of JS code in your application (e.g. on some button's click event):
new NSString().characterAtIndex(10);
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先,使用提供的例外 new NSString().characterAtIndex(10); 透過 tns run ios 重現問題,然後追蹤 CLI 如何透過 lldb 啟動 iOS 應用程式。完成的標準是,未處理的 Objective-C 例外不再讓裝置 UI 保持凍結,且應用程式終止,或 CLI 適當地處理偵錯工具狀態。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- ios, javascript
- 領域
- cli, mobile-dev
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100