Clan x86

Technical (Development, Security, etc.) => JavaOp Board => Topic started by: rabbit on June 25, 2010, 11:07:09 pm

Title: Hashing Errors
Post by: rabbit on June 25, 2010, 11:07:09 pm
First, when hashing properly
Code: [Select]
tofu: [23:02:52.785] java.lang.ArithmeticException: / by zero
tofu: [23:02:52.785] com.javaop.BNetLogin.versioning.CheckRevision.checkrevisionOld(Unknown Source)
tofu: [23:02:52.786] com.javaop.BNetLogin.versioning.CheckRevision.doCheckRevision(Unknown Source)
tofu: [23:02:52.786] com.javaop.BNetLogin.versioning.Game.doCheckRevision(Unknown Source)
tofu: [23:02:52.786] com.javaop.BNetLogin.versioning.Versioning.CheckRevision(Unknown Source)
tofu: [23:02:52.786] com.javaop.BNetLogin.packets.SidAuthCheck.getOutgoing(Unknown Source)
tofu: [23:02:52.786] com.javaop.BNetLogin.PluginMain.processedPacket(Unknown Source)
tofu: [23:02:52.786] com.javaop.pluginmanagers.PluginRegistration.processedIncomingPacket(Unknown Source)
tofu: [23:02:52.786] com.javaop.bot.PacketThread.run(Unknown Source)

Second, I must have copies of the hashes in ~/.hashes or I get this error:
Code: [Select]
tofu: [23:01:13.081] WARNING: Caught exception when attempting to perform check revision locally. Stack trace available on console. Disconnecting.
java.io.FileNotFoundException: /home/spencer/.hashes/STAR/starcraft.exe (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:137)
at com.javaop.BNetLogin.versioning.CheckRevision.readFile(Unknown Source)
at com.javaop.BNetLogin.versioning.CheckRevision.checkrevisionOld(Unknown Source)
at com.javaop.BNetLogin.versioning.CheckRevision.doCheckRevision(Unknown Source)
at com.javaop.BNetLogin.versioning.Game.doCheckRevision(Unknown Source)
at com.javaop.BNetLogin.versioning.Versioning.CheckRevision(Unknown Source)
at com.javaop.BNetLogin.packets.SidAuthCheck.getOutgoing(Unknown Source)
at com.javaop.BNetLogin.PluginMain.processedPacket(Unknown Source)
at com.javaop.pluginmanagers.PluginRegistration.processedIncomingPacket(Unknown Source)
at com.javaop.bot.PacketThread.run(Unknown Source)
tofu: [23:01:13.163] DEBUG: Entering disconnect()

Third, I must have copies of hashes in ~/.javaop2 or I get this error:
Code: [Select]
java.io.FileNotFoundException: STAR/starcraft.exe (No such file or directory)
tofu: [23:01:54.154] java.lang.ArithmeticException: / by zero
tofu: [23:01:54.155] com.javaop.BNetLogin.versioning.CheckRevision.checkrevisionOld(Unknown Source)
tofu: [23:01:54.155] com.javaop.BNetLogin.versioning.CheckRevision.doCheckRevision(Unknown Source)
tofu: [23:01:54.155] com.javaop.BNetLogin.versioning.Game.doCheckRevision(Unknown Source)
tofu: [23:01:54.155] com.javaop.BNetLogin.versioning.Versioning.CheckRevision(Unknown Source)
tofu: [23:01:54.155] com.javaop.BNetLogin.packets.SidAuthCheck.getOutgoing(Unknown Source)
tofu: [23:01:54.156] com.javaop.BNetLogin.PluginMain.processedPacket(Unknown Source)
tofu: [23:01:54.156] com.javaop.pluginmanagers.PluginRegistration.processedIncomingPacket(Unknown Source)
tofu: [23:01:54.156] com.javaop.bot.PacketThread.run(Unknown Source)

As you can see, I think the bot needing the same hashes (or at least the samely named hashes) in two places is causing problems.
Title: Re: Hashing Errors
Post by: Joe on June 26, 2010, 12:19:08 am
The third error looks like the first error plus a missing file. You can't divide by zero if there's no zero to divide by, so I'm guessing it found the file.

Looking into it.
Title: Re: Hashing Errors
Post by: Joe on June 26, 2010, 12:28:36 am
Possible fix committed. Delete your game data file.
Title: Re: Hashing Errors
Post by: rabbit on June 26, 2010, 09:51:35 am
Same exact errors.
Title: Re: Hashing Errors
Post by: Joe on June 26, 2010, 11:46:53 pm
WHAT THE FUCK!?

I'm not sure.

EDIT -
Revision 73 prints some potentially useful debugging information.
Title: Re: Hashing Errors
Post by: rabbit on June 27, 2010, 08:47:40 am
Same exact errors.
Title: Re: Hashing Errors
Post by: rabbit on June 30, 2010, 01:40:28 pm
Fix it already you jobless bum.
Title: Re: Hashing Errors
Post by: Joe on July 01, 2010, 12:55:35 am
I have a job, go to school, and am working on semi-professional programming as a side job. You?

Really, iago should take a look. I have no clue.
Title: Re: Hashing Errors
Post by: rabbit on July 01, 2010, 07:04:15 am
I have a job, volunteer, do work on 3 other websites, and babysit my 2 year old niece.  You?
Title: Re: Hashing Errors
Post by: Joe on July 02, 2010, 05:47:55 am
Cool. Tack fixing JavaOp yourself to that list for +epeen.
Title: Re: Hashing Errors
Post by: Joe on February 23, 2011, 05:06:20 pm
Wow, I must have internet raged. Heh.

I'm working on unit tests for CheckRevision because this bug pisses me off so much. If you're still interested, let me know.
Title: Re: Hashing Errors
Post by: Joe on February 23, 2011, 09:00:27 pm
Checked out and built from git, it should work now.