NativeScript / NativeScript/nativescript-cli
App hangs on unhandled exception when launched with `tns run`
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 1.1k
- フォーク
- 204
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 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 にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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