You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/05/06 21:33:38 UTC

[GitHub] [netbeans] ebarboni opened a new issue, #4084: NPE

ebarboni opened a new issue, #4084:
URL: https://github.com/apache/netbeans/issues/4084

   ### Apache NetBeans version
   
   Apache NetBeans latest daily build
   
   ### What happened
   
   I was trying to use branding in Maven NetBeans platform on NetBeans 14 rc3
   
   
   On branding artetfact right click on branding
   Should open a branding panel but a NPE happens
   
   java.lang.NullPointerException
   	at java.base/java.util.Objects.requireNonNull(Objects.java:208)
   	at java.base/java.util.TreeMap.merge(TreeMap.java:708)
   	at java.base/java.util.stream.Collectors.lambda$toMap$68(Collectors.java:1673)
   	at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
   	at java.base/java.util.stream.IntPipeline$1$1.accept(IntPipeline.java:180)
   	at java.base/java.util.Spliterators$IntArraySpliterator.forEachRemaining(Spliterators.java:1076)
   	at java.base/java.util.Spliterator$OfInt.forEachRemaining(Spliterator.java:711)
   	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
   	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
   	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
   	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
   	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
   	at org.netbeans.modules.apisupport.project.ui.branding.BasicBrandingPanel.<init>(BasicBrandingPanel.java:62)
   	at org.netbeans.modules.apisupport.project.ui.branding.BrandingEditorPanel.<init>(BrandingEditorPanel.java:51)
   	at org.netbeans.modules.apisupport.project.api.BrandingUtils.openBrandingEditor(BrandingUtils.java:56)
   	at org.netbeans.modules.maven.apisupport.OpenBrandingEditorAction$1$1.run(OpenBrandingEditorAction.java:104)
   	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 org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
   [catch] 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)
   
   
   ### How to reproduce
   
   To generate a example:
   File -> new project
   Java with Maven -> NetBeans Applications
   Select RELEASE130 for version
   
   wait until project created the select the branding artefact. Right click on it and click on branding.
   
   ### Did this work correctly in an earlier version?
   
   No
   
   ### Operating System
   
   Windows 11
   
   ### JDK
   
   jdk 17
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   It was a long time I didn't use the branding. I'm not sure how old the issue is.
   I'm not sure I can propose a PR for this having issue to understand the intention of the stream and map collectors.
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] GuyDaniel commented on issue #4084: NPE in Branding Panel for maven project

Posted by GitBox <gi...@apache.org>.
GuyDaniel commented on issue #4084:
URL: https://github.com/apache/netbeans/issues/4084#issuecomment-1122811886

   > thanks for trying on linux maybe an issue with windows.
   
   Oh, I just realized I did a build of everything first, before testing the panel mainly out of habit. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] ebarboni commented on issue #4084: NPE in Branding Panel for maven project

Posted by GitBox <gi...@apache.org>.
ebarboni commented on issue #4084:
URL: https://github.com/apache/netbeans/issues/4084#issuecomment-1123922672

   maybe because I run NetBeans on jdk 17 ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] GuyDaniel commented on issue #4084: NPE

Posted by GitBox <gi...@apache.org>.
GuyDaniel commented on issue #4084:
URL: https://github.com/apache/netbeans/issues/4084#issuecomment-1120088211

   I just tried to replicate this bug on Linux with 14rc3 and oracle jdk 17, and got the branding panel ok, after a notification that some netbeans dependencies were downloading.
   Works ok for me.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] ebarboni commented on issue #4084: NPE in Branding Panel for maven project

Posted by GitBox <gi...@apache.org>.
ebarboni commented on issue #4084:
URL: https://github.com/apache/netbeans/issues/4084#issuecomment-1122269997

   thanks for trying on linux maybe an issue with windows.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] vieiro commented on issue #4084: NPE in Branding Panel for maven project

Posted by GitBox <gi...@apache.org>.
vieiro commented on issue #4084:
URL: https://github.com/apache/netbeans/issues/4084#issuecomment-1122419695

   Verified: this happens on Windows, on a brand new Maven/NetBeans installation.
   
   I get this exception...
   
   ```
   WARNING [null]: Last record repeated 3 more times.
   INFO [org.netbeans.ui.indexing]: Indexing started, time from last indexing 5.131 ms.
   SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.netbeans.modules.maven.apisupport.OpenBrandingEditorAction$1
   java.lang.NullPointerException
   	at org.netbeans.modules.maven.apisupport.OpenBrandingEditorAction$1.run(OpenBrandingEditorAction.java:91)
   	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
   	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
   	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
   [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
   ```
   
   ... but once all Maven artifacts are downloaded (and after one minute or so?), and with this exception in between:
   
   ```
   SCAN_EXCEEDS_RATE ID: 61, Type:PATH
   Time scheduled: Tue May 10 15:42:17 CEST 2022
   Time executed: Tue May 10 15:42:17 CEST 2022
   Time finished: Tue May 10 15:42:17 CEST 2022
   Scanned roots: []
   , total time: 0
   Current root(s): []
   Current indexer(s): 
   Time spent in indexers:
   Time spent in indexers, in individual roots:
   Time in index store: 0
   Time crawling: 0
   Stacktrace:
   	java.base/java.lang.Thread.getStackTrace(Thread.java:1602)
   	org.netbeans.modules.parsing.impl.indexing.LogContext.create(LogContext.java:111)
   	org.netbeans.modules.parsing.impl.indexing.LogContext.create(LogContext.java:102)
   	org.netbeans.modules.parsing.impl.indexing.PathRegistry.scheduleFirer(PathRegistry.java:936)
   	org.netbeans.modules.parsing.impl.indexing.PathRegistry.resetCacheAndFire(PathRegistry.java:929)
   	org.netbeans.modules.parsing.impl.indexing.PathRegistry.access$500(PathRegistry.java:68)
   	org.netbeans.modules.parsing.impl.indexing.PathRegistry$Listener.stateChanged(PathRegistry.java:1265)
   	org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:108)
   	org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:94)
   	org.netbeans.api.java.queries.SourceForBinaryQuery$Result2$1.stateChanged(SourceForBinaryQuery.java:182)
   	org.openide.util.WeakListenerImpl$Change.stateChanged(WeakListenerImpl.java:331)
   	org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:108)
   	org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:94)
   	org.netbeans.modules.maven.queries.RepositoryForBinaryQueryImpl$SrcResult.checkChanges(RepositoryForBinaryQueryImpl.java:411)
   	org.netbeans.modules.maven.queries.RepositoryForBinaryQueryImpl$SrcResult.access$300(RepositoryForBinaryQueryImpl.java:288)
   	org.netbeans.modules.maven.queries.RepositoryForBinaryQueryImpl$SrcResult$1.run(RepositoryForBinaryQueryImpl.java:328)
   	org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
   	org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
   	org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
   	org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
   SCAN_EXCEEDS_RATE ID: 62, Type:PATH
   Time scheduled: Tue May 10 15:42:18 CEST 2022
   Time executed: Tue May 10 15:42:19 CEST 2022
   Time finished: Tue May 10 15:42:19 CEST 2022
   Scanned roots: []
   , total time: 0
   Current root(s): []
   Current indexer(s): 
   Time spent in indexers:
   Time spent in indexers, in individual roots:
   Time in index store: 0
   Time crawling: 0
   Stacktrace:
   	java.base/java.lang.Thread.getStackTrace(Thread.java:1602)
   	org.netbeans.modules.parsing.impl.indexing.LogContext.create(LogContext.java:111)
   	org.netbeans.modules.parsing.impl.indexing.LogContext.create(LogContext.java:102)
   	org.netbeans.modules.parsing.impl.indexing.PathRegistry.scheduleFirer(PathRegistry.java:936)
   	org.netbeans.modules.parsing.impl.indexing.PathRegistry.resetCacheAndFire(PathRegistry.java:929)
   	org.netbeans.modules.parsing.impl.indexing.PathRegistry.access$500(PathRegistry.java:68)
   	org.netbeans.modules.parsing.impl.indexing.PathRegistry$Listener.stateChanged(PathRegistry.java:1265)
   	org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:108)
   	org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:94)
   	org.netbeans.api.java.queries.SourceForBinaryQuery$Result2$1.stateChanged(SourceForBinaryQuery.java:182)
   	org.openide.util.WeakListenerImpl$Change.stateChanged(WeakListenerImpl.java:331)
   	org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:108)
   	org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:94)
   	org.netbeans.modules.maven.queries.RepositoryForBinaryQueryImpl$SrcResult.checkChanges(RepositoryForBinaryQueryImpl.java:411)
   	org.netbeans.modules.maven.queries.RepositoryForBinaryQueryImpl$SrcResult.access$300(RepositoryForBinaryQueryImpl.java:288)
   	org.netbeans.modules.maven.queries.RepositoryForBinaryQueryImpl$SrcResult$1.run(RepositoryForBinaryQueryImpl.java:328)
   	org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
   	org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
   	org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
   	org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
   WARNING [org.netbeans.modules.parsing.impl.indexing.LogContext]: === End excessive indexing
   INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Resolving dependencies took: 27 ms
   INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Complete indexing of 0 binary roots took: 0 ms
   INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Complete indexing of 0 source roots took: 0 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
   INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 28 ms.
   ```
   
   The branding panel does indeed open. After that opening the branding panel does open everytime normally, without delay.
   
   ![imagen](https://user-images.githubusercontent.com/564140/167643368-affd8125-cfa9-4730-90b9-10aa3180bce8.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] pedro-w commented on issue #4084: NPE in Branding Panel for maven project

Posted by GitBox <gi...@apache.org>.
pedro-w commented on issue #4084:
URL: https://github.com/apache/netbeans/issues/4084#issuecomment-1123862692

   I had a quick look and it seems the exception traces back to
   https://github.com/apache/netbeans/blob/c07fe190473840887b0d6f7090151d17ebb0686f/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/ui/branding/BasicBrandingPanel.java#L61-L63
   which was added in #3551 
   I am not familiar with the code but it looks like  `BrandingModel::getIconSource` could legitimately return null for some of the listed sizes, which will cause TreeMap's merge function to throw the NPE. ([ref here](https://github.com/openjdk/jdk/blob/fb469fb894ed84686f9fec5787ac99eb535fdd18/src/java.base/share/classes/java/util/TreeMap.java#L706-L708))
   So I think you need to implement this a bit differently to filter out any null icons that are returned by the branding model.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] ebarboni commented on issue #4084: NPE in Branding Panel for maven project

Posted by GitBox <gi...@apache.org>.
ebarboni commented on issue #4084:
URL: https://github.com/apache/netbeans/issues/4084#issuecomment-1190385980

   closing as I cannot reproduce maybe incoherent artefact on my local repository


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] ebarboni closed issue #4084: NPE in Branding Panel for maven project

Posted by GitBox <gi...@apache.org>.
ebarboni closed issue #4084: NPE in Branding Panel for maven project 
URL: https://github.com/apache/netbeans/issues/4084


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] ebarboni commented on issue #4084: NPE in Branding Panel for maven project

Posted by GitBox <gi...@apache.org>.
ebarboni commented on issue #4084:
URL: https://github.com/apache/netbeans/issues/4084#issuecomment-1123402587

   changing to NB15 as it's not reproductible


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] pedro-w commented on issue #4084: NPE in Branding Panel for maven project

Posted by GitBox <gi...@apache.org>.
pedro-w commented on issue #4084:
URL: https://github.com/apache/netbeans/issues/4084#issuecomment-1123984878

   I think what I said before was right but maybe not the root cause. From reading https://github.com/apache/netbeans/issues/3544#issuecomment-1025708442 it looks like the path `<project>\branding\src\main\nbm-branding\core\core.jar\org\netbeans\core\startup` should have some images in it, and it does not (only a Bundle.properties)
   
   I also am using Windows 11 & JDK 17. I tried on Debian 11/JDK 11 and did not see the issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists