[sip-comm-dev] [PATCH] Fix for NPE in TreeContactList


#1

Hi,
while clicking in the contact List I got this exception

     [java] 17:27:57.565 GRAVE: util.UtilActivator.uncaughtException().80 An
uncaught exception occurred in thread=Thread[AWT-EventQueue-0,6,main] and
message was: null
     [java] java.lang.NullPointerException
     [java] at
net.java.sip.communicator.impl.gui.main.contactlist.TreeContactList.mousePressed(TreeContactList.java:821)
     [java] at java.awt.Component.processMouseEvent(Component.java:6260)
     [java] at
javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
     [java] at java.awt.Component.processEvent(Component.java:6028)
     [java] at java.awt.Container.processEvent(Container.java:2041)
     [java] at java.awt.Component.dispatchEventImpl(Component.java:4630)
     [java] at java.awt.Container.dispatchEventImpl(Container.java:2099)
     [java] at java.awt.Component.dispatchEvent(Component.java:4460)
     [java] at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
     [java] at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:4235)
     [java] at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
     [java] at java.awt.Container.dispatchEventImpl(Container.java:2085)
     [java] at java.awt.Window.dispatchEventImpl(Window.java:2475)
     [java] at java.awt.Component.dispatchEvent(Component.java:4460)
     [java] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
     [java] at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
     [java] at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
     [java] at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
     [java] at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
     [java] at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
     [java] at
java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

the reason is probably that there was no tree path at the location of my
pointer, but I'm unable to reproduce it.
Attached is a patch that should fix that bug

Matthieu

Fix_for_NPE_in_TreeContactList.patch (835 Bytes)


#2

Hi Matthieu,

Thanks! All your three last patches:
  - Searchfield get VK_HOME & VK_END events
  - Fix for Searchfield that get undefined char
  - Fix for NPE in TreeContactList
are now applied, committed and ack-ed. I've made just a few minor modifications, but the result stays the same;)

Cheers,
Yana

···

On Feb 10, 2010, at 5:39 PM, Matthieu Casanova wrote:

Hi,
while clicking in the contact List I got this exception

     [java] 17:27:57.565 GRAVE: util.UtilActivator.uncaughtException().80 An uncaught exception occurred in thread=Thread[AWT-EventQueue-0,6,main] and message was: null
     [java] java.lang.NullPointerException
     [java] at net.java.sip.communicator.impl.gui.main.contactlist.TreeContactList.mousePressed(TreeContactList.java:821)
     [java] at java.awt.Component.processMouseEvent(Component.java:6260)
     [java] at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
     [java] at java.awt.Component.processEvent(Component.java:6028)
     [java] at java.awt.Container.processEvent(Container.java:2041)
     [java] at java.awt.Component.dispatchEventImpl(Component.java:4630)
     [java] at java.awt.Container.dispatchEventImpl(Container.java:2099)
     [java] at java.awt.Component.dispatchEvent(Component.java:4460)
     [java] at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
     [java] at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4235)
     [java] at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
     [java] at java.awt.Container.dispatchEventImpl(Container.java:2085)
     [java] at java.awt.Window.dispatchEventImpl(Window.java:2475)
     [java] at java.awt.Component.dispatchEvent(Component.java:4460)
     [java] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
     [java] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
     [java] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
     [java] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
     [java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
     [java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
     [java] at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

the reason is probably that there was no tree path at the location of my pointer, but I'm unable to reproduce it.
Attached is a patch that should fix that bug

Matthieu
<Fix_for_NPE_in_TreeContactList.patch>---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Hi,
thank you for reviewing my patches, but it seems there is something wrong.
When I update the svn trunk the search field do not receive VK_HOME and
VK_END events, they are still forwarded to the contact list

Matthieu

···

2010/2/11 Yana Stamcheva <yana@sip-communicator.org>

Hi Matthieu,

Thanks! All your three last patches:
       - Searchfield get VK_HOME & VK_END events
       - Fix for Searchfield that get undefined char
       - Fix for NPE in TreeContactList
are now applied, committed and ack-ed. I've made just a few minor
modifications, but the result stays the same;)

Cheers,
Yana

On Feb 10, 2010, at 5:39 PM, Matthieu Casanova wrote:

> Hi,
> while clicking in the contact List I got this exception
>
> [java] 17:27:57.565 GRAVE: util.UtilActivator.uncaughtException().80
An uncaught exception occurred in thread=Thread[AWT-EventQueue-0,6,main] and
message was: null
> [java] java.lang.NullPointerException
> [java] at
net.java.sip.communicator.impl.gui.main.contactlist.TreeContactList.mousePressed(TreeContactList.java:821)
> [java] at
java.awt.Component.processMouseEvent(Component.java:6260)
> [java] at
javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
> [java] at java.awt.Component.processEvent(Component.java:6028)
> [java] at java.awt.Container.processEvent(Container.java:2041)
> [java] at
java.awt.Component.dispatchEventImpl(Component.java:4630)
> [java] at
java.awt.Container.dispatchEventImpl(Container.java:2099)
> [java] at java.awt.Component.dispatchEvent(Component.java:4460)
> [java] at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
> [java] at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:4235)
> [java] at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
> [java] at
java.awt.Container.dispatchEventImpl(Container.java:2085)
> [java] at java.awt.Window.dispatchEventImpl(Window.java:2475)
> [java] at java.awt.Component.dispatchEvent(Component.java:4460)
> [java] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
> [java] at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
> [java] at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
> [java] at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
> [java] at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
> [java] at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
> [java] at
java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
>
> the reason is probably that there was no tree path at the location of my
pointer, but I'm unable to reproduce it.
> Attached is a patch that should fix that bug
>
> Matthieu
>
<Fix_for_NPE_in_TreeContactList.patch>---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
> For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

