Re: null pointer in createCell()

Hi Michelle,

I have seen this bug with the unmodified SpreadSheet code on rare occasions.
My guess is that it is a race condition in the FancySSCell constructor, since
it an intermittent problem. I would love to see this bug eliminated but won't
have time to investigate for a few days. In the meantime, you can probably
get more information by launching the SpreadSheet with the "-debug" flag.


At 01:48 PM 7/31/2003, Kam, Michelle C wrote:
>In, I have a null pointer exception in 
>constructSpreadsheetCells(String[][] l, RemoteServer rs) specifically at 
>f.addSSCellListener(this); because     the line before which is f = 
>createCell(l[i][j], rs); causes f to be null. And createCell() returns null if 
>the following is true (!(cell instanceof FancySSCell)) {. Does anyone know 
>when/why the cellConstructor.newInstance(args); would create a null instance? 
>My program was running just fine until I added one line of code to my own 
>method in and now I get this null pointer about 1/15 or 1/20 
>times I run it. I'm pretty sure the bug is not coming from my code because 
>when the spreadsheet is just loading up, my code has not yet been read.
>Michelle Kam           (408) 742-2881
>Lockheed Martin Space Systems Co. SSM/ATC/MSIS
>B/153 O/L922 
>1111 Lockheed Martin Way, Sunnyvale, CA 94089