Author Topic: ULX Jails break in remove triggers.  (Read 4105 times)

0 Members and 1 Guest are viewing this topic.

Offline LuaTenshi

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 47
  • Just your ordinary moon angel!
    • Mirai.Red
ULX Jails break in remove triggers.
« on: September 01, 2012, 10:25:01 PM »


As you can see in the picture above, the jails glitch in remove triggers.

For example, if you are standing in a trigger that removes all props, and I jail you. You will be jailed how ever if I unjail you, you will be set free but the cage will stay and keep re-spawning its self no matter what.

This breaks spawn protections scripts as well as maps with spawn protection built in.

After a few minutes of the jails glitching the server crashed.
I cry every time I see that I am not a respected member of this community.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ULX Jails break in remove triggers.
« Reply #1 on: September 02, 2012, 01:56:22 PM »
cage will stay and keep re-spawning its self no matter what.

Well, in a way, this is intentional.
Though we never intended it to crash a server, we DID want a jail to remain no matter what another player or script may do.
It sounds as though by the time ULX is used to unjail someone, it seems as though ULX jail glitches, where, in fact, lua memory has queued so much on replacing the jail that the <whatever non-ULX script> that has tried removing it <x 100s> of times has got caught in a loop, which then crashes the server.
Sounds to me like the ULX 'don't let a jail get broken' and the <whatever script> 'don't let a prop be spawned' portions are duking it out, with the server as a casualty.

I don't see a nice way to safely exit unless, perhaps, we have ULX detect a race condition (say, ULX sees itself have to 'fix' a jail 20 times in <x> seconds>) and then tell jailer "Sorry, race detected, where are you trying to put the jail?"
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline LuaTenshi

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 47
  • Just your ordinary moon angel!
    • Mirai.Red
Re: ULX Jails break in remove triggers.
« Reply #2 on: September 02, 2012, 04:27:46 PM »
Well, in a way, this is intentional.
Though we never intended it to crash a server, we DID want a jail to remain no matter what another player or script may do.
It sounds as though by the time ULX is used to unjail someone, it seems as though ULX jail glitches, where, in fact, lua memory has queued so much on replacing the jail that the <whatever non-ULX script> that has tried removing it <x 100s> of times has got caught in a loop, which then crashes the server.
Sounds to me like the ULX 'don't let a jail get broken' and the <whatever script> 'don't let a prop be spawned' portions are duking it out, with the server as a casualty.

I don't see a nice way to safely exit unless, perhaps, we have ULX detect a race condition (say, ULX sees itself have to 'fix' a jail 20 times in <x> seconds>) and then tell jailer "Sorry, race detected, where are you trying to put the jail?"

I am guessing you can create an entity over the jail, and make it so if that entity is removed the jail is removed that way, no scripts that are meant to delete props will break the jails.
I cry every time I see that I am not a respected member of this community.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: ULX Jails break in remove triggers.
« Reply #3 on: September 03, 2012, 05:32:32 PM »
You'll have to give me instructions on how to duplicate this. Is this DarkRP? What map? What coordinates?
Experiencing God's grace one day at a time.

Offline LuaTenshi

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 47
  • Just your ordinary moon angel!
    • Mirai.Red
Re: ULX Jails break in remove triggers.
« Reply #4 on: September 04, 2012, 01:17:53 PM »
You'll have to give me instructions on how to duplicate this. Is this DarkRP? What map? What coordinates?

The game mode I am in is DarkRP but that should not matter.
It does not matter what map as long as there is a trigger to remove props in the area where a person is jailed, this happens.
So the coordinates should not matter as well.

In this case the map is custom but there are many other maps that this can happen on for example the spawn area of "zombiesurvival_b11".

Pretty much every where there is a trigger_remove(https://developer.valvesoftware.com/wiki/Trigger_remove) this glitch will happen.
I cry every time I see that I am not a respected member of this community.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: ULX Jails break in remove triggers.
« Reply #5 on: September 04, 2012, 06:44:24 PM »
You made the list: https://github.com/Nayruden/Ulysses/issues/12

We'll get to it when we can!

Of course, if you'd like to try your hand at fixing this yourself, we would gladly accept a patch (after review and approval) and give credit where it's due. :)

A fix would retain the ability for the jail to repair itself, but either stop the trigger_remove from removing the jail (if possible) or gracefully fail somehow. Perhaps detect if the jail would be in a trigger_remove when the command is run...
« Last Edit: September 04, 2012, 06:46:54 PM by Megiddo »
Experiencing God's grace one day at a time.