Sloeber / arduino-eclipse-plugin

A plugin to make programming the arduino in eclipse easy
https://eclipse.baeyens.it/
419 stars 131 forks source link

Serial plotter issue : Failed to create the part's control (RELOADED) #751

Closed antonio-petricca closed 6 years ago

antonio-petricca commented 7 years ago

Hi, I cannot post my problem on the closed issue #650 so I created a new one.

I have just installed, from scratch, by the TAR.GZ, the latest release available on the web site, and I got the same issue.

I searched a lot for the plugin.xml file, but I didn't find it.

Could you help me please?

jantje commented 7 years ago

please state

As an independent open source project we value your submission, but we ask for support, either by helping us out coding (yeah, we do understand it does require time) or a Patreon contribution (starting from as low as 1$ a month): this allows us to support people who support us back! As a supporter you can drag our attention and prioritize your submission... please become a supporter! https://www.patreon.com/jantje

antonio-petricca commented 7 years ago

Hi, I'll be a supporter ASAP be sure! :)

The answers to your questions are:

Unfortunately I cannot find the plugin.xml, these are the onyl I found:

./programs/sloeber/configuration/org.eclipse.osgi/18/0/.cp/plugin.xml ./programs/sloeber/plugins/org.eclipse.ui.themes_1.1.300.v20161107-1827/plugin.xml ./programs/sloeber/plugins/org.eclipse.platform_4.6.2.v20161124-1400/plugin.xml

The stack trace is:

java.lang.IllegalArgumentException: Argument not valid at org.eclipse.swt.SWT.error(SWT.java:4514) at org.eclipse.swt.SWT.error(SWT.java:4448) at org.eclipse.swt.SWT.error(SWT.java:4419) at org.eclipse.swt.widgets.Widget.error(Widget.java:483) at org.eclipse.swt.widgets.Control._setBackground(Control.java:4193) at org.eclipse.swt.widgets.Control.setBackground(Control.java:4183) at org.eclipse.nebula.widgets.oscilloscope.multichannel.Plotter.(Plotter.java:189) at io.sloeber.monitor.views.MyPlotter.(MyPlotter.java:35) at io.sloeber.monitor.views.PlotterView.createPartControl(PlotterView.java:77) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:150) at org.eclipse.ui.internal.e4.compatibility.CompatibilityView.createPartControl(CompatibilityView.java:143) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:340) at sun.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:531) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:966) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:931) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:151) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:375) at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:294) at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:105) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:74) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:56) at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:129) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:975) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:651) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$1.run(PartRenderingEngine.java:536) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:520) at org.eclipse.e4.ui.workbench.renderers.swt.ElementReferenceRenderer.createWidget(ElementReferenceRenderer.java:70) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:975) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:651) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:757) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:728) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:722) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:706) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.subscribeTopicToBeRendered(PartRenderingEngine.java:149) at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:531) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) at org.eclipse.e4.core.di.internal.extensions.EventObjectSupplier$DIEventHandler.handleEvent(EventObjectSupplier.java:80) at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setToBeRendered(UIElementImpl.java:303) at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:612) at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:581) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:770) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:744) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:682) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:677) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1205) at org.eclipse.ui.internal.WorkbenchPage.showPart(WorkbenchPage.java:1283) at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1274) at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.java:4316) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:4312) at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:4292) at io.sloeber.ui.actions.OpenPlotterHandler.execute(OpenPlotterHandler.java:22) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295) at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90) at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:531) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:282) at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:264) at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132) at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:488) at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210) at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:433) at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem.java:454) at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem$3.handleEvent(AbstractContributionItem.java:482) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5227) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1340) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4561) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4151) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) at sun.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:531) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) at org.eclipse.equinox.launcher.Main.run(Main.java:1519) at org.eclipse.equinox.launcher.Main.main(Main.java:1492)

Thank you so much! Antonio

jantje commented 7 years ago

Sloeber 4.0 (the latest availble on the web site)

From the stack trace I would assume this the latest stable and not the latest nightly. @wimjongman is Bug 510847 https://bugs.eclipse.org/bugs/show_bug.cgi?id=510847 fixed in nebula?

antonio-petricca commented 7 years ago

Yes, it is the latest stable.

How could I get rid of this bug?

jantje commented 7 years ago

The bug in in nebula and I think it is fixed. So upgrading nebula should work. The nebula update site is http://download.eclipse.org/nebula/snapshot I think a better idea right now is upgrading to the sloeber nightly http://eclipse.baeyens.it/update/V4/nightly Both will only fix the issue if Bug 510847 is fixed in nebula

wimjongman commented 7 years ago

No it is not fixed in Nebula AFAIK.

On Tue, May 23, 2017 at 10:25 PM, jantje notifications@github.com wrote:

The bug in in nebula and I think it is fixed. So upgrading nebula should work. The nebula update site is http://download.eclipse.org/ nebula/snapshot I think a better idea right now is upgrading to the sloeber nightly http://eclipse.baeyens.it/update/V4/nightly Both will only fix the issue if Bug 510847 is fixed in nebula

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Sloeber/arduino-eclipse-plugin/issues/751#issuecomment-303521206, or mute the thread https://github.com/notifications/unsubscribe-auth/AALC6W8OgSClxkXcGCkun4An8T52ybd9ks5r80CdgaJpZM4NjkNa .

jantje commented 7 years ago

@wimjongman Shall I create a pull request?

jantje commented 7 years ago

@wimjongman I pushed a commit. I made bg a local variable and removed the dispose

antonio-petricca commented 7 years ago

Thank you! I inspected your commit and added the softwre store. I'm going to check it...

antonio-petricca commented 7 years ago

During update I got this error:

An error occurred while collecting items to be installed session context was:(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=). HTTP Server 'Service Unavailable': http://download.eclipse.org/nebula/snapshot/plugins/org.eclipse.nebula.widgets.ganttchart_1.0.0.201705221618.jar HttpComponents connection error response code 503.

I restarted the IDE, but the Plotter show me the same exception message. :(

jantje commented 7 years ago

Thank you! I inspected your commit and added the softwre store. I'm going to check it...

I'm not following here

During update I got this error:

Strange Sloeber is not using/referencing ganttchart. If the install continued you should be fine.

I restarted the IDE, but the Plotter show me the same exception message. :(

As Wim stated

No it is not fixed in Nebula AFAIK.

I pushed a commit to nebula and the review pointed out more issues of the same type. I'm not sure how long it takes to get it on the server. But I'm working on it.

jantje commented 7 years ago

I'm not sure why but this is not happening on my windows machine. So I'm asuming it is a linux only problem

antonio-petricca commented 7 years ago

I tried to update to the nightly build, but the issue persists.

wimjongman commented 7 years ago

For people interested in the intermediate patch (not for the weak of heart):

Add this update site to Eclipse:

https://hudson.eclipse.org/nebula/job/nebula.stable.gerrit/lastSuccessfulBuild/artifact/releng/org.eclipse.nebula.updatesite/target/repository/

[image: Inline image 1]

[image: Inline image 3]

[image: Inline image 4]

On Wed, May 24, 2017 at 4:07 PM, DareDevil73 notifications@github.com wrote:

I tried to update to nightly build, but the issue persists.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Sloeber/arduino-eclipse-plugin/issues/751#issuecomment-303734585, or mute the thread https://github.com/notifications/unsubscribe-auth/AALC6XO6jnJG3jVpY04uHS_vt-_FlHy1ks5r9DmMgaJpZM4NjkNa .

antonio-petricca commented 7 years ago

Hi, I suspect you missed a file :)

Unable to read repository at https://hudson.eclipse.org/nebula/job/nebula.stable.gerrit/lastSuccessfulBuild/artifact/releng/org.eclipse.nebula.updatesite/target/repository/content.xml. Unable to read repository at https://hudson.eclipse.org/nebula/job/nebula.stable.gerrit/lastSuccessfulBuild/artifact/releng/org.eclipse.nebula.updatesite/target/repository/content.xml. Unable to make member of class sun.security.ssl.SSLSocketImpl accessible: module java.base does not export sun.security.ssl to unnamed module @4b78028

antonio-petricca commented 7 years ago

Hi @wimjongman , could you publish the content.xml missing file? Thank you!

jantje commented 7 years ago

The suspected issue has been fixed and accepted now in nebula. I'm not sure how long it will take to be available at http://download.eclipse.org/nebula/snapshot but there is a version of today. As I don't have the problem I can't see if it contains the fix nor if the fix works

wimjongman commented 7 years ago

The Eclipse fix was merged so it should be available in the nightly.

Cheers,

Wim

On Wed, May 24, 2017 at 4:26 PM, DareDevil73 notifications@github.com wrote:

Hi, I suspect you missed a file :)

