Skip to main content



      Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » java.lang.NullPointerException
java.lang.NullPointerException [message #1798378] Fri, 16 November 2018 08:26 Go to next message
Eclipse UserFriend
Hello,

I've upgraded 4DIAC to 1.10.0.RC2.

When I want to save my changes in an application I get a Java NullPointer Exception:

!ENTRY org.eclipse.ui 2 0 2018-11-16 14:23:51.894
!MESSAGE Save Failed
!STACK 0
java.lang.NullPointerException
at org.eclipse.fordiac.ide.model.dataexport.FBNetworkExporter.addFBNetworkElements(FBNetworkExporter.java:73)
at org.eclipse.fordiac.ide.model.dataexport.FBNetworkExporter.createFBNetworkElement(FBNetworkExporter.java:54)
at org.eclipse.fordiac.ide.model.dataexport.SystemExporter.addApplication(SystemExporter.java:75)
at org.eclipse.fordiac.ide.model.dataexport.SystemExporter.saveSystem(SystemExporter.java:57)
at org.eclipse.fordiac.ide.systemmanagement.SystemManager.saveSystem(SystemManager.java:393)
at org.eclipse.fordiac.ide.systemconfiguration.editor.SystemConfigurationEditor.doSave(SystemConfigurationEditor.java:77)
at org.eclipse.ui.internal.SaveableHelper.lambda$0(SaveableHelper.java:157)
at org.eclipse.ui.internal.SaveableHelper.lambda$3(SaveableHelper.java:274)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:440)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:356)
at org.eclipse.ui.internal.WorkbenchWindow.lambda$3(WorkbenchWindow.java:2254)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2252)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:281)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:262)
at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:161)
at org.eclipse.ui.internal.WorkbenchPage.saveSaveable(WorkbenchPage.java:3957)
at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3971)
at org.eclipse.ui.internal.handlers.SaveHandler.execute(SaveHandler.java:57)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:320)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:254)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:164)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:497)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:490)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:207)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:308)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:582)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:651)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:441)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$2(KeyBindingDispatcher.java:384)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1193)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1054)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1064)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1106)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1102)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1489)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4888)
at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:353)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4768)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:348)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4784)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2309)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3559)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:628)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:563)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:151)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:199)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:391)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:246)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at 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:595)
at org.eclipse.equinox.launcher.Main.run(Main.java:1501)

Only when I'm saving an application.
Saving in function blocks is working.

Can you please help me to figure out the problem?

[Updated on: Fri, 16 November 2018 08:28] by Moderator

Re: java.lang.NullPointerException [message #1798386 is a reply to message #1798378] Fri, 16 November 2018 09:52 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

have you imported an old project? Could it be that you have an FB in your application where the type is not in your typelib?

Alois
Re: java.lang.NullPointerException [message #1798387 is a reply to message #1798386] Fri, 16 November 2018 10:13 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

yes of course! That was the problem!

Thank you for your quick reply!


Best,
Wolfgang

[Updated on: Mon, 19 November 2018 03:18] by Moderator

Re: java.lang.NullPointerException [message #1798438 is a reply to message #1798387] Mon, 19 November 2018 03:18 Go to previous messageGo to next message
Eclipse UserFriend
May you can help me with this error, which occurrs when I want to build forte with visual studio:

------ Erstellen gestartet: Projekt: FORTE_LITE, Konfiguration: Release Win32 ------
4> FORTE_LITE.vcxproj -> C:\Users\softworks\Desktop\meoFORTE\FORTE_Sources\bin\meoLogic\src\FORTE_LITE.dir\Release\FORTE_LITE.lib
5>------ Erstellen gestartet: Projekt: forte, Konfiguration: Release Win32 ------
5>forteinit.obj : error LNK2005: "private: static unsigned char const E_RESTART::csmCOLDID" (?csmCOLDID@E_RESTART@@0EB) ist bereits in E_RESTART.obj definiert.
5>forteinit.obj : error LNK2005: "private: static unsigned char const E_RESTART::csmWARMID" (?csmWARMID@E_RESTART@@0EB) ist bereits in E_RESTART.obj definiert.
5>forteinit.obj : error LNK2005: "private: static unsigned char const E_RESTART::csmSTOPID" (?csmSTOPID@E_RESTART@@0EB) ist bereits in E_RESTART.obj definiert.
5>C:\Users\softworks\Desktop\meoFORTE\FORTE_Sources\bin\meoLogic\src\Release\forte.exe : fatal error LNK1169: Mindestens ein mehrfach definiertes Symbol gefunden.
========== Erstellen: 4 erfolgreich, Fehler bei 1, 3 aktuell, 0 übersprungen ==========
Re: java.lang.NullPointerException [message #1798497 is a reply to message #1798387] Mon, 19 November 2018 16:52 Go to previous message
Eclipse UserFriend
I had a second look on the issue. I recreated the situation because I found it very bad that 4diac IDE is not saving when a type is missing. However I could not reproduce the problem. When I have a system with a missing type it is nicely saved. However reopening it again made issues. I just pushed a commit that should help a bit here, making 4diac IDE a bit more robust.
Previous Topic:Cannot launch BlinkTest application
Next Topic:fatal error LNK1169 when building forte
Goto Forum:
  


Current Time: Wed Jul 23 16:43:37 EDT 2025

Powered by FUDForum. Page generated in 0.03991 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top