ControlSystemStudio / cs-studio

Control System Studio is an Eclipse-based collections of tools to monitor and operate large scale control systems, such as the ones in the accelerator community.
https://controlsystemstudio.org/
Eclipse Public License 1.0
112 stars 96 forks source link

CSS doesn't start without network connection #83

Closed mark0n closed 11 years ago

mark0n commented 11 years ago

CSS gets stuck during start when I'm not connected to the network. I'm using rev. 3.2.7.201306281053 of the FRIB product. Here is the output on the command line:

marko@konrad-linuxlap:/opt/css-frib$ ./css-frib java.io.IOException: Couldn't get lock for logs/CSSLogFile at java.util.logging.FileHandler.openFiles(FileHandler.java:389) at java.util.logging.FileHandler.(FileHandler.java:363) at org.csstudio.logging.LogConfigurator.configureFileLogging(Unknown Source) at org.csstudio.logging.LogConfigurator.configureFromPreferences(Unknown Source) at org.csstudio.frib.product.startupmodule.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) 2013-07-10 10:50:59.496 WARNING [Thread 16] org.csstudio.security.authentication.LoginJob (run) - Log in error javax.security.auth.login.LoginException: No LoginModules configured for unix at javax.security.auth.login.LoginContext.init(LoginContext.java:273) at javax.security.auth.login.LoginContext.(LoginContext.java:418) at org.eclipse.equinox.internal.security.auth.SecureContext.getLoginContext(SecureContext.java:98) at org.eclipse.equinox.internal.security.auth.SecureContext.login(SecureContext.java:46) at org.csstudio.security.authentication.LoginJob.run(Unknown Source) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

2013-07-10 10:50:59.498 SEVERE [Thread 16] org.csstudio.security.authentication.UnattendedCallbackHandler (handleText) - No LoginModules configured for unix

I ran strace and ltrace to find out what's going on but that doesn't give any usable information. What can I do to find out which plugin is causing the problem?

mark0n commented 11 years ago

I tried to work around this by starting CSS with network connection and remove it when CSS is up and running but it gets stuck again as soon as I hit the "run" button in BOY.

xihui commented 11 years ago

This is because it is loading color or font file from an URL. It could take about 10 seconds to return. I just put this to a background job. See https://github.com/ControlSystemStudio/cs-studio/commit/eea37c2d8d30aee736cfedf467babc502a7ef09d

mark0n commented 11 years ago

I didn't try your fixed revision but replaced the URL with a local file name which should allow me to work around the problem. Unfortunately it doesn't help. CSS freezes for minutes for me not just seconds. I commented out everything with some sort of an URL in the plugin_customization.ini of my product but it's still the same. I also tried the NSLS-II product. Same problem there as well. Any ideas?

xihui commented 11 years ago

Looks like the freeze is not caused by BOY. Maybe it's the lock file which were not released correctly or is being used by another CSS instance. Did you try the basic EPICS version of CSS from SNS?

mark0n commented 11 years ago

After several minutes CSS starts. But it gets stuck again when I run a BOY OPI.

xihui commented 11 years ago

If you go to BOY preference page to set all file path entries to empty and restart CSS, do you still see that?

mark0n commented 11 years ago

I set all path entries to "" on the BOY preferences page but still the same.

xihui commented 11 years ago

Any error or log message? Could you give me a more specific scenario? Which CSS? What the OS? What the steps to produce that? Which OPI? …

From: Martin Konrad [mailto:notifications@github.com] Sent: Tuesday, July 16, 2013 3:54 PM To: ControlSystemStudio/cs-studio Cc: Chen, Xihui Subject: Re: [cs-studio] CSS doesn't start without network connection (#83)

I set all path entries to "" on the BOY preferences page but still the same.

— Reply to this email directly or view it on GitHubhttps://github.com/ControlSystemStudio/cs-studio/issues/83#issuecomment-21068776.

mark0n commented 11 years ago

Hmm, seems like the problem is connected to my workspace. If I use a clean workspace directory CSS starts without any issues. When I import the BOY examples and try to open one of them, it's stuck again. Problem occurs with newest stable versions of FRIB (3.2.7.201306281053), NSLS-II (3.1.6.201306280937) and SNS EPICS basic (3.1.6.20130702) product. OS is Ubuntu 13.04 x86_64.

