open-im-sdk-web-wasm icon indicating copy to clipboard operation
open-im-sdk-web-wasm copied to clipboard

[BUG] Embed the h5 page in the Android client, click the client's physical return to close the page and then open the im page. After repeating this several times, it is found that the client memory is full and the page crashes.

Open zmm4900 opened this issue 1 year ago • 7 comments

OpenIM Server Version

3.5.2

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Docker Deployment

Bug Description and Steps to Reproduce

1、以h5页面嵌入在android客户端。 2、点击客户端物理返回关闭页面后再打开im的页面。 3、按照1、2的步骤这么重复几次 4、发现客户端内存爆了闪退

Screenshots Link

No response

zmm4900 avatar Aug 29 '24 07:08 zmm4900

Is it possible to analyze what is taking up the memory?

Bloomingg avatar Sep 02 '24 08:09 Bloomingg

因为点击物理返回键后,android的webview是直接finish的,我们没有做im的logout的操作,而每次打开webview的时候都重新执行IMSDK.login,以为是这个原因导致了内存爆了。所以我尝试了先logout,再finish webview,但是多次操作又发现提示"wasm exist already fail to run -- event: getloginstatus "

zmm4900 avatar Sep 02 '24 08:09 zmm4900

When an error occurs, you can collect detailed client logs. The SDK core logs will be printed here.

Bloomingg avatar Sep 03 '24 01:09 Bloomingg

报错 多次登录后头这个提示,之后再登录初始化,就一直报这个错,初始化不成功 碰到这个问题我要怎么处理,才能重新初始化成功

zmm4900 avatar Sep 10 '24 02:09 zmm4900

Please provide detailed logs of sdk core. The print location has been pointed out above.

Bloomingg avatar Sep 10 '24 12:09 Bloomingg

1-IMG_7740 2-IMG_7741 3-IMG_7742 4-IMG_7743 5-IMG_7744 6-IMG_7745 7-IMG_7746 9-IMG_7747 10-IMG_7748 11-IMG_7750 12-IMG_7751 13-IMG_7752 14-IMG_7753 15-IMG_7754 16-IMG_7755 17-IMG_7756 18-IMG_7757 19-IMG_7759 以上是日志的截图

zmm4900 avatar Sep 11 '24 02:09 zmm4900

It looks like a memory leak caused the crash. Is it because your webview does not recycle memory correctly when closing? After all, everything works fine when used in the browser.

Bloomingg avatar Sep 13 '24 08:09 Bloomingg