hello,
using the following causes innerspace crash:
LavishScriptAPI.LavishScript.ExecuteCommand("relay is1 -echo test")
can't seem to get executemethod to not crash when using relay on a specific target. it's only with the specific target it crashes because ALL as a target works fine.
dotnet ExecuteMethod Relay Specific crashing
Moderators: Lavish Software Team, Moderators
I've tried echo, dotnet and both resulted in the same thing.Lax wrote:Are you always using the -echo flag in your tests that crash? Have you tried using the echo command instead of this flag?
What kind of crash is it? Do you get a Lavish crash reporter? If I had the crash information I might be able to interpret it
There is no report, innerspace freezes up and I have to close the process.
forgot to mention that i'm sending this command to the actual uplink console.amault wrote:I've tried echo, dotnet and both resulted in the same thing.Lax wrote:Are you always using the -echo flag in your tests that crash? Have you tried using the echo command instead of this flag?
What kind of crash is it? Do you get a Lavish crash reporter? If I had the crash information I might be able to interpret it
There is no report, innerspace freezes up and I have to close the process.
Okay, so it's not crashing. Freezing up is different.
My first thought now is that you're probably unwittingly deadlocking the process by performing this command from a GUI input thread. Like if you set up a windows forms app, and add a button on it, and in that button you put this command, you're going to lock up the process when you click the button. That's because you're requiring the button to synchronize with the main thread (it must Frame Lock in order to execute a command), meanwhile the main thread is waiting on your thread to process the input.
If this describes what you're doing, the solution is to make this call asynchronously. Create a new thread that executes your LavishScript, instead of doing it in the button's click handler code (and therefore in your GUI thread).
My first thought now is that you're probably unwittingly deadlocking the process by performing this command from a GUI input thread. Like if you set up a windows forms app, and add a button on it, and in that button you put this command, you're going to lock up the process when you click the button. That's because you're requiring the button to synchronize with the main thread (it must Frame Lock in order to execute a command), meanwhile the main thread is waiting on your thread to process the input.
If this describes what you're doing, the solution is to make this call asynchronously. Create a new thread that executes your LavishScript, instead of doing it in the button's click handler code (and therefore in your GUI thread).
This works.Lax wrote:You can always drop the command into the main thread's queue by using timedcommand, and this would avoid any relay-specific deadlocks.
e.g. timedcommand 0 relay is1 xyz
This will execute on the next frame (0 is the shortest delay possible for this command)
Also found that executecommand within a session to a specific target session works fine, Only the uplink console has problems with the relay target command it seems.