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

Strange numeral output in console after starting the game #2

Open
Darker opened this issue Apr 10, 2015 · 6 comments
Open

Strange numeral output in console after starting the game #2

Darker opened this issue Apr 10, 2015 · 6 comments
Assignees

Comments

@Darker
Copy link

Darker commented Apr 10, 2015

Hello. Running the example bot results in no actions ingame. Instead, as soon as the game starts, the BOT starts printing some mess in the console:

Attempting to init BWAPI...
BWAPI ready.
Connecting to Broodwar...
0 | 17604 | 0 | 6734110
1 | 4294967295 | 0 | 0
2 | 4294967295 | 0 | 0
3 | 4294967295 | 0 | 0
4 | 4294967295 | 0 | 0
5 | 4294967295 | 0 | 0
6 | 4294967295 | 0 | 0
7 | 4294967295 | 0 | 0
0 | 17604 | 0 | 6734110
1 | 4294967295 | 0 | 0
2 | 4294967295 | 0 | 0
3 | 4294967295 | 0 | 0
4 | 4294967295 | 0 | 0
5 | 4294967295 | 0 | 0
6 | 4294967295 | 0 | 0
7 | 4294967295 | 0 | 0
0 | 17604 | 0 | 6734110
1 | 4294967295 | 0 | 0
2 | 4294967295 | 0 | 0
3 | 4294967295 | 0 | 0
4 | 4294967295 | 0 | 0
5 | 4294967295 | 0 | 0
6 | 4294967295 | 0 | 0
7 | 4294967295 | 0 | 0
0 | 17604 | 0 | 6734110

This goes on for a while then it stops. What is it? Why isn't the bot doing anything? I observed the same problem with my friend's bot.

@Darker
Copy link
Author

Darker commented Apr 10, 2015

After updating the bwmirror the output changed slightly, but it's still non functional:

Connecting to Broodwar...
Game table mapping not found.
Game table mapping not found.
Game table mapping not found.
Game table mapping not found.
Game table mapping not found.
Game table mapping not found.
Game table mapping not found.
Game table mapping not found.
Game table mapping not found.
Game table mapping not found.
Game table mapping not found.
Game table mapping not found.
Game table mapping not found.
Game table mapping not found.
Game table mapping not found.
Game table mapping not found.
0 | 20696 | 0 | 8271563
1 | 4294967295 | 0 | 0
2 | 4294967295 | 0 | 0
3 | 4294967295 | 0 | 0
4 | 4294967295 | 0 | 0
5 | 4294967295 | 0 | 0
6 | 4294967295 | 0 | 0
No server proc ID
7 | 4294967295 | 0 | 0
No server proc ID
0 | 20696 | 0 | 8271563
1 | 4294967295 | 0 | 0
2 | 4294967295 | 0 | 0
3 | 4294967295 | 0 | 0
4 | 4294967295 | 0 | 0
5 | 4294967295 | 0 | 0
6 | 4294967295 | 0 | 0
7 | 4294967295 | 0 | 0
No server proc ID
0 | 20696 | 0 | 8271563
1 | 4294967295 | 0 | 0
2 | 4294967295 | 0 | 0
3 | 4294967295 | 0 | 0
4 | 4294967295 | 0 | 0
5 | 4294967295 | 0 | 0
6 | 4294967295 | 0 | 0
7 | 4294967295 | 0 | 0
0 | 20696 | 0 | 8271563

@vjurenka vjurenka self-assigned this Apr 11, 2015
@chriscoxe
Copy link

Short answer: I expect it is because the BWAPI server version is incompatible with the versions of BWMirror that you're using.

Long answer:

In your first post, I think that version of BWAPI (is it 3.7.4?) doesn't write errors about BWAPI Client connection problems to the console which is why you weren't seeing any error messages. I don't know what kind of problem was occurring - there are a few kinds of problem that could be occurring and cause it to do nothing, e.g. incompatible server & client because the BWAPI server revision number is not equal to BWAPI client revision number (which is what I am guessing is happening for you) or unable to read and/or write to shared memory due to insufficient rights (I have seen this happen for me in Windows 7 when I don't run both Chaoslauncher and a bot client as Administrator).

In your second post it appears that the BWMirror version that you're using was built with a later version of BWAPI that writes errors to the console but is affected by a bug in BWAPI that I subsequently fixed in BWAPI revision 4452.

I think you need to use (and BWMirror needs to be built with) a version of BWAPI that is not affected by the bug that I fixed. Unfortunately, that either means a later version of BWAPI (e.g. BWAPI 4.0.1 Beta which is revision 4453) or an earlier version like 3.7.4 (but this is not compatible with BWMirror v2.x - only v1.x). Unfortunately, there are currently no releases of BWAPI v4.x and BWMirror v2.x that are compatible. You may need to wait for the developers of BWMirror to do another release, or build a compatible version of BWMirror (or BWAPI) yourself.

@chriscoxe
Copy link

FYI, the lines displayed such as:

0 | 20696 | 0 | 8271563

... are being written by BWAPI's client source code (i.e. not by BWMirror source code) printing out details of the game instances, but the meaning is not obvious.
1st number: game instance (0 to 7).
2nd number: BWAPI server process ID (PID). 4294967295 or 0 mean none.
3rd number: 0 if no client is connected, 1 if a client is connected.
4th number: a timer that is updated by the BWAPI server process. If it keeps updating, we know it is still running & working.

@vjurenka
Copy link
Owner

Hello, I've posted 2.3 today, can you check if it still happens?

@chriscoxe
Copy link

The OP should check too, but now that #3 has been fixed I can now get the example bot that is included in the official BWMirror 2.3 source code release working with BWAPI 4.1.0 Beta. It contains the example bot but the example bot ZIP file has not been updated - it is still version 2.1, i.e. ExampleBot2_1.zip, which only contains bwmirror_v2_1.jar, not bwmirror_v2.3.jar - but after you unzip the example bot you can use the bwmirror_v2_3.jar from the dist folder. Here is the output you should expect to see if it is working:

C:\Users\chrcox\Desktop\bots-related\BWMirror-2.3\example\ExampleBot>java -cp "b
in;..\..\dist\bwmirror_v2_3.jar" TestBot1
Connecting to Broodwar...
Game table mapping not found.
Game table mapping not found.
Game table mapping not found.
0 | 112 | 0 | 4978428
1 | 0 | 0 | 0
2 | 0 | 0 | 0
3 | 0 | 0 | 0
4 | 0 | 0 | 0
5 | 0 | 0 | 0
6 | 0 | 0 | 0
7 | 0 | 0 | 0
Connected
Connection successful
Connection successful, starting match...
Waiting...
Game ready!!!
Analyzing map...
Map data ready
New unit Resource_Mineral_Field
New unit Resource_Mineral_Field
New unit Resource_Mineral_Field
New unit Resource_Vespene_Geyser
New unit Protoss_Probe
New unit Resource_Mineral_Field

...

@vjurenka
Copy link
Owner

Hi, thanks for noticing, I've updated the ExampleBot

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

3 participants