[RFC] PR 535: null pointer exceptions during applet initialization
Omair Majid
omajid at redhat.com
Mon Oct 4 08:17:11 PDT 2010
On 09/17/2010 04:16 PM, Deepak Bhole wrote:
> * Omair Majid<omajid at redhat.com> [2010-09-17 15:56]:
>> Hi,
>>
>> The attached patch fixes icedtea bug 535 [1]. Some calls to
>> showAppletStatus are throwing null pointer exceptions. The problem
>> appears to be that the AppletPanel is reparented during
>> initialization (see PluginAppletViewer.reFrame()). There is a small
>> window of time where the AppletPanel does not have a parent, which
>> causes getParent() to return null and cause this
>> NullPointerException.
>>
>> The attached patch tries to avoid this problem by trying again if it
>> detects the parent is null.
>>
>> Any thoughts or comments?
>>
>> Cheers,
>> Omair
>>
>
> Patch is fine. But as I commented on the bug, please hold off for now.
> There are API changes I am working on that will add a common wait
> function for this sort of stuff. There are many cases where threads need
> to wait till the applet is ready, and one of the changes will add a
> function that blocks till such a time.
>
I believe Andrew's recent patch to icedtea6 [1] which removes the
reframing of the applet removes this problem completely. I am going to
discard this patch.
Cheers,
Omair
[1] http://icedtea.classpath.org/hg/icedtea6/rev/94f30c67c2f9
More information about the distro-pkg-dev
mailing list