xihui commented 11 years ago

Which OPI? I tried SNS EPICS 3.1.6 on both Windows and Redhat Linux and didn’t see the problem.

From: Martin Konrad [mailto:notifications@github.com] Sent: Tuesday, July 16, 2013 4:01 PM To: ControlSystemStudio/cs-studio Cc: Chen, Xihui Subject: Re: [cs-studio] CSS doesn't start without network connection (#83)

Hmm, seems like the problem is connected to my workspace. If I use a clean workspace directory CSS starts without any issues. When I import the BOY examples and try to open one of them, it's stuck again. Problem occurs with newest stable versions of FRIB (3.2.7.201306281053), NSLS-II (3.1.6.201306280937) and SNS EPICS basic (3.1.6.20130702) product. OS is Ubuntu 13.04 x86_64.

— Reply to this email directly or view it on GitHubhttps://github.com/ControlSystemStudio/cs-studio/issues/83#issuecomment-21069228.

mark0n commented 11 years ago

EPICS basic with fresh workspace, import BOY Examples, select 10_widgets.opi, right click -> Open With -> OPI Runtime => stuck. No messages on the CLI :-( stuck opi

xihui commented 11 years ago

If you create an empty opi and run it, will it stuck? If you add a button widget to the OPI, will it stuck?

From: Martin Konrad [mailto:notifications@github.com] Sent: Tuesday, July 16, 2013 4:20 PM To: ControlSystemStudio/cs-studio Cc: Chen, Xihui Subject: Re: [cs-studio] CSS doesn't start without network connection (#83)

EPICS basic with fresh workspace, import BOY Examples, select 10_widgets.opi, right click -> Open With -> OPI Runtime => stuck. No messages on the CLI :-( [https://f.cloud.github.com/assets/4429621/807782/ea969c88-ee54-11e2-960a-d1215d5267ad.png]https://f.cloud.github.com/assets/4429621/807782/ea969c88-ee54-11e2-960a-d1215d5267ad.png

— Reply to this email directly or view it on GitHubhttps://github.com/ControlSystemStudio/cs-studio/issues/83#issuecomment-21070500.

mark0n commented 11 years ago

Still the basic SNS product: Create a new OPI, as soon as I hit the "finish" button it's stuck. No need to run it.

mark0n commented 11 years ago

After some time it responds again saying

2013-07-16 16:32:14 ERROR: Failed to read color definition file. 2013-07-16 16:32:14 ERROR: Failed to read font definition file.

in the BOY console. There seems to be no remote color definition file defined in the product's plugins/org.csstudio.basic.epics.product_3.1.4.20130702/plugin_customization.ini file. I also deleted the entries in the preferences dialog before creating the new OPI.

xihui commented 11 years ago

Could you send me the log file under {your workspace}/.metadata/.log?

From: Martin Konrad [mailto:notifications@github.com] Sent: Tuesday, July 16, 2013 4:35 PM To: ControlSystemStudio/cs-studio Cc: Chen, Xihui Subject: Re: [cs-studio] CSS doesn't start without network connection (#83)

Still the basic SNS product: Create a new OPI, as soon as I hit the "finish" button it's stuck. No need to run it.

— Reply to this email directly or view it on GitHubhttps://github.com/ControlSystemStudio/cs-studio/issues/83#issuecomment-21071512.

mark0n commented 11 years ago

Here is the log from SNS EPICS basic while creating an empty OPI:

2013-07-16 17:05:37.057 WARNING [Thread 1] org.csstudio.opibuilder.util.MediaService (loadColorFile) - Failed to read color definition file. java.lang.Exception: Cannot open /BOY Examples/color.def (No such file or directory) at org.csstudio.opibuilder.util.ResourceUtilSSHelperImpl.pathToInputStream(ResourceUtilSSHelperImpl.java:77) at org.csstudio.opibuilder.util.ResourceUtil.pathToInputStream(ResourceUtil.java:82) at org.csstudio.opibuilder.util.MediaService.loadColorFile(MediaService.java:180) at org.csstudio.opibuilder.util.MediaService.(MediaService.java:78) at org.csstudio.opibuilder.util.MediaService.getInstance(MediaService.java:71) at org.csstudio.opibuilder.properties.FontProperty.(FontProperty.java:76) at org.csstudio.opibuilder.model.AbstractWidgetModel.configureBaseProperties(AbstractWidgetModel.java:330) at org.csstudio.opibuilder.model.AbstractContainerModel.configureBaseProperties(AbstractContainerModel.java:125) at org.csstudio.opibuilder.model.AbstractWidgetModel.(AbstractWidgetModel.java:233) at org.csstudio.opibuilder.model.AbstractContainerModel.(AbstractContainerModel.java:52) at org.csstudio.opibuilder.model.DisplayModel.(DisplayModel.java:99) at org.csstudio.opibuilder.wizards.NewOPIFileWizardPage.getInitialContents(NewOPIFileWizardPage.java:34) at org.csstudio.ui.util.wizards.WizardNewFileCreationPage.createNewFile(WizardNewFileCreationPage.java:276) at org.csstudio.opibuilder.wizards.NewOPIFileWizard.performFinish(NewOPIFileWizard.java:44) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:257) at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:277) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209) 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(Workbench.java:116) at org.csstudio.startup.application.Application.startApplication(Application.java:255) at org.csstudio.startup.application.Application.start(Application.java:105) 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.io.FileNotFoundException: /BOY Examples/color.def (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:138) at org.csstudio.opibuilder.util.ResourceUtilSSHelperImpl.pathToInputStream(ResourceUtilSSHelperImpl.java:64) ... 61 more

