Bug? OOM websockets

Jmu5667

Well-Known Member
Licensed User
Longtime User
Hello

I have recently started getting OOM errors via websockets. I am using B4A 14.2. From IDE -

B4X:
*** Service (svc_wsh_login) Create ***
10/15/2026 15:17:40.454 - ATLAS CM - svc_wsh_login::Service_Create()
*** Service (svc_wsh_login) Create completed ***
*** Service (svc_wsh_login) Started ***
** Service (svc_wsh_login) Start **
10/15/2026 15:17:40.461 - ATLAS CM - svc_wsh_login::Service_Start::Connecting to wss://isledemo.cm.raw.aspectlink.com:443/login
10/15/2026 15:17:40.468 - ATLAS CM - WebSocketHandler::Connect to wss://isledemo.cm.raw.aspectlink.com:443/login
*** Service (svc_wsh_login) Started completed ***
java.lang.OutOfMemoryError: Failed to allocate a 16 byte allocation with 0 free bytes and 0B until OOM, target footprint 134220848, growth limit 134217728
    at android.os.ThreadLocalWorkSource.setUid(ThreadLocalWorkSource.java:68)
    at android.os.Looper.loop(Looper.java:212)
    at android.app.ActivityThread.main(ActivityThread.java:7386)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980)
java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw an exception; no stack trace available

I have attached the logcat file.

regards

John.
 

Attachments

  • device.txt
    175 KB · Views: 13

Jmu5667

Well-Known Member
Licensed User
Longtime User
Hello

I have a login service, svc_wsh_login, which use's the websocket, I will attach it. I have a websockethandeler class that all our app use, I have also attached it. If I can provide anymore specific information please ask. I am trying different methods to try to track down what is causing the issue. I have yesterday also modified the manifest to include - SetApplicationAttribute(android:largeHeap, "true")

thanks in advance

John.
 

Attachments

  • svc_wsh_login.bas
    14.3 KB · Views: 5
  • WebSocketHandler.bas
    2.6 KB · Views: 5
Top