google-code-export / bwapi-mono-bridge

Automatically exported from code.google.com/p/bwapi-mono-bridge
0 stars 0 forks source link

The clr client prompt can only run for one game #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start clr prompt as Admin.
2. Start game through chaoslauncher as usual.
3. Restart a game.

What is the expected output? What do you see instead?
The clr prompt should have been in the background restarting the bot. Instead 
it has been closed, so the game can't find any ai.

What version of the product are you using? On what operating system?
BWAPI 3.2Beta
bwapi-mono-bridge 3.2b
Windows 7 x64
Starcraft 1.16.1

Please provide any additional information below.

Original issue reported on code.google.com by twsandb...@gmail.com on 29 Oct 2010 at 8:48

GoogleCodeExporter commented 9 years ago
You might need to be more specific, using your bot running via 
monoaimoduleloader.exe I can restart as many times as I want without crashing. 
Which bot is having trouble restarting.

Original comment by dpershouse@gmail.com on 29 Oct 2010 at 2:00

GoogleCodeExporter commented 9 years ago
Issue 11 has been merged into this issue.

Original comment by dpershouse@gmail.com on 29 Oct 2010 at 2:01

GoogleCodeExporter commented 9 years ago
This issue is now for both embedded and clr. Still cannot reproduce.

Original comment by dpershouse@gmail.com on 29 Oct 2010 at 2:02

GoogleCodeExporter commented 9 years ago
To get more info on the crash, you can run your clr-client bot via commandline 
or in your bot.cs file implement a last chance handler which logs to a file:
eg

AppDomain currentDomain = AppDomain.CurrentDomain; 
currentDomain.UnhandledException += new EventHandler(LastChanceHandler);

void LastChanceHandler(object sender, UnhandledExceptionEventArgs args) 
{ 
Exception ex = ((Exception)(args.ExceptionObject)); 
Logging.WriteLine("****** LastChanceHandler ******"); 
Logging.WriteLine("ExceptionType: {0}", ex.GetType().Name); 
Logging.WriteLine("HelpLine: {0}", ex.HelpLink); 
Logging.WriteLine("Message: {0}", ex.Message); 
Logging.WriteLine("Source: {0}", ex.Source); 
Logging.WriteLine("StackTrace: {0}", ex.StackTrace); 
Logging.WriteLine("TargetSite: {0}", ex.TargetSite); 
}

Original comment by dpershouse@gmail.com on 29 Oct 2010 at 2:13

GoogleCodeExporter commented 9 years ago
This is a known limitation of mono. No known work around as of yet.

Original comment by tjmonk15 on 1 Nov 2010 at 2:15

GoogleCodeExporter commented 9 years ago
Ok, I have added your test exeption handling code, but there was an error with 
new EventHandler, it should have been a new UnhandledExceptionEventHandler.

I have uploaded a screenshot from the CMD, but as you can see it disconnects 
after I press restart in the StarCraft game, instead of StarTing Match! again.

I'm not sure why it works for you and not for me.

Original comment by twsandb...@gmail.com on 1 Nov 2010 at 10:04

Attachments:

GoogleCodeExporter commented 9 years ago
Ahh, thats because the bot is programmed to do that. It is just to show how to 
write a very simple bot. 

Original comment by dpershouse@gmail.com on 2 Nov 2010 at 3:47

GoogleCodeExporter commented 9 years ago

Original comment by dpershouse@gmail.com on 3 Nov 2010 at 11:26