NativeScript / NativeScript/nativescript-cli

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

Offen
#3,177 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug os: ios run
Vorherrschende Sprache
JavaScript
Sterne
1.1k
Forks
204
Ø Merge
1 T. 9 Std.
Gemergte PRs (30 T.)
8

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, das Problem mit tns run ios unter Verwendung der bereitgestellten Ausnahme new NSString().characterAtIndex(10); nachzustellen, und verfolge dann, wie die CLI die iOS-Anwendung über lldb startet. Die Aufgabe ist erledigt, wenn eine nicht behandelte Objective-C-Ausnahme die Geräteoberfläche nicht mehr eingefroren zurücklässt und die Anwendung beendet wird oder die CLI den Debugger-Zustand angemessen behandelt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
ios, javascript
Bereich
cli, mobile-dev
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.