Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A Mutex Bug with sync actions #102

Open
MnFeN opened this issue Mar 20, 2024 · 0 comments
Open

A Mutex Bug with sync actions #102

MnFeN opened this issue Mar 20, 2024 · 0 comments

Comments

@MnFeN
Copy link
Contributor

MnFeN commented Mar 20, 2024

It seems that when a sync action is below another action in a trigger with a mutex to capture, it has a high chance to cause the error below when fired and crashes ACT.

Triggernometry v1.1.7.3 has this bug, but 1.1.6.7 does not.

Trigger:

<?xml version="1.0"?>
<TriggernometryExport Version="1">
  <ExportedTrigger Enabled="true" Source="None" Name="Mutex Bug" MutexToCapture="myMutex">
    <Actions>
      <Action OrderNumber="1" VariableOp="SetNumeric" VariableName="1" VariableExpression="2" ActionType="Variable" />
      <Action OrderNumber="2" VariableOp="SetNumeric" VariableName="3" VariableExpression="4" ActionType="Variable" Asynchronous="False" />
    </Actions>
  </ExportedTrigger>
</TriggernometryExport>

Exception message:

---------------------------
Fatal Error - Unhandled Exception
---------------------------
An unhandled exception has occurred.  ACT may close.
Press Ctrl-C to copy this MessageBox.

System.InvalidOperationException - Mutex Bug (e086d813-370b-405f-8f20-06c9a62def8d) at 2024/3/20 15:04:32' Failed to release mutex 'myMutex'.
   在 Triggernometry.RealPlugin.MutexInformation.Release(Context ctx)

   在 Triggernometry.Action.ExecutionImplementation(QueuedAction qa, Context ctx)

   在 Triggernometry.Action.Execute(QueuedAction qa, Context ctx)

   在 Triggernometry.RealPlugin.ActionThreadProc()

   在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

   在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

   在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

   在 System.Threading.ThreadHelper.ThreadStart()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant