I am trying to make a very simple app that synchronizes stopping/starting recording across several devices.
I am using a mashup of these two tutorials.
Both components work well on their own. However, when I change the record button to instead send a message to the server, and then perform the start/stop recording action when the multicasted message from the server is received, the app starts to crash randomly about 1/4 of the time.
This crash usually occurs with the following lines being outputted repeating infinitely in LogCat. The entire phone will eventually die/restart.
05-19 18:09:36.596: E/Camera3-Device(3781): RequestThread: Can't get output buffer, skipping request: No such device (-19)
05-19 18:09:36.596: E/BufferQueueProducer(3781): [GraphicBufferSource] dequeueBuffer: BufferQueue has been abandoned
05-19 18:09:36.597: E/Camera3-OutputStream(3781): getBufferLocked: Stream 7: Can't dequeue next output buffer: No such device (-19)
Has anyone seen these error logs before and know what the cause could be?
This problem disappears when the record button directly starts/stops recording, without sending/waiting for a server message.