Having a problem to resume app. When in the main page, press "back" button which goes to suspend mode. When resume the app, UI got mess up. No idea what goes wrong. Use adb logcat to capture below error.
Happening on emulator and real device.
Suspend (press back button):
W/AudioTrack( 1565): AUDIO_OUTPUT_FLAG_FAST denied by client
E/EGL_emulation( 1132): tid 1132: eglCreateSyncKHR(1299): error 0x3004 (EGL_BAD_ATTRIBUTE)
W/EGL_emulation( 2029): eglSurfaceAttrib not implemented
W/OpenGLRenderer( 2029): Failed to set EGL_SWAP_BEHAVIOR on surface 0xa4490ce0, error=EGL_SUCCESS
W/ResourceType( 1909): No package identifier when getting value for resource number 0x00000000
W/PackageManager( 1909): Failure retrieving resources for com.app.contact: Resource ID #0x0
E/art (13727): invalid stream - problem with parameter iterator in /data/app/com.app.contact-1/base.apk for method void com.tns.gen.android.app.Application_ActivityLifecycleCallbacks.onActivityResumed(android.app.Activity)
E/WindowManager(13727):
E/WindowManager(13727): android.view.WindowLeaked: Activity com.tns.NativeScriptActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{1a0426a2 G.E..... R.....I. 0,0-684,0} that was originally added here
E/WindowManager(13727): at android.view.ViewRootImpl.<init>(ViewRootImpl.java:363)
E/WindowManager(13727): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:271)
E/WindowManager(13727): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
E/WindowManager(13727): at android.app.Dialog.show(Dialog.java:298)
E/WindowManager(13727): at com.tns.Runtime.callJSMethodNative(Native Method)
E/WindowManager(13727): at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:865)
E/WindowManager(13727): at com.tns.Runtime.callJSMethodImpl(Runtime.java:730)
E/WindowManager(13727): at com.tns.Runtime.callJSMethod(Runtime.java:716)
E/WindowManager(13727): at com.tns.Runtime.callJSMethod(Runtime.java:697)
E/WindowManager(13727): at com.tns.Runtime.callJSMethod(Runtime.java:687)
E/WindowManager(13727): at com.tns.gen.android.app.Application_ActivityLifecycleCallbacks.onActivityResumed(android.app.Application$ActivityLifecycleCallbacks.java)
E/WindowManager(13727): at android.app.Application.dispatchActivityResumed(Application.java:208)
E/WindowManager(13727): at android.app.Activity.onResume(Activity.java:1220)
E/WindowManager(13727): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1257)
E/WindowManager(13727): at android.app.Activity.performResume(Activity.java:6076)
E/WindowManager(13727): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2975)
E/WindowManager(13727): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3017)
E/WindowManager(13727): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392)
E/WindowManager(13727): at android.app.ActivityThread.access$800(ActivityThread.java:151)
E/WindowManager(13727): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
E/WindowManager(13727): at android.os.Handler.dispatchMessage(Handler.java:102)
E/WindowManager(13727): at android.os.Looper.loop(Looper.java:135)
E/WindowManager(13727): at android.app.ActivityThread.main(ActivityThread.java:5254)
E/WindowManager(13727): at java.lang.reflect.Method.invoke(Native Method)
E/WindowManager(13727): at java.lang.reflect.Method.invoke(Method.java:372)
E/WindowManager(13727): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
E/WindowManager(13727): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
I/Choreographer(13727): Skipped 38 frames! The application may be doing too much work on its main thread.
W/WindowManager( 1565): Failed looking up window
W/WindowManager( 1565): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@3e6e356c does not exist
W/WindowManager( 1565): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8540)
W/WindowManager( 1565): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8531)
W/WindowManager( 1565): at com.android.server.wm.WindowManagerService.removeWindow(WindowManagerService.java:2593)
W/WindowManager( 1565): at com.android.server.wm.Session.remove(Session.java:187)
W/WindowManager( 1565): at android.view.IWindowSession$Stub.onTransact(IWindowSession.java:233)
W/WindowManager( 1565): at com.android.server.wm.Session.onTransact(Session.java:130)
W/WindowManager( 1565): at android.os.Binder.execTransact(Binder.java:446)
W/OpenGLRenderer( 2029): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
Resume (pick the app):
W/AudioTrack( 1565): AUDIO_OUTPUT_FLAG_FAST denied by client
I/ActivityManager( 1565): START u0 {act=com.android.systemui.recents.SHOW_RECENTS flg=0x10804000 cmp=com.android.systemui/.recents.RecentsActivity} from uid 10012 on display 0
W/EGL_emulation( 1909): eglSurfaceAttrib not implemented
W/OpenGLRenderer( 1909): Failed to set EGL_SWAP_BEHAVIOR on surface 0xa384f340, error=EGL_SUCCESS
W/AudioTrack( 1565): AUDIO_OUTPUT_FLAG_FAST denied by client
I/ActivityManager( 1565): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10300000 cmp=com.app.contact/com.tns.NativeScriptActivity bnds=[376,765][524,949] (has extras)} from uid 10007 on display 0
V/WindowManager( 1565): addAppToken: AppWindowToken{197294a3 token=Token{28e8ebd2 ActivityRecord{1798765d u0 com.app.contact/com.tns.NativeScriptActivity t1765}}} to stack=1 task=1765 at 0
W/AudioTrack( 1565): AUDIO_OUTPUT_FLAG_FAST denied by client
V/WindowManager( 1565): Adding window Window{66b1b59 u0 com.app.contact/com.tns.NativeScriptActivity} at 4 of 10 (after Window{303a927a u0 com.android.settings/com.android.settings.Settings})
V/WindowManager( 1565): Adding window Window{248fd7ff u0 com.app.contact/com.tns.NativeScriptActivity} at 4 of 11 (before Window{66b1b59 u0 com.app.contact/com.tns.NativeScriptActivity})
W/EGL_emulation(13727): eglSurfaceAttrib not implemented
W/OpenGLRenderer(13727): Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2f40e00, error=EGL_SUCCESS
I/ActivityManager( 1565): Displayed com.app.contact/com.tns.NativeScriptActivity: +558ms
Window android
>tns info
All NativeScript components versions information
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ
โ Component โ Current version โ Latest version โ Information โ
โ nativescript โ 2.3.0 โ 2.3.0 โ Up to date โ
โ tns-core-modules โ 2.3.0 โ 2.3.0 โ Up to date โ
โ tns-android โ 2.3.0 โ 2.3.0 โ Up to date โ
โ tns-ios โ โ 2.3.0 โ Not installed โ
โโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโ
Hey @ryc16
It will help us diagnose your problem is you can share some of the real code that is causing it.
The most likely reason for your error message:
The AUDIO_OUTPUT_FLAG_FAST is denied because you are using a different rate than the one supported in hardware. You need to query the hardware supported sampling rate and record at that rate rather than hard code it to 48kHz.
So have you used any sound tracks ni your app that changes the default ones!? (I am just guessing here as I have no code base to compare and test)
@NickIliev, thanks for your quick reply. It is strange, the only place that related to audio is a plugin from https://github.com/anarchicknight/nativescript-texttospeech
Other than that, I don't see any place related to audio. I tried remove the texttospeech plugin but still have the same problem. Below are the plugin I am using and not sure if they do use any audio.
"awesome-phonenumber",
"lodash",
"moment",
"nativescript-contacts",
"nativescript-drop-down",
"nativescript-fonticon",
"nativescript-google-maps-sdk",
"nativescript-loading-indicator",
"nativescript-phone",
"nativescript-slides",
"nativescript-telerik-ui",
"nativescript-unit-test-runner,
"tns-core-modules"
I will see how to share real code to you. At the mean time, kindly share any technique to troubleshoot deeper if you have.
@ryc16 were yours _platforms_ folder reset after the removal of the speech plugin!?
tns platform remove ios
tns platform remove android
Try to log your app on resume event as shown here
@NickIliev, I didn't remove speech plugin and also remove platforms folder but doesn't help. So I don't think "The AUDIO_OUTPUT_FLAG_FAST is denied" is really the cause of crashes. (note: I have seen other places that has audio denied but still not crashed).
I have taken a lot of time to rollback all the way back until my app can resumed. But I take my finding and try to replicate on the new project but can't replicate it. So still facing difficulty to find the issue. Pls advice if there is better way to debug to lower level. Do you think if I turn on certain trace and send to you helps us to understanding more.
When I said can resumed, it means started from 2nd times of suspend and resume, but not first time. I always can't resume at first time. and got pretty much consistent error.
Steps are:
tns livesync android --watch
press back button
app suspend with below error.
press menu and pick my app to resume but all ui got mess up.
close my app
launch my app to have first main screen
press back again
app suspend
press menu and pick my app to resume and ui looks ok.
D/dalvikvm( 1549): GC_CONCURRENT freed 8434K, 55% free 9265K/20364K, paused 3ms+2ms, total 22ms
D/dalvikvm( 1549): WAIT_FOR_CONCURRENT_GC blocked 12ms
E/WindowManager( 3982):
E/WindowManager( 3982): android.view.WindowLeaked: Activity com.tns.NativeScriptActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{ae9b1240 G.E..... R.....ID 0,0-693,168} that was originally added here
E/WindowManager( 3982): at android.view.ViewRootImpl.<init>(ViewRootImpl.java:348)
E/WindowManager( 3982): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:248)
E/WindowManager( 3982): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
E/WindowManager( 3982): at android.app.Dialog.show(Dialog.java:286)
E/WindowManager( 3982): at com.tns.Runtime.callJSMethodNative(Native Method)
E/WindowManager( 3982): at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:865)
E/WindowManager( 3982): at com.tns.Runtime.callJSMethodImpl(Runtime.java:730)
E/WindowManager( 3982): at com.tns.Runtime.callJSMethod(Runtime.java:716)
E/WindowManager( 3982): at com.tns.Runtime.callJSMethod(Runtime.java:697)
E/WindowManager( 3982): at com.tns.Runtime.callJSMethod(Runtime.java:687)
E/WindowManager( 3982): at com.tns.gen.android.view.View_OnClickListener.onClick(android.view.View$OnClickListener.java)
E/WindowManager( 3982): at android.view.View.performClick(View.java:4438)
E/WindowManager( 3982): at android.view.View$PerformClick.run(View.java:18422)
E/WindowManager( 3982): at android.os.Handler.handleCallback(Handler.java:733)
E/WindowManager( 3982): at android.os.Handler.dispatchMessage(Handler.java:95)
E/WindowManager( 3982): at android.os.Looper.loop(Looper.java:136)
E/WindowManager( 3982): at android.app.ActivityThread.main(ActivityThread.java:5017)
E/WindowManager( 3982): at java.lang.reflect.Method.invokeNative(Native Method)
E/WindowManager( 3982): at java.lang.reflect.Method.invoke(Method.java:515)
E/WindowManager( 3982): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
E/WindowManager( 3982): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
E/WindowManager( 3982): at dalvik.system.NativeStart.main(Native Method)
E/WindowManager( 3982):
E/WindowManager( 3982): android.view.WindowLeaked: Activity com.tns.NativeScriptActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{ae9758a0 G.E..... R.....ID 0,0-693,246} that was originally added here
E/WindowManager( 3982): at android.view.ViewRootImpl.<init>(ViewRootImpl.java:348)
E/WindowManager( 3982): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:248)
E/WindowManager( 3982): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
E/WindowManager( 3982): at android.app.Dialog.show(Dialog.java:286)
E/WindowManager( 3982): at com.tns.Runtime.callJSMethodNative(Native Method)
E/WindowManager( 3982): at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:865)
E/WindowManager( 3982): at com.tns.Runtime.callJSMethodImpl(Runtime.java:730)
E/WindowManager( 3982): at com.tns.Runtime.callJSMethod(Runtime.java:716)
E/WindowManager( 3982): at com.tns.Runtime.callJSMethod(Runtime.java:697)
E/WindowManager( 3982): at com.tns.Runtime.callJSMethod(Runtime.java:687)
E/WindowManager( 3982): at com.tns.gen.android.view.View_OnClickListener.onClick(android.view.View$OnClickListener.java)
E/WindowManager( 3982): at android.view.View.performClick(View.java:4438)
E/WindowManager( 3982): at android.view.View$PerformClick.run(View.java:18422)
E/WindowManager( 3982): at android.os.Handler.handleCallback(Handler.java:733)
E/WindowManager( 3982): at android.os.Handler.dispatchMessage(Handler.java:95)
E/WindowManager( 3982): at android.os.Looper.loop(Looper.java:136)
E/WindowManager( 3982): at android.app.ActivityThread.main(ActivityThread.java:5017)
E/WindowManager( 3982): at java.lang.reflect.Method.invokeNative(Native Method)
E/WindowManager( 3982): at java.lang.reflect.Method.invoke(Method.java:515)
E/WindowManager( 3982): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
E/WindowManager( 3982): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
E/WindowManager( 3982): at dalvik.system.NativeStart.main(Native Method)
I/Choreographer( 3982): Skipped 38 frames! The application may be doing too much work on its main thread.
Look at the log. there is a message
android.view.WindowLeaked: Activity com.tns.NativeScriptActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{ae9758a0 G.E..... R.....ID 0,0-693,246} that was originally added here
Does the error mean something to you?
@ryc16
You can create a verbose log with using this method somewhere in the begging of the application lifecycle (e.g. in your _app.js_)
__enableVerboseLogging()
Here you can see how to use logcar to generate your log in adb.
Please send us the log file so we can investigate further the reasons for your issue.
@NickIliev,
I set __enableVerboseLogging() to my app.ts and follow the link you suggested to generate log in adb.
Let me repeat my case:
I did 2 set of logs because I am not sure doing 'adb logcat -d > "report.txt"' contains much information.
Set 1 (attached as "report_d.zip") with following steps same as the link you given:
adb logcat -c
start my app
press "back" button
adb logcat -d "report_d_start_and_back.txt"
adb logcat -c
start my app again
adb logcat -d "report_d_start_again.txt"
Set 2 (attached as "report_rt.zip") with following steps.
adb logcat -c
adb logcat > "report_rt_start_and_back.txt"
start my app
press "back" button
Ctrl+C
adb logcat -c
adb logcat > "report_rt_start_again.txt"
start my app
Ctrl+C
By the way, from the log with NO VerboseLogging, we got
E/WindowManager( 3982): android.view.WindowLeaked: Activity com.tns.NativeScriptActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{ae9b1240 G.E..... R.....ID 0,0-693,168} that was originally added here
E/WindowManager( 3982): at android.view.ViewRootImpl.<init>(ViewRootImpl.java:348)
Now, with enable VerboseLogging, we got
D/TNS.Java( 3548): makeInstanceWeak instance 14 keepAsWeak=true
D/TNS.Java( 3548): makeInstanceWeak instance 32 keepAsWeak=true
does this imply there is resource leak?
Hey @ryc16 I have noticed the following lines in your logcat.txt
/system/media/audio/ui/Effect_Tick.oggW/AudioService( 1548): Soundpool could not load file:
/system/media/audio/ui/Effect_Tick.oggE/SoundPool( 1548): error loading
/system/media/audio/ui/Effect_Tick.oggW/AudioService( 1548): Soundpool could not load file:
/system/media/audio/ui/Effect_Tick.oggE/SoundPool( 1548): error loading
// more similar errors to follow
And after some research I found this SO thread where a similar log was discussed. A SO user has suggested that this is a problem related to the emulator system sounds.
This is Android emulator issue. To workaround it just disable all sounds in Android settings (particularly "Touch sounds").
Depends on the Android version but for me it was Apps => Settings => Device => Sound => System => Touch Sound
Are you using your emulator to reporduce this issue or a real device!? Can you try the described solutions (disabling the emulator system sounds) and get back at us.
@NickIliev
I tried what you said and disable following sounds
But, the app still crashed on pressing "back" button. The problem is happening consistently on every emulator and every real device I have tested. This is also the reason I might not think related to sounds.
I still think it is to do with what {N} is doing on the suspend mode. As app on the top stack windows, if "back" button is pressed, app will go to suspend stage and switch to other app. I don't know but I think {N} might perform stage saving. So the error looks more sense.
I have kept rollback my change and found the revision that doesn't crash. The logcat looks like:
D/ ( 3285): HostConnection::get() New Host Connection established 0xf02a91c0, tid 3309
I/OpenGLRenderer( 3285): Initialized EGL, version 1.4
D/OpenGLRenderer( 3285): Enabling debug mode 0
I/ActivityManager( 1484): Displayed com.ryc.contact/com.tns.NativeScriptActivity: +2s449ms
D/ ( 1484): HostConnection::get() New Host Connection established 0x7f8727bf4140, tid 1747
E/EGL_emulation( 1123): tid 1123: eglCreateSyncKHR(1315): error 0x3004 (EGL_BAD_ATTRIBUTE)
I/Choreographer( 3285): Skipped 45 frames! The application may be doing too much work on its main thread.
W/CursorWrapperInner( 3285): Cursor finalized without prior close()
W/OpenGLRenderer( 1772): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
And then I switch to next changes I made and the app crashed. The logcat looks like below. From this revision, I just add 2nd drawer to the right side in additional exist left drawer, and more viewmodel class. So basically this revision has more complex top stack main screen. I am not sure if it is because the ui is too complex? My main screens have tab view with 3 tabs, left drawer on main screens, right drawer only on tab 1 but not tab 2 and 3. (Please advice if this is too complex with suggestions)
I/WindowManager( 1484): Switching to real app window: Window{e018f25 u0 com.ryc.contact/com.tns.NativeScriptActivity}
I/ActivityManager( 1484): Displayed com.ryc.contact/com.tns.NativeScriptActivity: +2s524ms
E/EGL_emulation( 1123): tid 1123: eglCreateSyncKHR(1315): error 0x3004 (EGL_BAD_ATTRIBUTE)
E/art ( 2952): invalid stream - problem with parameter iterator in /data/app/com.ryc.contact-1/base.apk for method android.view.View com.tns.FragmentClass.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle)
E/WindowManager( 2952):
E/WindowManager( 2952): android.view.WindowLeaked: Activity com.tns.NativeScriptActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{3bba980a G.E..... R.....ID 0,0-1026,290} that was originally added here
E/WindowManager( 2952): at android.view.ViewRootImpl.<init>(ViewRootImpl.java:363)
E/WindowManager( 2952): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:261)
E/WindowManager( 2952): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
E/WindowManager( 2952): at android.app.Dialog.show(Dialog.java:298)
E/WindowManager( 2952): at com.tns.Runtime.callJSMethodNative(Native Method)
E/WindowManager( 2952): at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:865)
E/WindowManager( 2952): at com.tns.Runtime.callJSMethodImpl(Runtime.java:730)
E/WindowManager( 2952): at com.tns.Runtime.callJSMethod(Runtime.java:716)
E/WindowManager( 2952): at com.tns.Runtime.callJSMethod(Runtime.java:697)
E/WindowManager( 2952): at com.tns.Runtime.callJSMethod(Runtime.java:687)
:
:
:
I feel the hints are below 2:
E/art ( 2952): invalid stream - problem with parameter iterator in /data/app/com.ryc.contact-1/base.apk for method android.view.View com.tns.FragmentClass.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle)
E/WindowManager( 2952): android.view.WindowLeaked: Activity com.tns.NativeScriptActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{3bba980a G.E..... R.....ID 0,0-1026,290} that was originally added here
Hey @ryc16
Are you using RadSideDrawer or custom drawers? Anyway, I think that is the main reason for you app to leak. The RadSideDrawer has planned feature for multiple drawers but at this very moment this is not officially supported scenario and if implemented may cause similar leak issues under Android. Multiple drawers can also be confusing from UX point of view (when the user swipes and has both drawers opened ..which one should respond or both!? When both are opened will there be enough space to visualise them!? They both might trigger the same sound effects on swipe so that may cause the sound errors!?) So perhaps, you can create a custom toolbar or use a segmented bar for simplifying your UX and overall app design.
Hey @NickIliev, yup, I am using RadSideDrawer. Got you. That could be the case. Let me play around and try to remove one of drawer to see what happen. My case will open one side each time so looks ok in term of UI visualization. Thanks for your important information. Is there any milestone to have better drawer? Let me try it out and will get back to you.
Hey @NickIliev, I commented out both RadSideDrawer and still got the same problem. Since I don't know what is the best way or efficient way to troubleshoot the issue, I have to comment out each component and plugin one by one. I finally found the leak is from one of the plugin "LoadIndicator". I will look into it but at least I could disable it for now.
I just wonder if there is any good way to troubleshoot this kind of problem going forward rather than try and error which waste a lot of time. The log or even VerboseLogging doesn't really tell the problem came from. So other than finding out from you any good way to troubleshoot, I think you can close this.
Thanks for your helping and any suggestion.
@ryc16
I think in scenarios like this it is very useful to use Android Device Monitor
You can start it from your cmd/shell with monitor
D:\ monitor
Once the ADM is started make sure that If you have multiple emulators / devices attached you have selected the right one. From here you can explore the LogCat in real time and log your memory consumption to see when and what is causing memory leaks.
You can combine this tool with some error logs for lowMemomry event (or another suitable event that you need to handle)
application.on(application.lowMemoryEvent, function (args) {
if (args.android) {
// For Android applications, args.android is an android activity class.
console.log("Activity: " + args.android);
} else if (args.ios) {
// For iOS applications, args.ios is UIApplication.
console.log("UIApplication: " + args.ios);
}
});
I'm having this same problem, also using the LoadingIndicator. Can you post a solution once you find it?
Thanks in advance.
@vjoao, I had difficult to find the leak came from but finally found it is LoadingIndicator. The solution is very simple. Just add the dismiss() shown below and the problem gone.
public hide() {
if (this._progressDialog !== undefined) {
this._progressDialog.hide(); // hide() is from android.app.Dialog
this._progressDialog.dismiss();
}
this._progressDialog = undefined;
}
Again, this is just "work" solution but it is not necessary the right place to add. Since hide is hide, it is kind of strange to dismiss but the author is more like doing destroying the dialog as it set progressDialog to undefined already. There are many other concerns I have such as whether it should separate hide and dismiss. Conceptually, it should and dismiss only call once. I think this is needed to be tested well but I don't have time to prove this. If you are interested to refine this part, kindly to share. For now, I use the simplest solution and report back to author and let him to decide what to do.
If you any question about above, you could text me.
Great!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
@vjoao, I had difficult to find the leak came from but finally found it is LoadingIndicator. The solution is very simple. Just add the dismiss() shown below and the problem gone.
Again, this is just "work" solution but it is not necessary the right place to add. Since hide is hide, it is kind of strange to dismiss but the author is more like doing destroying the dialog as it set progressDialog to undefined already. There are many other concerns I have such as whether it should separate hide and dismiss. Conceptually, it should and dismiss only call once. I think this is needed to be tested well but I don't have time to prove this. If you are interested to refine this part, kindly to share. For now, I use the simplest solution and report back to author and let him to decide what to do.
If you any question about above, you could text me.