2013-07-16 17:05:37.067 WARNING [Thread 1] org.csstudio.opibuilder.util.MediaService (loadFontFile) - Failed to read font definition file. java.lang.Exception: Cannot open /BOY Examples/font.def (No such file or directory) at org.csstudio.opibuilder.util.ResourceUtilSSHelperImpl.pathToInputStream(ResourceUtilSSHelperImpl.java:77) at org.csstudio.opibuilder.util.ResourceUtil.pathToInputStream(ResourceUtil.java:82) at org.csstudio.opibuilder.util.MediaService.loadFontFile(MediaService.java:230) at org.csstudio.opibuilder.util.MediaService.(MediaService.java:79) at org.csstudio.opibuilder.util.MediaService.getInstance(MediaService.java:71) at org.csstudio.opibuilder.properties.FontProperty.(FontProperty.java:76) at org.csstudio.opibuilder.model.AbstractWidgetModel.configureBaseProperties(AbstractWidgetModel.java:330) at org.csstudio.opibuilder.model.AbstractContainerModel.configureBaseProperties(AbstractContainerModel.java:125) at org.csstudio.opibuilder.model.AbstractWidgetModel.(AbstractWidgetModel.java:233) at org.csstudio.opibuilder.model.AbstractContainerModel.(AbstractContainerModel.java:52) at org.csstudio.opibuilder.model.DisplayModel.(DisplayModel.java:99) at org.csstudio.opibuilder.wizards.NewOPIFileWizardPage.getInitialContents(NewOPIFileWizardPage.java:34) at org.csstudio.ui.util.wizards.WizardNewFileCreationPage.createNewFile(WizardNewFileCreationPage.java:276) at org.csstudio.opibuilder.wizards.NewOPIFileWizard.performFinish(NewOPIFileWizard.java:44) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:257) at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:277) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209) 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(Workbench.java:116) at org.csstudio.startup.application.Application.startApplication(Application.java:255) at org.csstudio.startup.application.Application.start(Application.java:105) 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.io.FileNotFoundException: /BOY Examples/font.def (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:138) at org.csstudio.opibuilder.util.ResourceUtilSSHelperImpl.pathToInputStream(ResourceUtilSSHelperImpl.java:64) ... 61 more

mark0n commented 11 years ago

I tried to reproduce this issue in a virtual machine. Unfortunately up to now I am not able to reproduce the problem - this is really weird...

kasemir commented 11 years ago

These errors just mean that you use the default (demo) settings for fonts and colors,, which look for those files from the boy examples. After you install the examples, or add your own color and font files, the warnings go away. Shouldn't stop anything from running.

If it is really hung, you might not get a warning at all, since it is hung after all. In that case, sent a quit signal to the jvm to create a stack dump: kill -quit, or try the jstack command line tool on windows.

-Kay

