Author Topic: [v1.7.5] Prebuilt inline function from old version stops by itself  (Read 2196 times)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
I came across this going from v1.7.3 to v1.7.5, but I figured it was something on my end, however it also occurred going from v1.7.5 to v1.7.5.3 unofficial:

An inline function built in v1.7.3 which checks the state of the VA.Stopped property will stop in v1.7.5 as the check will evaluate to true, even though no "Stop Commands" has been issued.
Functions compiled by v1.7.5(either at runtime or prebuilt) will not exhibit this behavior.

This also occurs with a prebuilt function compiled in v1.7.5(or v1.7.3) when executed in v1.7.5.3


I haven't tested this with plugins, but as they're compiled independent of VoiceAttack itself I would assume they're not affected(unless reports have been pouring in, which I haven't seen personally).


EDIT: A quick test doesn't show the plugin getting the value of that property wrong, or the stopped event triggered, at least.

I tested the inline function with v1.7.3.11 unofficial, where it still works fine. Unfortunately I deleted my backup of v1.7.4 by accident, so I can't check if the issue started with that or v1.7.5


Also, I must have only checked v1.7.5.3 with a prebuilt compiled in v1.7.5; When attempting to execute a prebuilt function compiled in v1.7.3 in v1.7.5.3, this exception is written to the log:
Quote
Inline function execution exception: Exception has been thrown by the target of an invocation. Attempt by method 'VAInline.main()' to access method 'VoiceAttack.VoiceAttackProxyClass.()' failed.


Lastly I tested the "CommandsStopped" event, which seems to work correctly in that it does not get triggered erroneously when compiled in v1.7.5 and running in v1.7.5.3


EDIT#2: v1.7.3.11 does the opposite, in that the Stopped property never becomes true, only the CommandsStopped event is triggered.


How I'm testing the property:
Code: [Select]
public class VAInline
{
public void main()
{
VA.WriteToLog("Stopped val = " + VA.Stopped);
while(!VA.Stopped)
{
System.Threading.Thread.Sleep(1000);
}
VA.WriteToLog("STOPPED", "red");
}
}

For v1.7.3 -> v1.7.3.11, the initial value is false and stays false when issuing Stop Commands
v1.7.3 -> v1.7.5 the initial value is true


EDIT#3: The behavior of v1.7.3.11 of the stopped property never changing started with v1.7.3.6, as 1.7.3.5 is the last version where it worked correctly

v1.7.3.6 is the version where a lot of the proxy functions were moved to subclasses.


EDIT#4: Everything seems to be working as expected from v1.8 onward, so I'm going to consider this outdated.
« Last Edit: March 03, 2020, 08:14:38 PM by Pfeil »