smith1992 / sloodle

Automatically exported from code.google.com/p/sloodle
GNU General Public License v3.0
0 stars 0 forks source link

Vending Machine sometimes crashes #140

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Rez a Vending Machine
2. Configure it to connect to a Distributor on your Moodle site
3. Leave it running for a long period of time (at least a week)

What is the expected output? What do you see instead?
The Vending Machine should continute operating without any problems.
However, the ones we use for distributing SLOODLE objects require to be
reset periodically.

Speculated cause:

It appears to be caused when the Vending Machine has to reconnect to the
Moodle site (i.e. its XMLRPC channel has expired and it needs a new one).
Within the "connecting" state there is a timeout, but this timeout returns
the script to the "default" state (that is the initial state where the tool
does nothing but wait for configuration). It seems that the script never
exits the default state after this happens, even if it receives a new
configuration.

I have implemented an experimental a fix on our SLOODLE "Latest Tools"
Vending Machine. The timeout will return the script to the "reconnecting"
state in order to attempt the connection again.

Original issue reported on code.google.com by pedro.mc...@gmail.com on 7 Apr 2010 at 9:43

GoogleCodeExporter commented 9 years ago
Issue 159 has been merged into this issue.

Original comment by peter.r.bloomfield on 2 Jan 2011 at 4:19

GoogleCodeExporter commented 9 years ago
Want to switch out the vending machine on the Sloodle island for the 
experimental one?

Original comment by edmund.e...@gmail.com on 3 Jan 2011 at 12:10

GoogleCodeExporter commented 9 years ago
Seems to be broken today as well. Appears as connected and works when used 
in-world, but can't send objects to an avatar from the web. 

Couldn't try resetting the main script in the distributor because it's still 
no-modify.

Tried reconnecting but that didn't help. Maybe SL is having XMLRPC issues?

Original comment by edmund.e...@gmail.com on 4 Jan 2011 at 3:01

GoogleCodeExporter commented 9 years ago
Aha, each individual script needed to be shared with the group as well. Sorry I 
hadn't spotted that. Sorted now.

I believe the experimental fix mentioned in the issue above was actually rolled 
out as standard a while back. So the SLOODLE Vending Machine already had that 
fix in it, but it obviously wasn't solving the current problem.

Examining the LSL though, I've spotted a potential culprit. The "connecting" 
state starts a timer (in case the XMLRPC or HTTP request in the initial setup 
times-out). But it never cancels it. Since timers persist over state changes, 
there's a possibility that it's getting stuck in a kind of race condition. It 
could fail once, then try again, but the lingering timer could make it think 
it's failed with another timeout, and it maybe just goes round and round like 
that.

Hopefully, adding in a cancel for the timer will resolve it. However, just to 
see, I'm going to log the timeout events externally and see what it says.

Original comment by peter.r.bloomfield on 4 Jan 2011 at 6:11