Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

[BUG-227303] collisions makes a script stop running and revert its mono status #5631

Open
sl-service-account opened this issue Jul 7, 2019 · 1 comment

Comments

@sl-service-account
Copy link

What just happened?

(This bug affects only mono script)

using

 collision_start(integer num_detected){

if(!(llDetectedType(0) & AGENT))

{ llSay(0,"Collided ....!"); }

}

in a script dropped into the root prim of a vehicle ie boat, after x amount of sim border crossings the script will set itself to not running.

Having collisions_start in any script in a moving vehicle will shut down said script after x amount of sim regions crossed, though this issue does not happen in older scripts with collisions.

No error messages received, the script silently sets itself to not running and if land collisions also applied the script will usually lose its mono status as well as setting itself to not running, after x amount of sim borders crossed.

my full bug test script which will revert its mono status as well as shutting down after x amount of borders, usually much quicker than the collision only event:

default
 {
 state_entry()
 {
 }
 land_collision_start(vector pos)

{ llSay(0,"You ran aground...!"); //simply detects a land/terrain collision and reports it in local chat }

collision_start(integer num_detected){

if(!(llDetectedType(0) & AGENT))

{ llSay(0,"Collided ....!"); //simply excludes avatar collisions, and then reports only object collisions in local chat }

}

changed(integer change)//// I added this just to let us know the script is still alive immediately after a sim border crossing
 {
 if (change & CHANGED_REGION)

{ llSay(0,"test"); //when this message is not received after crossing a border, the script has somehow set to not running and usually also lost its mono status. }

}
 }

All testing done on blake sea sailing sims.

 

I had to debug a much larger project before discovering it was the collisions causing the issue.

UPDATE : I tried to compile the script non mono, and now it runs fine, so mono + collisions = dead script, with maybe the exception of vehicle scripts with collisions active within the drive script as I believe a permission take controls may actually be keeping the script alive in those cases. or they are all compiled in non mono.

What were you doing when it happened?

scripting and testing my scripts

What were you expecting to happen instead?

i was expecting the script i made to continue running...

Other information

I am only trying to add simple hull damage, I am curious why nobody else seems to be reporting this issue as there are no doubt many scripts in the public domain using collisions, leading me to suspect maybe scripts after a certain date using collisions will suffer this issue ?

Original Jira Fields
Field Value
Issue BUG-227303
Summary collisions makes a script stop running and revert its mono status
Type Bug
Priority Unset
Status Accepted
Resolution Accepted
Reporter SaZaN Senizen (sazan.senizen)
Created at 2019-07-07T12:51:57Z
Updated at 2019-07-09T09:02:20Z
{
  'Build Id': 'unset',
  'Business Unit': ['Platform'],
  "Is there anything you'd like to add?": 'I am only trying to add simple hull damage, I am curious why nobody else seems to be reporting this issue as there are no doubt many scripts in the public domain using collisions, leading me to suspect maybe scripts after a certain date using collisions will suffer this issue ? ',
  'ReOpened Count': 0.0,
  'Severity': 'Unset',
  'System': 'SL Simulator',
  'Target Viewer Version': 'viewer-development',
  'What just happened?': 'using  \r\ncollision_start(integer num_detected){\r\n           \r\n            if(!(llDetectedType(0) & AGENT)) { \r\n                llSay(0,"Collided ....!");   \r\n              \r\n            }\r\n        }\r\n\r\nin a script dropped into the root prim of a vehicle ie boat, after x amount of sim border crossings the script will set itself to not running.\r\n\r\nHaving collisions_start in any script in a moving vehicle will shut down said script after x amount of sim regions crossed, though this issue does not happen in older scripts with collisions.\r\n\r\nNo error messages received, the script silently sets itself to not running and if land collisions also applied the script will usually lose its mono status as well as setting itself to not running, after x amount of sim borders crossed.\r\n\r\nmy full bug test script which will revert its mono status as well as shutting down after x amount of borders, usually much quicker than the collision only event: \r\n\r\ndefault\r\n{\r\n    state_entry()\r\n    {\r\n    }\r\n    land_collision_start(vector pos) {\r\n        llSay(0,"You ran aground...!");   //simply detects a land/terrain collision and reports it in local chat\r\n      \r\n    }\r\n    collision_start(integer num_detected){\r\n           \r\n            if(!(llDetectedType(0) & AGENT)) { \r\n                llSay(0,"Collided ....!");    //simply excludes avatar collisions, and then reports only object collisions in local chat\r\n              \r\n            }\r\n        }\r\n       \r\n     changed(integer change)//// I added this just to let us know the script is still alive immediately after a sim border crossing\r\n    {\r\n        if (change & CHANGED_REGION)\r\n        {\r\n            llSay(0,"test"); //when this message is not received after crossing a border, the script has somehow set to not running and usually also lost its mono status.\r\n        }\r\n    }\r\n}\r\nAll testing done on blake sea sailing sims.',
  'What were you doing when it happened?': 'scripting and testing my scripts ',
  'What were you expecting to happen instead?': 'i was expecting the script i made to continue running...',
  'Where': 'all testing was done on the blake sea sailing sims.',
}
@sl-service-account
Copy link
Author

SaZaN Senizen commented at 2019-07-07T12:57:52Z

worth noting I can reproduce this issue just by using 

default
{
state_entry()
{
}
collision_start(integer num_detected)
{
}
}

checking the script after some time I will find it has set itself to not running, maybe even lost its mono status, after x amount of sim borders crossed when script is placed in the root prim of a any boat.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant