Author Topic: Hashing Errors  (Read 9895 times)

0 Members and 1 Guest are viewing this topic.

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Hashing Errors
« 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.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Hashing Errors
« Reply #1 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.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Hashing Errors
« Reply #2 on: June 26, 2010, 12:28:36 am »
Possible fix committed. Delete your game data file.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Hashing Errors
« Reply #3 on: June 26, 2010, 09:51:35 am »
Same exact errors.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Hashing Errors
« Reply #4 on: June 26, 2010, 11:46:53 pm »
WHAT THE FUCK!?

I'm not sure.

EDIT -
Revision 73 prints some potentially useful debugging information.
« Last Edit: June 26, 2010, 11:59:11 pm by Joe »
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Hashing Errors
« Reply #5 on: June 27, 2010, 08:47:40 am »

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Hashing Errors
« Reply #6 on: June 30, 2010, 01:40:28 pm »
Fix it already you jobless bum.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Hashing Errors
« Reply #7 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.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Hashing Errors
« Reply #8 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?

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Hashing Errors
« Reply #9 on: July 02, 2010, 05:47:55 am »
Cool. Tack fixing JavaOp yourself to that list for +epeen.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Hashing Errors
« Reply #10 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.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Hashing Errors
« Reply #11 on: February 23, 2011, 09:00:27 pm »
Checked out and built from git, it should work now.
I'd personally do as Joe suggests

You might be right about that, Joe.