This one is driving me crazy!
I have a Task with a timer. After the elapsed time it sets something to
m.top.test and resets the timer. But the next time I access
m.top.test the thread freezes.
Example:
<interface>
<field id = "test" type = "assocarray" />
</interface>
---------
while true
if m.timer.TotalSeconds() >= 5
m.timer.mark()
print "TEST 1"
print m.top.test
print "TEST 2"
m.top.test = createObject("roAssociativeArray")
print "TEST 3"
end if
end while
This loop works great once. The console prints "Test 1" "invalid" "Test 2" "Test 3" as expected. However the next time the timer elapses and it sets
m.top.test again it just... stops. Freezes once it tries to print
m.top.test and therefore only "Test 1" prints to the console.
If instead of printing out
m.top.test I print out
m.top it actually prints out the task node properly, and I'll get "Test 1" "Test 2" in the console.
TEST 1
<Component: roSGNode> =
{
functionName: "start"
sleepRelease: false
syncRelease: false
waitRelease: false
control: "run"
state: "run" <----- It's running?
change: <Component: roAssociativeArray>
focusable: false
focusedChild: <Component: roInvalid>
id: ""
test: <Component: roAssociativeArray> <----- It's there
[size=85][font=Helvetica Neue, Helvetica, Arial, sans-serif]}[/font][/size]
TEST 2
But once I try to assign to m.top.test then it freezes.
Details: This task is created by the main thread, and the main thread is observing "test" using a port for the callback. The callback is updating a roScreen.
I assume there are some specifics about Task that I'm missing? If anybody has run into anything similar, or there's something dumb I'm missing, I'd love to hear suggestions!