Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions thrown using step function in Probe interfaced with PVManager #164

Closed
arnaudf-iter opened this issue Oct 21, 2013 · 11 comments
Closed

Comments

@arnaudf-iter
Copy link
Contributor

An exception occurs every seconds when typing "=step(10,10)" for example in Probe interfaced with PVManager and no result is displayed.

2013-10-21 08:34:49.059 SEVERE [Thread 1] org.csstudio.logging.PluginLogListener (logging) - Unhandled event loop exception
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.RuntimeException: Values for type  are not setup for notification.)
    at org.eclipse.swt.SWT.error(SWT.java:4282)
    at org.eclipse.swt.SWT.error(SWT.java:4197)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3563)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3212)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.csstudio.utility.product.Workbench.runWorkbench(Unknown Source)
    at org.csstudio.startup.application.Application.startApplication(Unknown Source)
    at org.csstudio.startup.application.Application.start(Unknown Source)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: java.lang.RuntimeException: Values for type  are not setup for notification.
    at org.epics.pvmanager.NotificationSupport.notification(NotificationSupport.java:42)
    at org.epics.pvmanager.PVReaderDirector$1.run(PVReaderDirector.java:301)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
    ... 25 more
@gcarcassi
Copy link
Contributor

At this point, only VTypes can be output of formulas. step() returns a NumberListProvider (or something like that), so you get the error. It's not clear to me why the name of the type is not in the exception message, though: the code is there.

@kasemir
Copy link
Contributor

kasemir commented Oct 31, 2013

What is a correct example for using step()?
Input of table widget? Or part of expression within a formula, just not overall result of formula?

@gcarcassi
Copy link
Contributor

The step function is meant to be used as part of formulas. For example:
tableOf(column("index", step(0,1)), column("values", 'mywaveform'))
The first column will go 0, 1, 2, 3, 4, ... until the end of the waveform arrives.

The point is that the output of step is not a VType. Like the column() function does not return a vType and makes no sense to use directly.

Maybe we can have a better error message, but the fact that you get an error is intended.

@berryma4
Copy link
Member

berryma4 commented Dec 4, 2013

Changing the error message could be in this version, but changing behavior would need to go to 3.3.x.
What would you like Frederic?

@arnaudf-iter
Copy link
Contributor Author

As a first step, changing the error message is enough for us.

@berryma4
Copy link
Member

berryma4 commented Dec 5, 2013

Gabriele, can you change the error message in 3.2.13? And, we can move the
discussion on function behavior to 3.3.x.

On Thu, Dec 5, 2013 at 6:05 AM, arnaudf-iter notifications@github.comwrote:

As a first step, changing the error message is enough for us.


Reply to this email directly or view it on GitHubhttps://github.com//issues/164#issuecomment-29889016
.

@gcarcassi
Copy link
Contributor

The trick is that I need a message that is good for both the programmer and the end user... I'll think of something.

@gcarcassi
Copy link
Contributor

This should be better:

new picture 12

Also: the exception in not generated anymore on the SWT thread.

@berryma4
Copy link
Member

Did you want to merge this to master also, or do you have other plans?

@gcarcassi
Copy link
Contributor

Will be merged to trunk with the new version of pvmanager in January. This was a simple patch for 3.2 that touches fewest things as possible.

@berryma4
Copy link
Member

Thank you , closing ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants