This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
NPE on removing package from scoped diagram after some specific modifications. steps: - create uml project - create class diagram in the root of the model - create package in the root ofthe model - drag package to diagram drawing area - drag-n-drop diagram node into package node in model tree. - put new class to the diagram - save all - remove package symbol on diagram - select 'deletion will permamently ...' checkbox in opened delete dialog. - press yes button BUG: save diagram dialog appears press 'Yes' java.lang.NullPointerException will appear.
Created attachment 43449 [details] java.lang.NullPointerException
I can't reproduce the NPE with latest build, but fixed the issue that would trigger it. The cause was the logic that sets diagram dirty state when 'Delete' key was pressed.
reproducible in netbeans-hudson-trunk-980-full (Build 070620) There was a problem with project types When issue was filed. Now it is clear that issue is reproducible for independent uml project only. steps: - create independent uml project - create package with scoped class diagram - drag package from tree to scoped diagram - save all - remove package symbol on diagram - select 'deletion will permamently ...' checkbox in opened delete dialog. - press yes button PROBLEM1: save diagram dialog appears - press 'Yes' PROBLEM2: java.lang.NullPointerException will appear.
I can reproduce the issue now,it's really a race condition among several event threads, the reason it does not show on java platform project is that another dialog for package deletion pops up which has an impact on code execution timing. Made changes in DiagramTopComponent.canClose() to check if diagram is meant to be deleted (drawing control object's destroy() has been invoked), so that in this situation the save diagram dialog will not be invoked.
verified in netbeans-hudson-trunk-1233-full(Build 070627)