FIBS Board backgammon forum

FIBS Client software => JavaFibs => Topic started by: inim on January 07, 2005, 02:04:39 AM

Title: Null Pointer Exception
Post by: inim on January 07, 2005, 02:04:39 AM
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
Title: Null Pointer Exception
Post by: Shades on January 07, 2005, 11:45:43 AM
:( ... same happened to me two days ago...
Title: Null Pointer Exception
Post by: Noah on January 07, 2005, 03:10:08 PM
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.

Title: Null Pointer Exception
Post by: inim on January 09, 2005, 04:59:41 AM
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.
Title: Null Pointer Exception
Post by: inim on January 19, 2005, 10:39:01 AM
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
Title: Null Pointer Exception
Post by: socksey on January 20, 2005, 12:20:41 AM
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:
Title: Null Pointer Exception
Post by: cthulhu on January 31, 2005, 03:59:19 PM
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?
Title: Null Pointer Exception
Post by: cthulhu on January 31, 2005, 07:24:55 PM
Never mind. I read wrong.
Title: Null Pointer Exception
Post by: diane on January 31, 2005, 11:35:38 PM
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:  
Title: Null Pointer Exception
Post by: socksey on February 01, 2005, 06:21:23 PM
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
Title: Null Pointer Exception
Post by: diane on February 01, 2005, 06:54:43 PM
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.
Title: Null Pointer Exception
Post by: lewscannon on February 01, 2005, 09:54:32 PM
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.