News:

**VIP donor members can set up a profile gallery, only viewable by those on their buddy list ****

Main Menu

Null Pointer Exception

Started by inim, January 07, 2005, 02:04:39 AM

Previous topic - Next topic

inim

Here's an NPE that happened tonight. It showed immediately after I finished (resigned) a  game which lost me a 3pt match. The resign itself worked fine, but immediately after I got this beauty and was frozen.


c:\>java -showversion -server -jar JavaFIBS.jar
java version "1.4.2_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Java HotSpot(TM) Server VM (build 1.4.2_06-b03, mixed mode)

java.lang.NullPointerException
       at r.b(r.java)
       at r.a(r.java)
       at ca.a(ca.java)
       at z.a(z.java)
       at s.y(s.java)
       at s.z(s.java)
       at s.d(s.java)
       at ba.run(ba.java)
       at java.lang.Thread.run(Thread.java:534)


inim
This space is available for rent by advertisers. Call 0900-INIMITE today, and see your sales skyrocketing in no time! New customers receive free Vl@9rå and a penis enlargement set as a bonus! We support banners, flash banners, and scrollers. Discrete handling by our HQ on the Dutch Antilles.

Shades

:( ... same happened to me two days ago...
Never stand between a fire hydrant and a dog.

Noah

Have to say i work on a Mac with OS X
I noticed this problem after the java update 1.4.1 to 1.4.2 time ago.
Then downgraded java back to 1.4.1 and didn't have bugs on javafibs anymore.

" If you're not living on the edge, you take too much space"

Deurdonderen

inim

#3
It happened again, and it rarely happened in the past. A decompiler reveals that r.java is the class responsible for saving games (implements FilenameFilter). I have a large number of them in my "internal" folder, namely 2108. It takes several seconds to do a "ls" or "dir" in that directory. I think i observed the exception more frequently after a fresh start of javafibs, i.e. before the file system has buffered the folder.

Windows NTFS file locking is a b.i.t.c.h., I had some trouble with it in my own work. So my guess would be, that  we have a race condition here caused by lengthy operating system level file operation. In my work, I noticed that windows returns immediately from file operations with a null pointer if they take long. If you recheck shortly after, you get expected, non null results. In my work, the solution options were either to use methods from JDK 1.5 or to be very passive, i.e. put a loop around file operations, which extensively checks for null pointers and retries for a while until a timeout is reached.

Hope that this contribues to a fix.
This space is available for rent by advertisers. Call 0900-INIMITE today, and see your sales skyrocketing in no time! New customers receive free Vl@9rå and a penis enlargement set as a bonus! We support banners, flash banners, and scrollers. Discrete handling by our HQ on the Dutch Antilles.

inim

A new Exception showed today, non critical it seems.


java.util.NoSuchElementException
       at java.util.StringTokenizer.nextToken(StringTokenizer.java:259)
       at s.r(s.java)
       at s.d(s.java)
       at ba.run(ba.java)
       at java.lang.Thread.run(Thread.java:534)


I run javafibs 1.007 in Windows XP SP2 using

java version "1.4.2_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)


inim
This space is available for rent by advertisers. Call 0900-INIMITE today, and see your sales skyrocketing in no time! New customers receive free Vl@9rå and a penis enlargement set as a bonus! We support banners, flash banners, and scrollers. Discrete handling by our HQ on the Dutch Antilles.

socksey

I wish I knew what all that meant!  Can someone put this in ordinary layman terms?   :huh:

socksey



Q  What is the name of the movie in which a cannibal ate his
mother-in-law?  A ââ,¬Å"The Gladiatorââ,¬Â   :lol:

cthulhu

Inim, I always get reports from ppl using beta versions of Java which never appear in non beta versions. Could you use a non beta version and see if the exceptions still happen?

cthulhu


diane

#8
QuoteI wish I knew what all that meant!  Can someone put this in ordinary layman terms?   :huh:





What I think this is about - to you and me - is that you will observe after some matches you cannot do anything - shout, tell, invite etc. Your autoThx wont go through - no commands are sent or recieved, nothing happens.  I fix it by logging out and in - then all is well again.  There is no predicting when and where it will happen - though it does seem to happen more often with certain players - I have no idea why.  The rest of the stuff they are talking is programming magic to explain what is happening behind the scenes - with the hope it can be fixed!  I am not trying to follow that - but waiting for someone to say it is ok now  :D
Leastways I hope so  :wacko:  
Never give up on the things that make you smile

socksey

#9
I have a pc, not mac, but same thing has happened to me while using javafibs.  

I recently had my own private techy on premises who told me i needed more memory.  Seems all that I was running was using up all my memory to operate and becoming sluggish or stopped all together.  I would periodically shut down and reboot to fix the immediate problem previously.  

After adding memory, a miracle happened.  Gwaaaa laaaaaaa, everything was running fast again with no problems.

Did I mention, anti-spyware was also added?   ;)

Ermmm......maybe this wasn't what you were talking about, inim.  Let us know.   ^_^

socksey



The battle, sir, is not to the strong alone;  it is to the vigilant, the active, the brave... - Patrick Henry

diane

The sluggish / slowing thing is different I think - and it hasnt happened to me at all since I got this new puter.  The problem discussed here is a complete stop - fixed by simply logging out and in - to fix the slowing you need to shut down java and reopen it, to clear the stored stuff (I think)  :wacko:  They are two distinct and different problems.
Never give up on the things that make you smile

lewscannon

QuoteI have a pc, not mac, but same thing has happened to me while using javafibs.  

I recently had my own private techy on premises who told me i needed more memory.  Seems all that I was running was using up all my memory to operate and becoming sluggish or stopped all together.  I would periodically shut down and reboot to fix the immediate problem previously.  

After adding memory, a miracle happened.  Gwaaaa laaaaaaa, everything was running fast again with no problems.

Did I mention, anti-spyware was also added?   ;)

Ermmm......maybe this wasn't what you were talking about, inim.  Let us know.   ^_^

socksey



The battle, sir, is not to the strong alone;  it is to the vigilant, the active, the brave... - Patrick Henry
He probably simply removed a wad of melted chocolate from your cd player.