processing-android icon indicating copy to clipboard operation
processing-android copied to clipboard

Completion doesn't work (ctrl+space)

Open mistermax80 opened this issue 2 years ago • 3 comments

When I try to press ctr+space, this thow exception (only in android mode): java.lang.NullPointerException: Cannot invoke "javax.swing.ImageIcon.getIconWidth()" because "processing.mode.java.CompletionPanel.classIcon" is null at processing.mode.java.CompletionPanel.(CompletionPanel.java:141) at processing.mode.java.JavaTextArea.showSuggestion(JavaTextArea.java:520) at processing.mode.java.JavaTextArea.lambda$fetchPhrase$0(JavaTextArea.java:332) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:741) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

mistermax80 avatar May 21 '23 21:05 mistermax80

Hi @mistermax80 , seems to be a swing issue but needs confirmation.

According to the error logs you pasted - maybe swing API issue with current Java version or some image icon not found issue Null pointer issue. Can you check if image it's trying to access is present or not in your local ?

Thanks, Aditya

ranaaditya avatar Jul 15 '23 20:07 ranaaditya

hi @mistermax80 , make sure that you are not inadvertently setting the classIcon field of the CompletionPanel to null before invoking getIconWidth()

Thanks, Abhijit

abhijit-23blaze avatar Oct 17 '23 15:10 abhijit-23blaze

Hi guys, i'm using processing as user, now i try with 4.3 version but the issue it is present: image

mistermax80 avatar Nov 23 '23 16:11 mistermax80