Unable to read repository at https://hudson.eclipse.org/ nebula/job/nebula.stable.gerrit/lastSuccessfulBuild/ artifact/releng/org.eclipse.nebula.updatesite/target/ repository/content.xml. Unable to read repository at https://hudson.eclipse.org/ nebula/job/nebula.stable.gerrit/lastSuccessfulBuild/ artifact/releng/org.eclipse.nebula.updatesite/target/ repository/content.xml. Unable to make member of class sun.security.ssl.SSLSocketImpl accessible: module java.base does not export sun.security.ssl to unnamed module @4b78028

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Sloeber/arduino-eclipse-plugin/issues/751#issuecomment-303740365, or mute the thread https://github.com/notifications/unsubscribe-auth/AALC6fkqmPuzDhjLaw-_KPSZdtnmnuqiks5r9D4agaJpZM4NjkNa .

jantje commented 7 years ago

I'm currently releasing V4.1 which has been build this afternoon. It should contain the fix.

antonio-petricca commented 7 years ago

Thank you so much, but could I kindly ask you which are the only needed software update sites to add to my installation? Due to several attempts to fix the issue I added a lot of garbage to the list.

Regards, Antonio

jantje commented 7 years ago

This is what the V4.1 fresh install has afbeelding

antonio-petricca commented 7 years ago

Hi, I just removed my old release, downloaded a fresh 4.1 tar.gz and installed it.

Now I don't get any exception, but the plotter view is a black canvas with a vertical yellow line on the right from the top to the bottom of the view.

Did I miss something?

Thank you! workspace - arduino - ot-switch-ot-switch h - sloeber the eclipse arduino ide as superuser _003

jantje commented 7 years ago

I just tested here. This is what I see afbeelding What do your colour settings look like? afbeelding

antonio-petricca commented 7 years ago

Hi, attached my settings,the default ones! :( preferences filtered as superuser _004

jantje commented 7 years ago

Any errors in the error log? Did you try to send data to the plotter and see wether you can see it?

antonio-petricca commented 7 years ago

In the error log there are no errors, and I see the first image I attached to this thread (3 post above).

jantje commented 7 years ago

The yellow line is normal. The message about connecting the serial monitor is only there f the serial monitor is not connected. But the crosshairs should be there. Does the plotter react to double click? Please use the simplot library example to see wether you can see any output https://github.com/jantje/ArduinoLibraries/tree/master/simplot

jantje commented 7 years ago

Also try to change the background color to white and see whether you see more then. Note you need to close and reopen the plotter to see the changes.

antonio-petricca commented 7 years ago

Does the plotter react to double click?

Yes, it asks me to selec a CSV file from the file system.

Also try to change the background color to white and see whether you see more then. Note you need to close and reopen the plotter to see the changes.

I see a white canvas.

Sorry fot the stupid question. I'm using this great tool (Sloeber) since few days, so I expect to see onto the plotter view the data got from the serial as for the Arduino IDE. Instead I know now that I have to use the approach provided by this example https://github.com/jantje/ArduinoLibraries/blob/master/simplot/examples/plotterExample/plotterExample.ino .

Is it right?

Thank you for your patience and assistance!

jantje commented 7 years ago

Is it right?

Yes The simplot library packs data (maximum 6 integer values) and sends it over the serial connection in such a way that sloeber can identify what is to be plotted on the plotter and what is to be printed in the serial monitor.

jantje commented 7 years ago

@DareDevil73 Would you mind trying to debug this issue? As I can not reproduce it there are very little other options to find the problem.

jantje commented 7 years ago

Any update on this issue?

wimjongman commented 6 years ago

I think it is a user error as he indicated in one of his comments. There are no further reports of this issue. Please reopen if it happens again.