dotnet ExecuteMethod Relay Specific crashing

Discussion of Inner Space

Moderators: Lavish Software Team, Moderators

Post Reply
amault
GamingTools Subscriber
Posts: 9
Joined: Wed Jun 15, 2011 6:57 pm

dotnet ExecuteMethod Relay Specific crashing

Post by amault » Mon Feb 27, 2012 11:33 am

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.

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Mon Feb 27, 2012 1:07 pm

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 ;)

amault
GamingTools Subscriber
Posts: 9
Joined: Wed Jun 15, 2011 6:57 pm

Post by amault » Mon Feb 27, 2012 1:11 pm

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 ;)
I've tried echo, dotnet and both resulted in the same thing.

There is no report, innerspace freezes up and I have to close the process.

amault
GamingTools Subscriber
Posts: 9
Joined: Wed Jun 15, 2011 6:57 pm

Post by amault » Mon Feb 27, 2012 1:18 pm

amault wrote:
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 ;)
I've tried echo, dotnet and both resulted in the same thing.

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.

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Mon Feb 27, 2012 1:27 pm

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).

amault
GamingTools Subscriber
Posts: 9
Joined: Wed Jun 15, 2011 6:57 pm

Post by amault » Mon Feb 27, 2012 1:46 pm

The function runs fine on anything else (Run, echo, Relay All) but when I try Relay to a specific name it causes the freeze.

Does it matter that I'm sending it to the relay console instead of the session console?

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Mon Feb 27, 2012 2:09 pm

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)

amault
GamingTools Subscriber
Posts: 9
Joined: Wed Jun 15, 2011 6:57 pm

Post by amault » Mon Feb 27, 2012 2:28 pm

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)
This works.

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.

Post Reply