mukaschultze / nativescript-windowed-modal

Consistent modals for Android and iOS
https://www.npmjs.com/package/nativescript-windowed-modal
Apache License 2.0
47 stars 18 forks source link

TypeError: Cannot read property 'x' of undefined #13

Closed Rav-Naz closed 5 years ago

Rav-Naz commented 5 years ago

System.err: An uncaught Exception occurred on "main" thread. System.err: Calling js method run failed System.err: TypeError: Cannot read property 'x' of undefined System.err: System.err: StackTrace: System.err: Frame: function:'push.../node_modules/nativescript-windowed-modal/modal-stack.js.ModalStack.outsideTap', file:'file:///node_modules\nativescript-windowed-modal\modal-stack.js:40:0 System.err: Frame: function:'', file:'file:///node_modules\nativescript-windowed-modal\modal-stack.js:22:39 System.err: Frame: function:'_executeCallback', file:'file:///node_modules\tns-core-modules\ui\gestures\gestures.js:299:0 System.err: Frame: function:'', file:'file:///node_modules\tns-core-modules\ui\gestures\gestures.js:47:0 System.err: Frame: function:'invoke', file:'file:///node_modules\tns-core-modules\timer\timer.js:19:30 System.err: Frame: function:'push.../node_modules/nativescript-angular/zone-js/dist/zone-nativescript.js.ZoneDelegate.invoke', file:'file:///node_modules\nativescript-angular\zone-js\dist\zone-nativescript.js:388:0 System.err: Frame: function:'push.../node_modules/nativescript-angular/zone-js/dist/zone-nativescript.js.Zone.runGuarded', file:'file:///node_modules\nativescript-angular\zone-js\dist\zone-nativescript.js:151:0 System.err: Frame: function:'', file:'file:///node_modules\nativescript-angular\zone-js\dist\zone-nativescript.js:129:0 System.err: Frame: function:'run', file:'file:///node_modules\tns-core-modules\timer\timer.js:23:0 System.err: at com.tns.Runtime.callJSMethodNative(Native Method) System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1242) System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:1122) System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1109) System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1089) System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1081) System.err: at com.tns.gen.java.lang.Runnable.run(Runnable.java:17) System.err: at android.os.Handler.handleCallback(Handler.java:873) System.err: at android.os.Handler.dispatchMessage(Handler.java:99) System.err: at android.os.Looper.loop(Looper.java:193) System.err: at android.app.ActivityThread.main(ActivityThread.java:6692) System.err: at java.lang.reflect.Method.invoke(Native Method) System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Which platform(s) does your issue occur on?

Please, provide the following version numbers that your issue occurs with:

Please, tell us how to recreate the issue in as much detail as possible.

Open and close modal, and immediately re-open the same modal. Keep this process, after few repetition you can get error.

Is there any code involved?

component in repository

mukaschultze commented 5 years ago

I tested this and couldn't reproduce the issue.

One thing that I noticed is this:

viewContainerRef: this.uiService.getRootVCRef() ? this.uiService.getRootVCRef() : this.vcRef

Have you tried using viewContainerRef: this.vcRef directly? Does it keep crashing?

Rav-Naz commented 5 years ago

Thank you very much, the crashes are stopped