NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

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.

-Curtis

At 01:48 PM 7/31/2003, Kam, Michelle C wrote:
>Hi,
>
>In SpreadSheet.java, 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 SpreadSheet.java 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.
>
>Thanks,
>Michelle
>
>Michelle Kam           (408) 742-2881
>Lockheed Martin Space Systems Co. SSM/ATC/MSIS
>B/153 O/L922 
>1111 Lockheed Martin Way, Sunnyvale, CA 94089


  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: