NetXMS Support Forum

English Support => General Support => Topic started by: arn0664 on July 05, 2022, 10:07:05 AM

Title: Map Options / NullPointerException
Post by: arn0664 on July 05, 2022, 10:07:05 AM
In Version 4.0.2227 I have a problem with map properties / options:
When I want to change some of the "Map Options" (for example "Show status frame", "Show status background" or "Calculate map options based on contained object status") the changes are not applied  and I get the following error (nxmc log):

!ENTRY org.eclipse.jface 4 0 2022-07-05 08:51:48.048
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
   at org.netxms.ui.eclipse.networkmaps.propertypages.MapOptions.applyChanges(MapOptions.java:258)
   at org.netxms.ui.eclipse.networkmaps.propertypages.MapOptions.performOk(MapOptions.java:324)
   at org.eclipse.jface.preference.PreferenceDialog$7.run(PreferenceDialog.java:905)
   at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
   at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
   at org.eclipse.jface.preference.PreferenceDialog.okPressed(PreferenceDialog.java:889)
   at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.okPressed(FilteredPreferenceDialog.java:461)
   at org.eclipse.jface.preference.PreferenceDialog.buttonPressed(PreferenceDialog.java:233)
   at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:619)
   at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84)
   at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
   at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4243)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1063)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4060)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3632)
   at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
   at org.eclipse.jface.window.Window.open(Window.java:799)
   at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:153)
   at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
   at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
   at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:414)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
   at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4243)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1063)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4060)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3632)
   at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
   at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
   at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
   at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
   at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
   at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
   at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
   at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
   at org.netxms.ui.eclipse.console.Application.start(Application.java:37)
   at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.base/java.lang.reflect.Method.invoke(Unknown Source)
   at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
   at org.eclipse.equinox.launcher.Main.run(Main.java:1467)

On a testserver I have upgraded to version 4.1.283 - the problem persists.
Is this a bug or must I change something to edit map options ?

Thanks in advance,
Thomas
Title: Re: Map Options / NullPointerException
Post by: troffasky on July 05, 2022, 11:37:54 AM
I don't have an answer for you but I can say that this doesn't happen to me with 4.1.333.
Title: Re: Map Options / NullPointerException
Post by: arn0664 on July 05, 2022, 11:55:39 AM
Thank you !
I will upgrade my testserver to 4.1.333 for testing.
Title: Re: Map Options / NullPointerException
Post by: arn0664 on July 05, 2022, 01:10:17 PM
I upgraded the testserver to version 4.1.333 but unfortunately the problem persists.

I noticed that the problem only exists when I create the map as "custom map". When I create the map as another type, all works fine.
Is there something wrong with a custom map ?

Best regards

Thomas
Title: Re: Map Options / NullPointerException
Post by: arn0664 on July 05, 2022, 02:01:30 PM
Now I found a way to edit some map options of a custom map:

When I right-click in the map I can  edit options like "Show status icon" and "Show status frame" like the first picture and these seetings persist.
The advanced option "calculate map status based on contained object status" is not editable in this menu - only in the "Map Properties".
When I edit this option there the settings are not changed (second picture).

It seems that in "Map Properties" some options are not really editable - is there another way to edit the option "calculate map status based on contained object status" ?

Thomas

Title: Re: Map Options / NullPointerException
Post by: Victor Kirhenshtein on July 06, 2022, 09:29:26 AM
Just fixed it, next patch release will contain the fix.

Best regards,
Victor
Title: Re: Map Options / NullPointerException
Post by: arn0664 on July 06, 2022, 10:38:54 AM
Thank you very much !

What is the scheduled date for the patch release ?

Best regards

Thomas
Title: Re: Map Options / NullPointerException
Post by: Victor Kirhenshtein on July 06, 2022, 07:29:34 PM
We plan it for this week.

Best regards,
Victor
Title: Re: Map Options / NullPointerException
Post by: arn0664 on July 07, 2022, 12:03:24 PM
Perfect - Thank you for the quick solution !

Best regards,
Thomas