NativeScript / NativeScript/nativescript-cli

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

Aperta
#3,177 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug os: ios run
Lingua principale
JavaScript
Stelle
1.1k
Fork
204
Merge medio
1g 9h
PR unite (30g)
8

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo il problema con tns run ios utilizzando l’eccezione fornita new NSString().characterAtIndex(10);, quindi traccia il modo in cui la CLI avvia l’applicazione iOS tramite lldb. Il lavoro è completato quando un’eccezione Objective-C non gestita non lascia più bloccata l’interfaccia del dispositivo e l’applicazione termina oppure la CLI gestisce correttamente lo stato del debugger.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
ios, javascript
Ambito
cli, mobile-dev
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.