NativeScript / NativeScript/nativescript-cli
App hangs on unhandled exception when launched with `tns run`
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 1.1k
- Forks
- 204
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 8
Descripción
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);
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza reproduciendo el problema con tns run ios usando la excepción proporcionada new NSString().characterAtIndex(10); y, a continuación, sigue cómo la CLI inicia la aplicación iOS mediante lldb. Se considera terminado cuando una excepción Objective-C no controlada ya no deja congelada la interfaz del dispositivo y la aplicación termina o la CLI gestiona adecuadamente el estado del depurador.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- ios, javascript
- Área
- cli, mobile-dev
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 42/100