Re: NullPointerException

Bryan Armstrong <bryan.armstrong-6tN4nzCoH/[email protected]>
Newsgroups gmane.comp.hardware.microcontrollers.tini
Message-ID <[email protected]>
Wes Stupar wrote:
> I am still getting an occasional null pointer exception, apparently down 
> in the OS. I wonder if there is some synchronization missing there... I 
> can't explain the following stack dump any other way:
> 
> java.lang.NullPointerException
> java.lang.System.arraycopy(a0007)
> com.dalsemi.onewire.adapter.TINIAdapter.select(400021)
> com.dalsemi.onewire.container.OneWireContainer26.readPage(230032)
> com.dalsemi.onewire.container.OneWireContainer26.readDevice(46000f)
> com.iQstor.esp2r12.OneWire.readTemp(1f0018)
> com.iQstor.esp2r12.Monitor.run(220180)
> java.lang.Thread.run(22001a)
> java.lang.NullPointerException
>    in com.iQstor.esp2r12.TCPCom.run(@JPC=220046)
>    in java.lang.Thread.run(@JPC=22001a)

Wes,

This could happen if a OneWireContainer was created using the default 
constructor and setupContainer is never called.  The internal address 
byte array will never be constructed and later the readPage() function 
passes a null pointer to select which throws the NullPointerException.

This will not occur when using the getDeviceContainer() function call.

-- 
--
Bryan Armstrong
bryan.armstrong-6tN4nzCoH/[email protected]


_______________________________________________
TINI mailing list
TINI-6tN4nzCoH/[email protected]
To UNSUBSCRIBE, edit your profile, or see list archives:
http://lists.dalsemi.com/mailman/listinfo/tini
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.