On Jul 16, 2013, at 17:11, Martin Konrad notifications@github.com wrote:

Here is the log from SNS EPICS basic while creating an empty OPI:

2013-07-16 17:05:37.057 WARNING [Thread 1] org.csstudio.opibuilder.util.MediaService (loadColorFile) - Failed to read color definition file. java.lang.Exception: Cannot open /BOY Examples/color.def (No such file or directory) at org.csstudio.opibuilder.util.ResourceUtilSSHelperImpl.pathToInputStream(ResourceUtilSSHelperImpl.java:77) at org.csstudio.opibuilder.util.ResourceUtil.pathToInputStream(ResourceUtil.java:82) at org.csstudio.opibuilder.util.MediaService.loadColorFile(MediaService.java:180) at org.csstudio.opibuilder.util.MediaService.(MediaService.java:78) at org.csstudio.opibuilder.util.MediaService.getInstance(MediaService.java:71) at org.csstudio.opibuilder.properties.FontProperty.(FontProperty.java:76) at org.csstudio.opibuilder.model.AbstractWidgetModel.configureBaseProperties(AbstractWidgetModel.java:330) at org.csstudio.opibuilder.model.AbstractContainerModel.configureBaseProperties(AbstractContainerModel.java:125) at org.csstudio.opibuilder.model.AbstractWidgetModel.(AbstractWidgetModel.java:233) at org.csstudio.opibuilder.model.AbstractContainerModel.(AbstractContainerModel.java:52) at org.csstudio.opibuilder.model.DisplayModel.(DisplayModel.java:99) at org.csstudio.opibuilder.wizards.NewOPIFileWizardPage.getInitialContents(NewOPIFileWizardPage.java:34) at org.csstudio.ui.util.wizards.WizardNewFileCreationPage.createNewFile(WizardNewFileCreationPage.java:276) at org.csstudio.opibuilder.wizards.NewOPIFileWizard.performFinish(NewOPIFileWizard.java:44) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:257) at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:277) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209) 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(Workbench.java:116) at org.csstudio.startup.application.Application.startApplication(Application.java:255) at org.csstudio.startup.application.Application.start(Application.java:105) 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.io.FileNotFoundException: /BOY Examples/color.def (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:138) at org.csstudio.opibuilder.util.ResourceUtilSSHelperImpl.pathToInputStream(ResourceUtilSSHelperImpl.java:64) ... 61 more

2013-07-16 17:05:37.067 WARNING [Thread 1] org.csstudio.opibuilder.util.MediaService (loadFontFile) - Failed to read font definition file. java.lang.Exception: Cannot open /BOY Examples/font.def (No such file or directory) at org.csstudio.opibuilder.util.ResourceUtilSSHelperImpl.pathToInputStream(ResourceUtilSSHelperImpl.java:77) at org.csstudio.opibuilder.util.ResourceUtil.pathToInputStream(ResourceUtil.java:82) at org.csstudio.opibuilder.util.MediaService.loadFontFile(MediaService.java:230) at org.csstudio.opibuilder.util.MediaService.(MediaService.java:79) at org.csstudio.opibuilder.util.MediaService.getInstance(MediaService.java:71) at org.csstudio.opibuilder.properties.FontProperty.(FontProperty.java:76) at org.csstudio.opibuilder.model.AbstractWidgetModel.configureBaseProperties(AbstractWidgetModel.java:330) at org.csstudio.opibuilder.model.AbstractContainerModel.configureBaseProperties(AbstractContainerModel.java:125) at org.csstudio.opibuilder.model.AbstractWidgetModel.(AbstractWidgetModel.java:233) at org.csstudio.opibuilder.model.AbstractContainerModel.(AbstractContainerModel.java:52) at org.csstudio.opibuilder.model.DisplayModel.(DisplayModel.java:99) at org.csstudio.opibuilder.wizards.NewOPIFileWizardPage.getInitialContents(NewOPIFileWizardPage.java:34) at org.csstudio.ui.util.wizards.WizardNewFileCreationPage.createNewFile(WizardNewFileCreationPage.java:276) at org.csstudio.opibuilder.wizards.NewOPIFileWizard.performFinish(NewOPIFileWizard.java:44) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:257) at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:277) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209) 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(Workbench.java:116) at org.csstudio.startup.application.Application.startApplication(Application.java:255) at org.csstudio.startup.application.Application.start(Application.java:105) 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.io.FileNotFoundException: /BOY Examples/font.def (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:138) at org.csstudio.opibuilder.util.ResourceUtilSSHelperImpl.pathToInputStream(ResourceUtilSSHelperImpl.java:64) ... 61 more

— Reply to this email directly or view it on GitHub.

mark0n commented 11 years ago

Thanks Kay! That got me the right piece of information: It seems it blocks while getting the list of printers. That explains why the problem occurs on my PC but everything is fine in my VMs (no printers configured there). After executing

sudo bash -c 'echo "ServerName unixprint.nscl.msu.edu" >> /etc/cups/client.conf'

in the VM the problem occurs there as well. Here is the output of kill -quit:

marko@konrad-linuxlap:/opt/css-frib$ ./css-frib java.io.IOException: Couldn't get lock for logs/CSSLogFile at java.util.logging.FileHandler.openFiles(FileHandler.java:389) at java.util.logging.FileHandler.(FileHandler.java:363) at org.csstudio.logging.LogConfigurator.configureFileLogging(Unknown Source) at org.csstudio.logging.LogConfigurator.configureFromPreferences(Unknown Source) at org.csstudio.frib.product.startupmodule.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:606) 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) 2013-07-17 09:49:11.288 WARNING [Thread 16] org.csstudio.security.authentication.LoginJob (run) - Log in error javax.security.auth.login.LoginException: No LoginModules configured for unix at javax.security.auth.login.LoginContext.init(LoginContext.java:273) at javax.security.auth.login.LoginContext.(LoginContext.java:418) at org.eclipse.equinox.internal.security.auth.SecureContext.getLoginContext(SecureContext.java:98) at org.eclipse.equinox.internal.security.auth.SecureContext.login(SecureContext.java:46) at org.csstudio.security.authentication.LoginJob.run(Unknown Source) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

2013-07-17 09:49:11.290 SEVERE [Thread 16] org.csstudio.security.authentication.UnattendedCallbackHandler (handleText) - No LoginModules configured for unix 2013-07-17 09:49:20 Full thread dump OpenJDK 64-Bit Server VM (23.7-b01 mixed mode):

"Thread-3" prio=10 tid=0x00007fb350e66000 nid=0x31b in Object.wait() [0x00007fb2ef7fd000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method)

"Thread-2" prio=10 tid=0x00007fb350a76800 nid=0x31a in Object.wait() [0x00007fb30c51e000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method)

"Worker-1" prio=10 tid=0x00007fb2f000a000 nid=0x319 in Object.wait() [0x00007fb30c61f000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method)

"Worker-0" prio=10 tid=0x00007fb350997000 nid=0x318 in Object.wait() [0x00007fb30e1e5000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method)

"Worker-JM" prio=10 tid=0x00007fb2f80ca000 nid=0x316 in Object.wait() [0x00007fb30dfe3000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method)

"[Timer] - Main Queue Handler" daemon prio=10 tid=0x00007fb2f0004800 nid=0x315 in Object.wait() [0x00007fb30e0e4000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method)

"Framework Event Dispatcher" daemon prio=10 tid=0x00007fb2f8028000 nid=0x313 in Object.wait() [0x00007fb30e2e6000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method)

"Start Level Event Dispatcher" daemon prio=10 tid=0x00007fb3505cb000 nid=0x312 in Object.wait() [0x00007fb30e3e7000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method)

"State Data Manager" daemon prio=10 tid=0x00007fb3505e8000 nid=0x311 waiting on condition [0x00007fb30e4e8000] java.lang.Thread.State: TIMED_WAITING (sleeping) at java.lang.Thread.sleep(Native Method) at org.eclipse.osgi.internal.baseadaptor.StateManager.run(StateManager.java:297) at java.lang.Thread.run(Thread.java:724)

"Framework Active Thread" prio=10 tid=0x00007fb350584000 nid=0x310 in Object.wait() [0x00007fb30e5e9000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method)

"Service Thread" daemon prio=10 tid=0x00007fb3501da800 nid=0x309 runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" daemon prio=10 tid=0x00007fb3501d8000 nid=0x308 waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" daemon prio=10 tid=0x00007fb3501d5000 nid=0x307 waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=10 tid=0x00007fb3501d3000 nid=0x306 waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=10 tid=0x00007fb350179800 nid=0x303 in Object.wait() [0x00007fb33b9f8000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method)

"Reference Handler" daemon prio=10 tid=0x00007fb350177000 nid=0x302 in Object.wait() [0x00007fb33baf9000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method)

"main" prio=10 tid=0x00007fb350009800 nid=0x2fc runnable [0x00007fb356791000] java.lang.Thread.State: RUNNABLE at org.eclipse.swt.internal.gtk.OS._gtk_enumerate_printers(Native Method) at org.eclipse.swt.internal.gtk.OS.gtk_enumerate_printers(OS.java:9324) at org.eclipse.swt.printing.Printer.getPrinterList(Printer.java:98) at org.csstudio.opibuilder.actions.PrintDisplayAction.(Unknown Source) at org.csstudio.opibuilder.editor.OPIEditor.createActions(Unknown Source) at org.eclipse.gef.ui.parts.GraphicalEditor.initializeActionRegistry(GraphicalEditor.java:362) at org.eclipse.gef.ui.parts.GraphicalEditor.init(GraphicalEditor.java:350) at org.csstudio.opibuilder.editor.OPIEditor.init(Unknown Source) at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:828) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595) at org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java:271) at org.eclipse.ui.internal.EditorManager.setVisibleEditor(EditorManager.java:1459) at org.eclipse.ui.internal.EditorManager$5.runWithException(EditorManager.java:972) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)

"VM Thread" prio=10 tid=0x00007fb35016f000 nid=0x301 runnable

"GC task thread#0 (ParallelGC)" prio=10 tid=0x00007fb350017000 nid=0x2fd runnable

"GC task thread#1 (ParallelGC)" prio=10 tid=0x00007fb350019000 nid=0x2fe runnable

"GC task thread#2 (ParallelGC)" prio=10 tid=0x00007fb35001b000 nid=0x2ff runnable

"GC task thread#3 (ParallelGC)" prio=10 tid=0x00007fb35001c800 nid=0x300 runnable

"VM Periodic Task Thread" prio=10 tid=0x00007fb3501e5000 nid=0x30a waiting on condition

JNI global references: 676

Heap PSYoungGen total 36416K, used 24002K [0x00000000eaab0000, 0x00000000ef1d0000, 0x0000000100000000) eden space 31232K, 60% used [0x00000000eaab0000,0x00000000ebd14b40,0x00000000ec930000) from space 5184K, 99% used [0x00000000eecc0000,0x00000000ef1cc040,0x00000000ef1d0000) to space 5184K, 0% used [0x00000000ec930000,0x00000000ec930000,0x00000000ece40000) ParOldGen total 83328K, used 12367K [0x00000000c0000000, 0x00000000c5160000, 0x00000000eaab0000) object space 83328K, 14% used [0x00000000c0000000,0x00000000c0c13ff8,0x00000000c5160000) PSPermGen total 28736K, used 28702K [0x00000000b5a00000, 0x00000000b7610000, 0x00000000c0000000) object space 28736K, 99% used [0x00000000b5a00000,0x00000000b7607978,0x00000000b7610000)

xihui commented 11 years ago

I have removed the line that calls org.eclipse.swt.printing.Printer.getPrinterList since it is not that important. This is actually a common bug for Eclipse: https://bugs.eclipse.org/bugs/show_bug.cgi?id=153936 You may see that in future when opening a text editor or dialog that is using text viewer. The workaround would be starting CSS with "-Dorg.eclipse.swt.internal.gtk.disablePrinting"

mark0n commented 11 years ago

So it seems to be a bug in GTK+: https://bugzilla.gnome.org/show_bug.cgi?id=346903 BUT: This bug seems to be fixed in Ubuntu for years now: https://launchpad.net/ubuntu/+source/gtk+2.0/2.14.2-0ubuntu1 I'm running the latest Ubuntu with

libgtk2.0-bin 2.24.17-0ubuntu2 libgtk-3-bin 3.6.4-0ubuntu8

What's wrong here? I'd like to make sure this bug can be reopened in GTK+/Ubuntu if the problem still persists. Is there any way I can prove that the bug still exists in my GTK+ revision?