Hi Matthieu,

my fault, I was thinking of something else when reading your mail about HOME and END key events. It was actually intentional, but now I think it's not so good idea and agree with you that HOME and END should not be forwarded to the contact list, so your patch is committed (r6761).

Thanks!
Yana

···

On Feb 11, 2010, at 5:49 PM, Matthieu Casanova wrote:

Hi,
thank you for reviewing my patches, but it seems there is something wrong.
When I update the svn trunk the search field do not receive VK_HOME and VK_END events, they are still forwarded to the contact list

Matthieu

2010/2/11 Yana Stamcheva <yana@sip-communicator.org>
Hi Matthieu,

Thanks! All your three last patches:
       - Searchfield get VK_HOME & VK_END events
       - Fix for Searchfield that get undefined char
       - Fix for NPE in TreeContactList
are now applied, committed and ack-ed. I've made just a few minor modifications, but the result stays the same;)

Cheers,
Yana

On Feb 10, 2010, at 5:39 PM, Matthieu Casanova wrote:

> Hi,
> while clicking in the contact List I got this exception
>
> [java] 17:27:57.565 GRAVE: util.UtilActivator.uncaughtException().80 An uncaught exception occurred in thread=Thread[AWT-EventQueue-0,6,main] and message was: null
> [java] java.lang.NullPointerException
> [java] at net.java.sip.communicator.impl.gui.main.contactlist.TreeContactList.mousePressed(TreeContactList.java:821)
> [java] at java.awt.Component.processMouseEvent(Component.java:6260)
> [java] at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
> [java] at java.awt.Component.processEvent(Component.java:6028)
> [java] at java.awt.Container.processEvent(Container.java:2041)
> [java] at java.awt.Component.dispatchEventImpl(Component.java:4630)
> [java] at java.awt.Container.dispatchEventImpl(Container.java:2099)
> [java] at java.awt.Component.dispatchEvent(Component.java:4460)
> [java] at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
> [java] at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4235)
> [java] at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
> [java] at java.awt.Container.dispatchEventImpl(Container.java:2085)
> [java] at java.awt.Window.dispatchEventImpl(Window.java:2475)
> [java] at java.awt.Component.dispatchEvent(Component.java:4460)
> [java] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
> [java] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
> [java] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
> [java] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
> [java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
> [java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
> [java] at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
>
> the reason is probably that there was no tree path at the location of my pointer, but I'm unable to reproduce it.
> Attached is a patch that should fix that bug
>
> Matthieu
> <Fix_for_NPE_in_TreeContactList.patch>---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
> For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net