News:

Help! We're trapped in the computer, and the computer is trapped in 2008! Someone call the time police!

Main Menu

War3 NumberFormatException on connect

Started by Crixus, July 12, 2007, 10:44:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Crixus

I get the following error when trying to connect most of the time. I'm using Core-42 and Plugins-42. I haven't looked at the code too much, but it appears that the string it's trying to parseInt on is too large to fit into a Java int. Could this be solved by changing it to use longs in CheckRevision? Or does that screw up the bitwise ops?

[21:37:39.173] INFO: Trying BNLS server: hdx.jbls.org
[21:37:39.323] INFO: Resolving ip for server: uswest.battle.net
[21:37:39.471] INFO: Resolves to 12 different addresses
[21:37:39.571] INFO: Choosing address 3 [uswest.battle.net/63.241.83.110]
[21:37:39.690] INFO: Attempting to connect
[21:37:39.856] INFO: Connected to /63.241.83.110:6112
[21:37:39.870] INFO: Trying BNLS server: hdx.jbls.org
[21:37:39.887] INFO: Connected to uswest.battle.net:6112
[21:37:39.934] INFO: Sending protocol byte (0x01).
[21:37:39.937] INFO: Switching to Binary protocol.
[21:37:39.939] INFO: Sending authorization.
[21:37:45.000] WARNING: BNLS server 'hdx.jbls.org' returned an error -- this means the server might not be running.
[21:37:45.015] WARNING: The error is: java.net.SocketException: Connection timed out
[21:37:45.083] INFO: Attempting to use next BNLS server.
[21:37:45.111] WARNING: Out of BNLS servers, defaulting to local hashing.
[21:37:45.119] INFO: Authorization sent, waiting for reply.
[21:37:45.127] INFO: Beginning to receive packets
[21:37:45.172] INFO: Checking server's signature...
[21:37:45.216] INFO: Server successfully authenticated -- it's Blizzard's
[21:37:45.268] java.lang.NumberFormatException: For input string: "3888226066"
[21:37:45.270] java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
[21:37:45.271] java.lang.Integer.parseInt(Integer.java:459)
[21:37:45.272] java.lang.Integer.parseInt(Integer.java:497)
[21:37:45.273] versioning.CheckRevision.checkRevision(CheckRevision.java:76)
[21:37:45.275] versioning.Game.checkRevision(Game.java:118)
[21:37:45.276] versioning.BNLSWrapper.getVersionCheck(BNLSWrapper.java:121)
[21:37:45.277] Login.getAuthCheck(Login.java:152)
[21:37:45.278] PluginMain.processedPacket(PluginMain.java:295)
[21:37:45.279] pluginmanagers.PluginRegistration.processedIncomingPacket(PluginRegistration.java:722)
[21:37:45.280] bot.PacketThread.run(PacketThread.java:179)

Hdx

Thats exactly what you would do to change it.
As for useing JBLS, it should be fine now. My host switched to a dedicated server, and was having trouble switching my account over.
So for now I got *.jbls.org pointing at my own box.
~Hdx
http://img140.exs.cx/img140/6720/hdxnew6lb.gif
09/08/05 - Clan SBs @ USEast
[19:59:04.000] <DeadHelp> We don't like customers.
[19:59:05.922] <DeadHelp> They're assholes
[19:59:08.094] <DeadHelp> And they're never right.

Crixus

I initially used the method described at http://www.javaop.com/plugins.html to try and rebuild the BNetLogin jar after making changes to CheckRevision.java. However, I found that the changes to the source weren't being compiled (and thus not updated in the jar). I was under the impression that saving would automatically compile files, but it doesn't seem to want to update the .class file. I've also tried doing it from the command line with

javac -classpath ~/workspace/javaop2_pub/src/:~/workspace/BNetLogin/versioning/ CheckRevision.java

However, it insists that it can't find the GameData class

CheckRevision.java:50: cannot find symbol
symbol  : class GameData
location: class versioning.CheckRevision
        GameData gameData = new GameData();
        ^
CheckRevision.java:50: cannot find symbol
symbol  : class GameData
location: class versioning.CheckRevision
        GameData gameData = new GameData();
                                ^
Note: CheckRevision.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors


However, GameData.java and GameData.class are in ~/workspace/BNetLogin/versioning/ . Any tips on how to get this to compile?


Hdx

cd ~/workspace/BnetLogin/
javac -cp .;~/workspace/javaop2_pub/src ./versioning/CheckRevision.java

~Hdx
http://img140.exs.cx/img140/6720/hdxnew6lb.gif
09/08/05 - Clan SBs @ USEast
[19:59:04.000] <DeadHelp> We don't like customers.
[19:59:05.922] <DeadHelp> They're assholes
[19:59:08.094] <DeadHelp> And they're never right.

Joe

Don't you have to escape the ;? A \; perhaps?
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Hdx

http://img140.exs.cx/img140/6720/hdxnew6lb.gif
09/08/05 - Clan SBs @ USEast
[19:59:04.000] <DeadHelp> We don't like customers.
[19:59:05.922] <DeadHelp> They're assholes
[19:59:08.094] <DeadHelp> And they're never right.

Joe

Ah, sweet. By the way, if someone wants to submit a code patch, I'll apply it to my source (eventually).
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Crixus

I got it to compile using
javac -cp ~/workspace/javaop2_pub/src/:. versioning/CheckRevision.java


I started getting
[08:34:43.423] exceptions.InvalidVersion: Invalid game version
[08:34:43.425] Login.getLogin(Login.java:184)
[08:34:43.425] PluginMain.processedPacket(PluginMain.java:333)
[08:34:43.426] pluginmanagers.PluginRegistration.processedIncomingPacket(PluginRegistration.java:722)
[08:34:43.427] bot.PacketThread.run(PacketThread.java:179)


I had checkRevision() parse into longs but typecasted to return ints still. So I'm not sure if I need to make it return longs or if my hashes are wrong. I'm not actually sure how the hashing works, I just copied war3.exe, game.dll, and storm.dll from my Windows machine onto my Linux machine under ~/.hashes/WAR3/ where _GameData.txt pointed to.

Hdx

does the current crev pass the files as it's suposto?
And return (int)c; will return the proper result.
~Hdx
http://img140.exs.cx/img140/6720/hdxnew6lb.gif
09/08/05 - Clan SBs @ USEast
[19:59:04.000] <DeadHelp> We don't like customers.
[19:59:05.922] <DeadHelp> They're assholes
[19:59:08.094] <DeadHelp> And they're never right.