Jump to content

Large Mono scripts unstable (Possibly related to region crossings?) has anyone else had problems?


Amber Murfin
 Share

You are about to reply to a thread that has been inactive for 4321 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi,

 

I've created a set of scripts for Fighting sail ships, i've even released one that appears to not suffer any problems. However after adding a few new functions into the core script i have been experiencing several strange things happening. These have been happening in functions that i havn't altered since my successfull ship release.

At this stage i'll point out that i personally havn't experienced these problems, but several people i sent beta versions to have (While some have had no problems with the same ship). For example the ship would kedge (a way to turn a few degrees if you are stuck in the irons) at any speed with the sails down (drifting) for 1 person but not another (how it should work). Also som epeople have experienved an animation from a child prim being played when sat on the root prim instead of the captain animation.

Secondly, this ship, if you attempt a cat crossing (a diagonal crossing accross sims) it fails about 80% of the time (But not in the ship i've released with a very similar code base). When the crossing fails, you appear to be sat on the ship, but the control permissions get released and you get spammed with windows requesting them, clicking yes or no has no effect and the only option is to re-log, at which point you appear at 0,0,0 in one of the 3 sims involved in the crossing and the hull of the ship drifts on untill it hits something (And continues to spam you asking for permissions)

 

I was wondering if anyone else had experienced problems with large mono compiled scripts and possibly region crossings? The offending script is about 1500 lines of code and only uses about 2/3 of the available memory so should not cause problems like that. If i seperate the 1 script into 2 the region crossing problem goes away (You just very occasionally get un seated which has always happened but you don't get spammed with the permission requests)

My curent theory is that on region crossings maby the script is getting corrupted some how causing odd problems, but as yet, other than seperating it into 2 scripts (with the exact same code just several llMessagedLinked calls to transfer data) i havn't been able to find the issue.

The problem with the 2 script solution is that it uses more script time to execute and has a higher memory requirement which is what i was trying to avoid, although it looks like i'm going to have to go down that road. The only reason i havn't filed a Jira is because i have as yes, not been able to replicate reliabley all these issues or pin down any reason for the problems.

Link to comment
Share on other sites

It would be difficult to see what's really going on here without inspecting the scripts in detail, but the spamming of permissions requests at sim crossing rings a bell.  I recently had occasion to debug exactly that, from what should have been a very simple rowboat script.  The problem in that case was that the script was trying to stop and start animations constantly, based on control level (not edge), and that's doomed to fail at sim crossings. (It's also so horrifically laggy that it could interfere with sim crossings even succeeding, but that's beside the point here.)

I could imagine that splitting the script apart might have the side-effect of delaying the animation stuff (perhaps through llMessageLinked) so that the receiving sim has a chance of knowing for which avatar the script has permissions before trying to push new animations on it.

The correct solution in that case, of course, would be to instead change the whole animation logic so it only applies when it actually makes sense, perhaps with a combination of timer and control edge (not level).

But all this may have nothing to do with your problem.

Link to comment
Share on other sites

are you using llGetOwner() calls sprinkled throughout your code?

 since linden made the latest newish changes to sim crossings, some scripts seem to be coming out of suspend mode before the entire sim handoff is complete (seems like)

the script cant find out who is the key, affecting permissions and triggering the errors

so far the only way i can work out how to avoid this is to use a global owner variable at least for that part

+

it gets a bit worse if is another avatar sitting on it as well. affects their permissions in the same way

 also any Detect key function also has problems if called before the handoff is totally complete

maybe can make a global list of keys of sitters and see if that helps

+

other thing some people are doing now is coasting their vehicles across the boundary. putting all the scripts into their own written suspend state and then checking all the avatar keys and perm states after the sim crossing is signaled, before bringing the driver controls and drive scripts out of suspension and resuming

ps. in the suspend state then need to put in a impulse booster to keep the vehicle on the same speed and heading or the vehicle can lose weigh and sometimes get total stuck in the dark hole

Link to comment
Share on other sites

Hi, thank you for the replies.

 

I'll explaing the setup a little better here. There are 3 versions of the script.

 

V1) This is all in 1 script, it functions normally with no problems exactly as expected (It's besed on the tako scripts merged into 1 with extra events and functions added to deal with collisions / combat etc). 

 

V2) This is the same as V1 but with a function to repair the ship and a couple of very minor changes.

 

V3) this is the V2 script split back into the seperate scripts. 

 

all 3 scripts use a global variable which is set on rex to avoid using the llGetOwner() command, the script actually skips a full update cycle after every region crossing (So the ship will wait a minimum of 1.5 seconds after a crossign before doing anything).

With the Catcrossings i asume the ship is being handed off from region 2 to region 3 before it's actually completed handing over from region 1 which is causing the script to crash server side, as no matter how many tiomes you click yes to grant control permissions it stilla skes you again (And you never gain back control). This bug (i asume it's a server bug?) it presumable there all teh time but it's only evident from teh slightly larger script size (and memory requirements). At teh end of the day, these types of crossings have always been hit and miss to an extent with vehicled so it's no great supprise, and most people would avoid trying to cross diagonally accross a region corner.

what really puzzles me is things like the Kedge command, which will function perfectly for me, and my testing alt (with no special edit perms granted), but in the same sim someone else will consistantly have problems. (It uses a call to get the ground speed and if it's more than 1.5m/s you can't kedge, for some this wlll let you kedge when the sails are down and drifting). That function is identical, line for line from the V1 script and there seems to be no consistancy with how it fails. 

I'm wondering if there is a point at which these large mono scripts become "Unstable" in vehicles (It is about 1500 lines of code with many global variables) although it only ever uses about 2/3 of the theoretical memory available, and has no lists that could be causing it to overflow.

The sims these are often used in are openspace sims so i don't know if this makes a diference, but they are reasonably lightley loaded when this testing has been going on with only 2 or 3 avatars in.

I may raise a JIRA regarding the region crossings, although i expect it's about as likley to get fixed as the animation permissions after region crossings which has been around forever...

 

Amber

Link to comment
Share on other sites

you mention that both you and your test alt haven't experienced the problem. but some other people do in some situations

is there anything about them that is different to you?

like attachments/scripts that they are wearing

maybe can ask a person you know is being affected and see if they will help you test for this. is maybe not a cause but can maybe test for it just to eliminate it as a possibility

 

Link to comment
Share on other sites

My main av only ever has 1 or 2 scripts running at any time, an AO / or teh firestorm bridge (Depending on the viewer) and 1 other somewhere (Depending on how lazy i've been de-scripting things!), My test alt often uses the same so i suppose this could be a problem that something specific is interfearing, but it's be strange if it was interfearing with a vehicle script? I have run all these tests on my test alt with all the combat metres, weapons etc attached as well, but still no problems. 

 

At the moment i'm strugling to find anything that can link the various incidents, although i keep looking. People keep asking if it could be a permissions thing, but my test alt has no special permissions and should be the same as anyone else. 

 

i'm asuming that as i havn't noticed anyone else jumping up and down that no one else is either having problems, or has found anything. I suppose there must be something script related...

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4321 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...