Jump to content
  • 0
kieron606

Client loadng error

Question

Client loads to the 35% then it tells me the client cant load and i have to reload my cache?

[url]http://prntscr.com/6wr9h9[/url]


[CODE]java.lang.NullPointerException
at Stream.g2(Stream.java:53)
at Class36.loadSkins(Class36.java:12)
at Client.startUp(Client.java:12441)
at RSApplet.run(RSApplet.java:79)
at Client.run(Client.java:8357)
at java.lang.Thread.run(Unknown Source)[/CODE]

The lines with the errors ^^ [CODE]Stream stream = new Stream(FileOperations.ReadFile(signlink.findcachedir() + "Skins.dat"));
int numSkins = stream.g2();
skinData = new byte[numSkins][][/CODE]

[CODE] Class36.loadSkins();[/CODE]

[CODE] startUp();[/CODE]

[CODE] public void run() {
if (drawFlames) {
drawFlames();
} else {
super.run();
}
}
[/CODE] Edited by kieron606

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0
[url]http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html[/url]

You're trying to call an object that's null. Also I don't know what the last block of code does.

Share this post


Link to post
Share on other sites
  • 0
[quote name='falconpunch'][url]http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html[/url]

You're trying to call an object that's null. Also I don't know what the last block of code does.[/QUOTE]

Could it be to do with a file not being in my cache?

Share this post


Link to post
Share on other sites
  • 0
[quote name='kieron606']Could it be to do with a file not being in my cache?[/QUOTE]
If the error you showed is the only error, then I don't think it's not going to be a misplaced cache file, but you can try that and just check.

Share this post


Link to post
Share on other sites
  • 0
Look at line 53 in Stream.java. What happens there? Give complete code not just what you think is relevant. It is useless right now.

Share this post


Link to post
Share on other sites
  • 0
[quote name='Arix']Look at line 53 in Stream.java. What happens there? Give complete code not just what you think is relevant. It is useless right now.[/QUOTE]

Is this what you were looking for?

[QUOTE] public int g2() {
currentOffset += 2;
return ((buffer[currentOffset - 2] & 0xff) << 8) + (buffer[currentOffset - 1] & 0xff);
}[/QUOTE]

Share this post


Link to post
Share on other sites
  • 0
[quote name='kieron606']Is this what you were looking for?[/QUOTE]
buffer is null that means it couldn't fill the buffer. I don't know what the constructor of the Stream looks like but I am assuming the file was not found.

Share this post


Link to post
Share on other sites
  • 0
[quote name='Arix']buffer is null that means it couldn't fill the buffer. I don't know what the constructor of the Stream looks like but I am assuming the file was not found.[/QUOTE]

Do you have any clue what Skins.dat could also be named? its an old project im trying to restore.

Share this post


Link to post
Share on other sites
  • 0
[quote name='kieron606']Do you have any clue what Skins.dat could also be named? its an old project im trying to restore.[/QUOTE]
Nope. I never touched 317 before.

Share this post


Link to post
Share on other sites
  • 0
[quote name='Arix']Nope. I never touched 317 before.[/QUOTE]

I fixed the cache errors, but now my client just sits says communicating with server but doesnt load, no errors and my client and server are pointing to localhost

Share this post


Link to post
Share on other sites

×