openimsdk / open-im-sdk-web-wasm

JS SDK for OpenIM Web use by Webassembly of go
https://openim.io
Apache License 2.0
33 stars 44 forks source link

[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. #122

Open zmm4900 opened 2 weeks ago

zmm4900 commented 2 weeks ago

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

Bloomingg commented 1 week ago

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

zmm4900 commented 1 week ago

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

Bloomingg commented 1 week ago

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

zmm4900 commented 5 days ago

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

Bloomingg commented 5 days ago

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

zmm4900 commented 4 days ago

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 以上是日志的截图

Bloomingg commented 2 days ago

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.