Pausing (e.g. in a debugger) causes all subsequent APIs to fail


#1

If you use a debugger on a C program that uses the Sensel API, set a breakpoint, and hit the breakpoint after calling a few APIs, all subsequent APIs will fail (with a “Failed to receive ack from sensor” error). I believe that any pause (due to a breakpoint or some other non-debug-related pause in the program) will cause the same failure. I noted this behavior very early on (at this no-longer-valid link):

 https://github.com/sensel/sensel-api-c-cpp/issues/7

but that issue didn’t make it over to this new forum. This issue can often be worked around, but ultimately this is a pretty serious issue, since if someone ships a program that uses the API, and that program pauses after startup, for any reason, it will fail completely. I currently use a separate executable for tracking things with the Morph, and send OSC/TUIO to a second program. I would like to embed Morph support directly in the second program, but this issue prevents me from doing that.

 ...Tim...

#2

This issue continues to plague me - I’m now actively trying to embed Morph support inside a FreeFrame plugin, to make it easier to distribute rather than requiring/using the separate TUIO server in github.com/nosuchtim/TUIO3D_Sensel.git. After embedding it, I’m finding the same issue - after pausing in a debugger, all APIs fail.

Is anyone else affected by this issue?


#3

Hi Tim,

Sorry for the delay. We are looking to add a register to the Morph that allows you to keep it the protocol open and prevent the device from timing out (which is causing the issue during pause). I will make sure to post here when the update has been released.

Best,
-Alex


#4

Hi Alex - thanks for the report, I’m very happy that the problem is understood and a solution is forthcoming.

…Tim…


#5

I just wanted to chime in and agree that a fix to this issue would be most welcome.


#6

Any progress on this? I’m now faced with an intermittent bug, and the inability to pause and continue is making it extremely difficult to track down.


#7

Facing this error as well while working on a TouchDesigner mod. It’s difficult to figure out where to initialize the handles if I’m unsure when readSensor will be called next.