NativeScript / NativeScript/nativescript-cli

App hangs on unhandled exception when launched with `tns run`

Đang mở
#3,177 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.

bug os: ios run
Ngôn ngữ chính
JavaScript
Star
1.1k
Fork
204
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
8

Mô tả

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);

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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.

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện sự cố với tns run ios bằng ngoại lệ được cung cấp new NSString().characterAtIndex(10);, sau đó theo dõi cách CLI khởi chạy ứng dụng iOS thông qua lldb. Công việc được hoàn tất khi một ngoại lệ Objective-C chưa được xử lý không còn khiến giao diện thiết bị bị treo và ứng dụng kết thúc hoặc CLI xử lý trạng thái trình gỡ lỗi một cách phù hợp.

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

Đánh giá

Công nghệ
ios, javascript
Lĩnh vực
cli, mobile-dev
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
42/100

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.