Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OutOfMemoryError 堆栈溢出 #1052

Open
linlaoye opened this issue Nov 25, 2024 · 1 comment
Open

OutOfMemoryError 堆栈溢出 #1052

linlaoye opened this issue Nov 25, 2024 · 1 comment

Comments

@linlaoye
Copy link

我使用python写了7条线程,一条负责疯狂随机点击滑动坐标(模拟monkey操作),剩下6条负责查询某个元素是否存在,存在则点击元素(用来点击一些顽固的关闭按钮),6条线程有上线程锁,有序竞争。跑了1天左右就会出现OutOfMemoryError

  • 手机型号:Android13 三星A54
  • uiautomator2的版本号:3.2.3
  • 手机截图:无
  • 相关日志:

Unknown RPC error: -32001 java.lang.OutOfMemoryError
({'mask': 2097152, 'childOrSibling': [], 'childOrSiblingSelector': [], 'resourceId': 'com.adamrocker.android.input.simeji:id/symbol_foot_back'},)

java.lang.OutOfMemoryError: Failed to allocate a 3145712 byte allocation with 1181776 free bytes and 1154KB until OOM,
target footprint 268435456, growth limit 268435456
at dalvik.system.VMRuntime.newUnpaddedArray(Native Method)
at com.android.internal.util.ArrayUtils.newUnpaddedLongArray(ArrayUtils.java:75)
at com.android.internal.util.GrowingArrayUtils.insert(GrowingArrayUtils.java:180)
at android.util.LongSparseArray.put(LongSparseArray.java:269)
at android.view.accessibility.AccessibilityInteractionClient.getInstanceForThread(AccessibilityInteractionClient.java:195)
at android.view.accessibility.AccessibilityInteractionClient.getInstance(AccessibilityInteractionClient.java:179)
at android.app.UiAutomation.getServiceInfo(UiAutomation.java:806)
at androidx.test.uiautomator.UiDevice.getUiAutomation(UiDevice.java:1482)
at androidx.test.uiautomator.QueryController.waitForIdle(QueryController.java:532)
at androidx.test.uiautomator.QueryController.waitForIdle(QueryController.java:523)
at androidx.test.uiautomator.UiDevice.waitForIdle(UiDevice.java:676)
at androidx.test.uiautomator.UiDevice.getWindowRoots(UiDevice.java:1414)
at androidx.test.uiautomator.UiDevice.findObject(UiDevice.java:156)
at com.wetest.uia2.stub.AutomatorServiceImpl.exist(AutomatorServiceImpl.java:817)
at java.lang.reflect.Method.invoke(Native Method)
at com.googlecode.jsonrpc4j.JsonRpcBasicServer.invoke(JsonRpcBasicServer.java:467)
at com.googlecode.jsonrpc4j.JsonRpcBasicServer.handleObject(JsonRpcBasicServer.java:352)
at com.googlecode.jsonrpc4j.JsonRpcBasicServer.handleJsonNodeRequest(JsonRpcBasicServer.java:283)
at com.googlecode.jsonrpc4j.JsonRpcBasicServer.handleRequest(JsonRpcBasicServer.java:251)
at com.wetest.uia2.stub.AutomatorHttpServer.serve(AutomatorHttpServer.java:101)
at fi.iki.elonen.NanoHTTPD.serve(NanoHTTPD.java:2244)
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:945)
at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)
at java.lang.Thread.run(Thread.java:1012)

@atauov
Copy link

atauov commented Dec 11, 2024

same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants