Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008253opensim[REGION] Scripting Enginepublic2017-10-22 05:132017-11-13 12:27
ReporterTron Mcp 
Assigned To 
Platformabout ca. 10 Types Operating SystemWin7 and Server 2012Operating System VersionWin7
Product Version0.9.0 
Target VersionFixed in Version 
Summary0008253: UP/DOWN Keys stop Function after physical vehicle SimBorder Crossing in Grid Mode
I made a boat script for 09 to cross sim borders in physic mode. It worked fine in Standalone Mode, even in StandaloneHypergrid mode. After i changed my server from StandaloneHypergrid to GridHypergrid the boat stops moving forward (UP/ DOWN Keys) after Sim Crossing (at same Instance). But it still rests in physik mode, and accepts the steering left and right (LEFT / RIGHT KEYS). Even Gear up/Down (PAGE UP / DOWN KEYS) worked.

So i changed the script to find out the reason. I changed the command Keys for move forward from UP up to PAGE UP and the boat continued driving after sim border crossing.

Steps To ReproduceUse 09 in Grid mode.

Take a physic object that can cross sim borders

Use and test the 4 Arrow keys and page up/down

Then cross Sim border in Grid Mode.

Now test key Functions again, and only UP/Down wont work
Additional InformationBoth Sims were in same Instance,in Standalone and even in Grid Mode.
Script crossing is allowed.
Trust binarys is false.

I can give you full access to my grid, and offer some boats / scripts for test.
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (1 Region per Sim)
Physics EngineBulletSim
Script Engine
Environment.NET / Windows64
Mono VersionNone
Attached Files? file icon attachment.lsl [^] (1,174 bytes) 2017-10-24 11:22
? file icon basicboat.lsl [^] (2,557 bytes) 2017-10-24 11:22
? file icon raceboat Gridmode Script.lsl [^] (13,385 bytes) 2017-10-26 09:19

- Relationships
related to 0008068closed Boats stop moving forward after sim crossing 

-  Notes
Lotek (reporter)
2017-10-23 00:16
edited on: 2017-10-23 00:16

Hello, I've had this happen when another attachment uses llTakeControls(). In my case this was the classic ZHAO AO hud and also when the bell is enabled on OsCollar/OpenCollar (it rings on moving the avatar with the arrows).

The weird thing is it only happens on water vehicles and not ground and air vehicles. Changing VEHICLE_TYPE_BOAT to VEHICLE_TYPE_CAR in a very basic bare-bones boat script will still trigger the bug with losing the controls.

What worked for me (not a permanent solution!) for keeping the controls is sit once, stand up, then sit again and then you can start boating over crossings while steering/moving.

Alternatively, detach any attachments that use llTakeControls().

Tron Mcp (reporter)
2017-10-23 08:37
edited on: 2017-10-23 08:43

Hello Lotec,

i will try and report if its another script that drops a script reset at Sim border crossing. There is a PMAC Multiposer in the boat. I will remove the multiposer, and insert a simple sit target.
And i will try to send a llTakecontrol after the change event at simcrossing.

The Avatar had no AO as it is a brandnew ruth.

But it does not explain, why i never had problems before i changed to Grid Mode.

I developped that boat script in 09RC1 in Standalone CommonMode. It was tested some months without any problems. And was running fine at in same Installation in HypergridStandalone before.

Stand up and sit again worked, but that is not a good solution.

UbitUmarov (administrator)
2017-10-24 08:57

Sorry I don't have enough information to try reproduce and debug this issue.
a Test script example would be nice.
Lotek (reporter)
2017-10-24 11:24

I probably should've attached those scripts to the related bug, but these scripts give a repro when the attachment is worn and crossing on the boat.
UbitUmarov (administrator)
2017-10-24 14:08

the last takecontrols call seems to take precedence.
in this scripts case, its done on the on_rez,
but could be also done by crossing code.
same thing happens when you sit on the boat, then attach the other object,
and that also happens at SL (just been there)
apparently that was reported as a bug there, then flagged as "Expected Behavior"
UbitUmarov (administrator)
2017-10-24 14:11

I m not closing this issue..
just that observation at SL does limit options, due to compatibility issues, we would like to keep at LSL
we, at least me, need to look into this in a bit more detail, something I can't today :(
UbitUmarov (administrator)
2017-10-24 19:07

did a few changes that seem to improve this a bit on crossings.
 TakeControls on same avatar may give unpredictable results on the processing of Pass and Accept arguments. On same cases the last one prevails, and in some of this cases "last" is undefined
Tron Mcp (reporter)
2017-10-26 09:11
edited on: 2017-10-26 09:28

Hi Ubit, hi Lotek,
i did my tests now, here the results:

First i changed the boat scripts to "raceboat.lsl", so that the PMAC Sit Multiposer script was not needed. With a blank schriptless Avatar it was now posible to cross the sim border in Grid mode without problems.
- So without poser same behavior in Grid mode, as before with Poser in Standlone Mode.

Next test was to modify the PMAC Multiposer to find out the problem.
Now i had the boat script and PMAC Poser in the boat. Ava without scripts.

Prepared with your ideas before, i found the "bug" soon.

I searched in the "changed (integer change)" routine.

the line " else if (change & CHANGED_REGION_START) llResetScript(); " was the reason for the behavior at sim crossing.
When resetting the poser scritp it took control of the keys.

so CHANGED_REGION_START seems to trigger even when sim crossing in Grid mode - but not in Standalone mode.

I added the script "Raceboot" and i can offer ready to test boats in my Grid at start region:

hop:// [^]

there are 3 test objects:

Raceboat without multiposer- crossing 09 without any problmes.
Windstorm45 with corrected poser - now crossing simborders in 09
Windstorm45 with poser problem

Please let me know if you want to visit, so i can give you god mode too.

Tron Mcp@

UbitUmarov (administrator)
2017-10-26 10:16

there should be no difference in standalone versus grid on that.
-scripts should not reset on crossings, that will break all the state of the object.
-and in case of takecontrols, the effect of several acting on same avatar is ill defined, in same cases the last to run (and that can be unpredictable) overrides previous ones, on other cases it does not
with you original examples that is easy to see, sit on boat and then attach, Boat controls are lost (if you reach mouse look it may move)and I seen the same at SL.
did you tested my changed region code?
Lotek (reporter)
2017-10-26 11:00
edited on: 2017-10-26 11:01

@Ubit For me (I'm not Tron) the problem seems fixed with your change

Btw, sometimes I do notice all script state lost in attachments when I'm just flying (no vehicle, just avi) over my regions crossing into neighbouring regions. Then the ZHAO HUD says it's starting and loads the poses notecard. I haven't figured out why yet and how to repro that. (this was already buggy before your latest change)

Tron Mcp (reporter)
2017-10-26 11:07

Ubi, how can i get your changed region code to test? Is it a compiled Opensim Version?
UbitUmarov (administrator)
2017-10-26 11:10

no, its on our git, master branch. You need to compile it (or have someone do it for you)
if there are no issues, osgrid will update their bins with this change, but can't tell when
Tron Mcp (reporter)
2017-10-26 15:33
edited on: 2017-10-27 03:34

ok, thank you. when i finished my grid i will try to compile myself, and make some extensions.

But i have an aditional Question: I found a new 09 limit:

I used the PMAC Multiposer in combination with my boat script in 08x for a long time- sitting even 5 Avas at one boat. Now when i transfer the boat to 09 oder 09RC2 i get the message:
"[01:18] Grid: There is no suitable surface to sit on, try another spot."
if a second Ava trys to sit at the boat.

I found out that it depends on the number of prims the boat has.

I changed the boat scripts now to all the fixes we discussed, so it runs fine over sim borders , even with 2 seated Avas. - but only as long as the physical boat has only one prim. if i atach a second Prim (Box) it blocks a second Ava from sitting.

When i use exactly the same poser in a statc Prim, everything works rigth.

UbitUmarov (administrator)
2017-10-27 06:57

"There is no suitable surface to sit on, try another spot"

That may happen if the selected prim to sit has physics shape type none, and all the prims with sittarget are already in use.
0.82 would sit you on the old very broken positions.
Like 0.9 will do using bullet or ubOde if the object is a non physical phantom.
(type none is now ignored on both).
ubOde may also return this error, if it could not find a spot on the physics shape.

RC2 is obsolete... we did a release that you can find at our site. (no changes on this if I remember)
if you like the most recent code and can't compile it, Osgrid does release binaries that follow our dev code almost on a weekly basis if and when that code did run on main osgrid regions for a few days without issues.
Tron Mcp (reporter)
2017-10-27 08:33

Thank you Ubit, that was exactly the problem.

When i tested 09 and 09RC2 i tried out when the change in code happened. With your description ists clear now.

As the boats were complex mesh, i only used one (deformed box )root Prim with physical shape, and made all mesh objects phantom with PRIM_PHYSICS_SHAPE_NONE. So i encreased the performace when sailing.

Now i changed the script and let so many prims with physical shape
PRIM_PHYSICS_SHAPE_CONVEX as i want to have passengers.

A first Test with a 2Prim boat and 2 Avas was sucessful.
UbitUmarov (administrator)
2017-10-27 08:42

well one should use type none as much as possible :(
but if there is no sittarget, sits (done by physics with ubOde) needs a physics shape (old code and bullet just sit on a odd position, as bad as no sit)
we do need to try to improve this..
BillBlight (developer)
2017-10-27 11:59

I use very complex mesh on my boats, and via the script I change the physics shape by name, by using the new function osGetLinkNumber, everything is NONE except for the root and the outer shell .. Keep the outer shell to CONVEX just to give more realistic collisions ..

By change the shape on every reset of the script in insures that things don't get out of wack on the physics shapes.
Tron Mcp (reporter)
2017-11-01 11:55

Thank you Ubi and Watcher. I installed the PRIM_PHYSICS_SHAPE_CONVEX in the main boat script (for 5 Prims)- and got a surprise. For the 2. Avatar you will still get the error "no suitable Surface to sit on, try another spot" as long as not all prims/meshes of the boat are set to convex ore prim.

i tried out if the error depends on the number of prims - and numbered prims 1 to 5 as PRIM_PHYSICS_SHAPE_CONVEX oder PRIM_PHYSICS_SHAPE_PRIM. The rest got SHAPE_NONE. it didnt work too.

So the only way is to make all prims with physics Shape. But then the complex mesh boat is not running smooth.
BillBlight (developer)
2017-11-01 12:00
edited on: 2017-11-01 12:08

Your sit target has to be in a prim that has a physics shape, I use the root prim with the boat scrip in it as my sit target and just adjust the offsets ..

if you want to see an example of this , go to " Open Water" and find to boat rezzers on the docks .. (NOTE: you will not be able to throttle up till you get out of the pits, and there will be just a bit of stutter as you cross that parcel line. But after you are in open water they should be smooth.)

ubODE is in use on that sim ..

UbitUmarov (administrator)
2017-11-01 12:31

top priority should be to make the boat light for physics simulation, that means setting all prims that are not boxes or true spheres type none as much as possible Convex is also a mid case option (they can still be a 256 vertices mesh).

Sits follow SL model, that is a bit restricted. A prim can only have one sit set by llSitTarget and that may still be needed for more precise sit control, and that includes adding prims just for sits.

sit works more or less like this.
- viewer sends region the id of the prim where the sit click happened (and info about on it)

- if that prim has a sit target defined and not in use, that is used.
- the link set is scanned from lowest link number prim up, the first found with sit target defined and not in used, is used.

if we reach this point and the prim shape type is none, the sit fails with that error.

- region asks physics engine for a sit position on that prim surface, with the information sent by viewer.
    Bullet will do nothing.
    ubOde will try to find a position on the physics Mesh.
    Since physics mesh may not match the visual ones, this may result in odd position, mesh builders need to take it in consideration.
    On convex prims the sit maybe be in air, since visual mesh holes and some cuts are covered.
    Engine may fail to find a position on some "strange" meshes.
    Non physical phantom prims have no physical mesh so do fail also

if still no position was found, old legacy sit is used. Avatar will be sited on a usually odd position, like 0.8

 the main difference relative to 0.8 is that shape type none does not even try the old legacy sit (0.8 basically ignored type None in most things), and of course ubOde try was added.

This does sound a area where OpenSim needs to move on from legacy model
Tron Mcp (reporter)
2017-11-08 04:28

Thank you Watcher and Ubi.

It took some time to test... it didnt work at once as desired.

First i changed the boats and inserted Prim Boxes as sit targets:

1. Test:
PRIM Link nr. 1 to 5 : Boxes with physic shape BOX ore Convex
Meshobjects (Prim nr. 6 to 15) with physic shape NONE

Result: Second Ava could not sit. Still same error.

2.Test: i increased the number of physic shaped Linkobjects, and made some Mesh objects physic too.

PRIM nr. 1 to 5 : Boxes with physic shape BOX ore Convex
Mesh nr 6 to 7 with physic shape Convex
Rest of Meshobjects (nr. 8 to 15) mesh with physic shape NONE
Now It worked, a second Ava could sit.

Then i tried to find out why this behavior happened.

The second Ava could not sit if i click to a ocupied (rootPrim) ore one of the shapeless Prims.
So the design " the link set is scanned from lowest link number prim up, the first found with sit target defined and not in used, is used." does not work properly. The shifting seems not to work.
If you try to sit at an non shaped link Prim, you cant sit you were not shiftet to an empty Prim
Aditional when you try to sit as second AVA at the occupied RootPrim, you were not shifted to an empty prim too.
UbitUmarov (administrator)
2017-11-12 04:05

Ok, did a few more changes
UbitUmarov (administrator)
2017-11-13 12:27

actually the changes where morel relative to mantis 8265, since identical base issue

- Issue History
Date Modified Username Field Change
2017-10-22 05:13 Tron Mcp New Issue
2017-10-23 00:16 Lotek Note Added: 0032362
2017-10-23 00:16 Lotek Note Edited: 0032362 View Revisions
2017-10-23 00:20 Lotek Relationship added related to 0008068
2017-10-23 08:37 Tron Mcp Note Added: 0032366
2017-10-23 08:40 Tron Mcp Note Edited: 0032366 View Revisions
2017-10-23 08:43 Tron Mcp Note Edited: 0032366 View Revisions
2017-10-24 08:57 UbitUmarov Note Added: 0032367
2017-10-24 11:22 Lotek File Added: attachment.lsl
2017-10-24 11:22 Lotek File Added: basicboat.lsl
2017-10-24 11:24 Lotek Note Added: 0032368
2017-10-24 14:08 UbitUmarov Note Added: 0032369
2017-10-24 14:11 UbitUmarov Note Added: 0032370
2017-10-24 19:07 UbitUmarov Note Added: 0032371
2017-10-26 09:11 Tron Mcp Note Added: 0032374
2017-10-26 09:19 Tron Mcp File Added: raceboat Gridmode Script.lsl
2017-10-26 09:20 Tron Mcp Note Edited: 0032374 View Revisions
2017-10-26 09:22 Tron Mcp Note Edited: 0032374 View Revisions
2017-10-26 09:28 Tron Mcp Note Edited: 0032374 View Revisions
2017-10-26 10:16 UbitUmarov Note Added: 0032375
2017-10-26 11:00 Lotek Note Added: 0032376
2017-10-26 11:01 Lotek Note Edited: 0032376 View Revisions
2017-10-26 11:07 Tron Mcp Note Added: 0032377
2017-10-26 11:10 UbitUmarov Note Added: 0032378
2017-10-26 15:33 Tron Mcp Note Added: 0032379
2017-10-27 01:22 Tron Mcp Note Edited: 0032379 View Revisions
2017-10-27 03:34 Tron Mcp Note Edited: 0032379 View Revisions
2017-10-27 06:57 UbitUmarov Note Added: 0032380
2017-10-27 08:33 Tron Mcp Note Added: 0032381
2017-10-27 08:42 UbitUmarov Note Added: 0032382
2017-10-27 11:59 BillBlight Note Added: 0032383
2017-11-01 11:55 Tron Mcp Note Added: 0032389
2017-11-01 12:00 BillBlight Note Added: 0032390
2017-11-01 12:08 BillBlight Note Edited: 0032390 View Revisions
2017-11-01 12:31 UbitUmarov Note Added: 0032391
2017-11-08 04:28 Tron Mcp Note Added: 0032402
2017-11-12 04:05 UbitUmarov Note Added: 0032416
2017-11-13 12:27 UbitUmarov Note Added: 0032422

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker