SensorApps / Sensors2OSC

Android app for sending sensor data via Open Sound Control (OSC).
http://sensors2.org/osc
Other
66 stars 18 forks source link

Crash on sending too much data #1

Closed residuum closed 9 years ago

residuum commented 9 years ago

On an HTC Desire with Android 2.3.3 (Cyanogenmod), selecting all data fields for sending crashes the app with java.util.concurrent.RejectedExecutionException.

This is because too many threads are launched for sending data, cf. http://stackoverflow.com/questions/25387614/android-java-util-concurrent-rejectedexecutionexception-task-android-os-asyncta

The problem is, that a thread is started for each value to send in https://github.com/SensorApps/Sensors2OSC/blob/master/app/src/main/java/org/sensors2/osc/communication/OscDispatcher.java#L25

residuum commented 9 years ago

This is probable best solved by using a task queue.

residuum commented 9 years ago

Fixed in 91c09cfecbb04491f6d790daaa84dc6598c83961