Project

Profile

Help

Bug #90

closed

Trigger variables sometimes collide

Added by Vincent Le Goff almost 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
High
Category:
SharpScript
Sprint/Milestone:
% Done:

100%

Company:
-
Contact person:
-
Additional contact persons:
-

Description

Sometimes, when the same input calls different triggers, their variables conflict. Since triggers use $1 and $2, and that depends on their order of execution, when two triggers are executed but not in the right order, they use variables of the others, which creates a real bug.

Actions #1

Updated by Vincent Le Goff almost 8 years ago

  • Category set to SharpScript
  • Status changed from Open to In Progress
  • % Done changed from 0 to 20

After some testing, it appears that the problem comes from several threads running at the same time. Each client being in a separate thread, messages could arrive at the same time. Furthermore, when opening the same world in different tabs, the triggers aren't copied (so the SharpScript engine is one of them, not both, which creates conflicts). The solution would be to use a locking system when executing triggers (or macros/aliases, for that matter). This would also reset the SharpScript engine for triggers being executed.

Actions #2

Updated by Vincent Le Goff almost 8 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 20 to 100

Please register to edit this issue

Also available in: Atom PDF Tracking page