PhilipsHueSDK-Java-MultiPlatform-Android icon indicating copy to clipboard operation
PhilipsHueSDK-Java-MultiPlatform-Android copied to clipboard

Another concurrent modification error

Open mikep01 opened this issue 8 years ago • 0 comments

Looking at the code, it probably needs a semaphore, though I can't see everything.

I can't fix this in my code (except perhaps by not searching or retrying). This happens when I retry a bridge search after there is no response (at all) from the SDK. Seems like perhaps when the response finally arrives there's two handlers and they step on each other? Since it's down in the guts in a separate thread I don't have any way to catch this and ignore - it crashes my app.

java.util.ConcurrentModificationException java.util.ArrayList$Itr.next(ArrayList.java:831) com.philips.lighting.hue.sdk.notification.impl.PHNotificationManagerImpl$1.onReceived(PHNotificationManagerImpl.java:138) com.philips.lighting.hue.sdk.notification.impl.PHHueResultReceiver.execute(PHHueResultReceiverjava:24) com.philips.lighting.hue.sdk.notification.impl.PHNotificationManagerImpl.notifySDKError(PHNotificationManagerImpl.java:146) com.philips.lighting.hue.sdk.connection.impl.PHBridgeInternal$1.run(PHBridgeInternal.java:132)

mikep01 avatar Nov 01 '17 04:11 mikep01