Conflict between 'When Slider.PositionChanged' block and Taifun UDP

As long as I simply popup a Notifier message then there is no problem with the block.

But as soon as I try to send a UDP message within this block my whole app hangs up and I have to kill it and restart it.

Does anyone know about this conflict / bug?

image

well, these are some strange blocks, because
if false
means, the if statement will never be executed... so how can something be blocked there? probably there is an issue somewehre else in your blocks?
another suggestion is you probably could get the AccessPointIP address only once and assign it to a global variable and use that variable together with the Send method...

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

1 Like

'if false' is deliberate to disable that 'call ClientUDP' block without discarding it.
As long as that block is enclosed within 'if false' my app runs fine.
But if I swap it with the ShowAlert block then my app seems to hang as soon as I move the slider.

I will try the AccessPointIP suggestion but I don't reckon that is the problem. Because I have a bunch of buttons sending UDP messages when they are pressed as well. And they don't cause my app to hang.

There is definitely a bug either in the Slider code or in the ClientUDP code. I tried your suggestion but my app still hangs if I try and send a UDP message when the slider position changes.

Does that slider call the update function when the thumb lands on a new position or constantly as it is moving? If the latter then it may be causing the ClientUDP to flood the port with data. That could cause the app to hang.

Do you realize how often the slider updates when you move it? Do you know how many messages an extension has to send in 1 second? There are definitely no bugs in the slider code and extension codes. The way you use them is definitely a problem. Reduce the resolution of the data from the slider.

Consider using a Clock Timer to run your transmissions at a reasonable frequency.

Is it possible to have another block that only triggers when when the thumb lands on a new position and stays there for at least 1 second or whatever. I.E. The equivalent of a button click.

you can use clock component for that..
Set clock interval to 1000ms and try when..Slider is touched up/touched down then enable clock and when clock do...like that

No. But you can think of a procedure that will do something similar. You can also use a clock which will send the values ​​read from the slider every 1s.