Project

General

Profile

Defect #124

Browserbean does not load on Mac in 5.2

Added by Karel Broer about 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Urgent
Target version:
-
Start date:
08/06/2010
Due date:
% Done:

50%

Estimated time:
Browser (if web client):

Description

In Servoy 5.2.0 on Mac OS X 10.6.4, Java 1.6_17, the browserbean doesn't load.
See: http://screencast.com/t/MzE1NDQ5M


Files

servoy_smart_client_5.2.0.997.jar (812 KB) servoy_smart_client_5.2.0.997.jar Patrick Talbot, 08/07/2010 08:36 PM

History

#1

Updated by Robert Ivens about 11 years ago

When adding the browserbean onto a form in Developer I get the spinning beach bal (no real CPU load though).

Servoy 5.2 (final)
Mac OS X 10.6.4
Java 1.6.0_20

#2

Updated by Patrick Talbot about 11 years ago

Do you have any Exception StackTrace in the servoy_log.txt (in developer) or in the Java console (in smart client) that could help me find out what's going on?

#3

Updated by Karel Broer about 11 years ago

I've got this in the servoy_log.txt:

2010-08-06 14:34:11,304 ERROR [pool-4-thread-1] com.servoy.j2db.util.Debug - Error ocured initializing plugin: BrowserSuite , error: org/eclipse/swt/SWT
2010-08-06 14:34:11,309 ERROR [pool-4-thread-1] com.servoy.j2db.util.Debug - Throwable
java.lang.NoClassDefFoundError: org/eclipse/swt/SWT
at chrriis.dj.nativeswing.swtimpl.NativeInterface.initialize(NativeInterface.java:186)
at chrriis.dj.nativeswing.swtimpl.NativeInterface.open(NativeInterface.java:245)
at net.stuff.servoy.browser.plugins.ServoyBrowserPlugin.initialize(ServoyBrowserPlugin.java:150)
at com.servoy.j2db.plugins.PluginManager.initClientPluginsEx(PluginManager.java:384)
at com.servoy.j2db.plugins.PluginManager.initClientPlugins(PluginManager.java:242)
at com.servoy.j2db.smart.J2DBClient$14.run(J2DBClient.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.SWT
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
... 9 more
2010-08-06 14:34:12,798 ERROR [AWT-EventQueue-0] com.servoy.j2db.util.Debug - Throwable
java.lang.NoClassDefFoundError: org/eclipse/swt/SWT
at chrriis.dj.nativeswing.swtimpl.NativeInterface.initialize(NativeInterface.java:186)
at chrriis.dj.nativeswing.swtimpl.NativeInterface.open(NativeInterface.java:245)
at net.stuff.servoy.browser.beans.utils.ServoySWTBean.initialize(ServoySWTBean.java:230)
at net.stuff.servoy.browser.beans.ServoyBrowser.initialize(ServoyBrowser.java:131)
at net.stuff.servoy.browser.beans.ServoyBrowser.getBeanInstance(ServoyBrowser.java:88)
at com.servoy.j2db.component.ComponentFactory.createBean(ComponentFactory.java:832)
at com.servoy.j2db.component.ComponentFactory.createDesignComponent(ComponentFactory.java:232)
at com.servoy.j2db.component.ComponentFactory.getBeanDesignInstance(ComponentFactory.java:218)
at com.servoy.eclipse.designer.internal.core.PersistImageNotifier$1.run(PersistImageNotifier.java:116)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
2010-08-06 14:34:12,820 ERROR [AWT-EventQueue-0] com.servoy.j2db.util.Debug - Throwable
java.lang.NoClassDefFoundError: org/eclipse/swt/SWT
at chrriis.dj.nativeswing.swtimpl.NativeInterface.initialize(NativeInterface.java:186)
at chrriis.dj.nativeswing.swtimpl.NativeInterface.open(NativeInterface.java:245)
at net.stuff.servoy.browser.beans.utils.ServoySWTBean.initialize(ServoySWTBean.java:230)
at net.stuff.servoy.browser.beans.ServoyBrowser.initialize(ServoyBrowser.java:131)
at net.stuff.servoy.browser.beans.ServoyBrowser.getBeanInstance(ServoyBrowser.java:88)
at com.servoy.j2db.component.ComponentFactory.createBean(ComponentFactory.java:832)
at com.servoy.j2db.component.ComponentFactory.createDesignComponent(ComponentFactory.java:232)
at com.servoy.eclipse.designer.internal.core.PersistImageNotifier$1.run(PersistImageNotifier.java:124)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
2010-08-06 14:34:32,679 ERROR [main] com.servoy.j2db.util.Debug - Throwable
java.lang.NoClassDefFoundError: org/eclipse/swt/SWT
at chrriis.dj.nativeswing.swtimpl.NativeInterface.initialize(NativeInterface.java:186)
at chrriis.dj.nativeswing.swtimpl.NativeInterface.open(NativeInterface.java:245)
at net.stuff.servoy.browser.beans.utils.ServoySWTBean.initialize(ServoySWTBean.java:230)
at net.stuff.servoy.browser.beans.ServoyBrowser.initialize(ServoyBrowser.java:131)
at net.stuff.servoy.browser.beans.ServoyBrowser.getBeanInstance(ServoyBrowser.java:88)
at com.servoy.j2db.component.ComponentFactory.createBean(ComponentFactory.java:832)
at com.servoy.j2db.component.ComponentFactory.createDesignComponent(ComponentFactory.java:232)
at com.servoy.j2db.component.ComponentFactory.getBeanDesignInstance(ComponentFactory.java:218)
at com.servoy.eclipse.ui.property.PersistPropertySource.init(PersistPropertySource.java:265)
at com.servoy.eclipse.ui.property.PersistPropertySource.getPropertyDescriptor(PersistPropertySource.java:429)
at com.servoy.eclipse.designer.editor.commands.ToggleCheckboxAction.isChecked(ToggleCheckboxAction.java:65)
at com.servoy.eclipse.designer.editor.commands.ToggleCheckboxAction.handleSelectionChanged(ToggleCheckboxAction.java:53)
at org.eclipse.gef.ui.actions.SelectionAction.setSelection(SelectionAction.java:96)
at org.eclipse.gef.ui.actions.SelectionAction.update(SelectionAction.java:117)
at org.eclipse.gef.ui.parts.GraphicalEditor.updateActions(GraphicalEditor.java:414)
at com.servoy.eclipse.designer.editor.VisualFormEditorDesignPage.selectionChanged(VisualFormEditorDesignPage.java:125)
at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156)
at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged(AbstractSelectionService.java:62)
at org.eclipse.ui.part.MultiPageSelectionProvider$1.run(MultiPageSelectionProvider.java:110)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.part.MultiPageSelectionProvider.fireEventChange(MultiPageSelectionProvider.java:108)
at org.eclipse.ui.part.MultiPageSelectionProvider.fireSelectionChanged(MultiPageSelectionProvider.java:90)
at org.eclipse.ui.part.MultiPageEditorSite.handleSelectionChanged(MultiPageEditorSite.java:452)
at org.eclipse.ui.part.MultiPageEditorSite$4.selectionChanged(MultiPageEditorSite.java:368)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer.fireSelectionChanged(AbstractEditPartViewer.java:243)
at com.servoy.eclipse.designer.editor.ModifiedScrollingGraphicalViewer.fireSelectionChanged(ModifiedScrollingGraphicalViewer.java:92)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer$1.run(AbstractEditPartViewer.java:129)
at org.eclipse.gef.SelectionManager.fireSelectionChanged(SelectionManager.java:115)
at org.eclipse.gef.SelectionManager.setSelection(SelectionManager.java:230)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer.setSelection(AbstractEditPartViewer.java:729)
at com.servoy.eclipse.designer.editor.commands.PersistPlaceCommandWrapper.refresh(PersistPlaceCommandWrapper.java:71)
at com.servoy.eclipse.designer.editor.commands.RefreshingCommand.execute(RefreshingCommand.java:47)
at org.eclipse.gef.commands.CommandStack.execute(CommandStack.java:170)
at com.servoy.eclipse.designer.actions.AbstractEditpartActionDelegate.run(AbstractEditpartActionDelegate.java:96)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
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$6.handleEvent(ActionContributionItem.java:452)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3776)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1187)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3622)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3277)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
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:368)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
2010-08-06 14:34:32,773 ERROR [AWT-EventQueue-0] com.servoy.j2db.util.Debug - Throwable
java.lang.NoClassDefFoundError: org/eclipse/swt/SWT
at chrriis.dj.nativeswing.swtimpl.NativeInterface.initialize(NativeInterface.java:186)
at chrriis.dj.nativeswing.swtimpl.NativeInterface.open(NativeInterface.java:245)
at net.stuff.servoy.browser.beans.utils.ServoySWTBean.initialize(ServoySWTBean.java:230)
at net.stuff.servoy.browser.beans.ServoyBrowser.initialize(ServoyBrowser.java:131)
at net.stuff.servoy.browser.beans.ServoyBrowser.getBeanInstance(ServoyBrowser.java:88)
at com.servoy.j2db.component.ComponentFactory.createBean(ComponentFactory.java:832)
at com.servoy.j2db.component.ComponentFactory.createDesignComponent(ComponentFactory.java:232)
at com.servoy.eclipse.designer.internal.core.PersistImageNotifier$1.run(PersistImageNotifier.java:124)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
2010-08-06 14:34:33,013 ERROR [AWT-EventQueue-0] com.servoy.j2db.util.Debug - Throwable
java.lang.NoClassDefFoundError: org/eclipse/swt/SWT
at chrriis.dj.nativeswing.swtimpl.NativeInterface.initialize(NativeInterface.java:186)
at chrriis.dj.nativeswing.swtimpl.NativeInterface.open(NativeInterface.java:245)
at net.stuff.servoy.browser.beans.utils.ServoySWTBean.initialize(ServoySWTBean.java:230)
at net.stuff.servoy.browser.beans.ServoyBrowser.initialize(ServoyBrowser.java:131)
at net.stuff.servoy.browser.beans.ServoyBrowser.getBeanInstance(ServoyBrowser.java:88)
at com.servoy.j2db.component.ComponentFactory.createBean(ComponentFactory.java:832)
at com.servoy.j2db.component.ComponentFactory.createDesignComponent(ComponentFactory.java:232)
at com.servoy.eclipse.designer.internal.core.PersistImageNotifier$1.run(PersistImageNotifier.java:124)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
2010-08-06 14:34:34,672 ERROR [AWT-EventQueue-0] com.servoy.j2db.util.Debug - Throwable
java.lang.NoClassDefFoundError: org/eclipse/swt/SWT
at chrriis.dj.nativeswing.swtimpl.NativeInterface.initialize(NativeInterface.java:186)
at chrriis.dj.nativeswing.swtimpl.NativeInterface.open(NativeInterface.java:245)
at net.stuff.servoy.browser.beans.utils.ServoySWTBean.initialize(ServoySWTBean.java:230)
at net.stuff.servoy.browser.beans.ServoyBrowser.initialize(ServoyBrowser.java:131)
at net.stuff.servoy.browser.beans.ServoyBrowser.getBeanInstance(ServoyBrowser.java:88)
at com.servoy.j2db.component.ComponentFactory.createBean(ComponentFactory.java:832)
at com.servoy.j2db.component.ComponentFactory.createDesignComponent(ComponentFactory.java:232)
at com.servoy.eclipse.designer.internal.core.PersistImageNotifier$1.run(PersistImageNotifier.java:124)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

#4

Updated by Patrick Talbot about 11 years ago

  • Status changed from New to In Progress
#5

Updated by Patrick Talbot about 11 years ago

Thanks, I have found out what was the problem: Servoy 5.1 ServoyLib contained a special reexport tag of org.eclipse.swt, exposing SWT to the BrowserSuite inside the DebugJ2DBClient. This is no longer the case. I made a patch and will submit it to Johan Companer, this is only one line in the MANIFEST.MF that changes everything... The good news is that it doesn't affect clients, only in Developer on Mac OS X.

Still there is another problem the first time you put a bean on a form: the app freezes. I found out that this is related to the code that they added to workaround the blank screen when starting the debug client on Mac OS X. I have a few ideas and will experiment about that, and try to work with Johan to address this problem along with the blank screen problem, my guess is that if I can address that bug the other one will also be corrected...

In the meantime, you can use the attached servoy_smart_client_5.2.0.997.jar and put it in your Servoy/developer/plugins/ folder, this one contains the swt reexport.

Stay tuned for the other problem

#6

Updated by Patrick Talbot about 11 years ago

I have found out that the app is freezing when you add ANY bean in 5.2 on Mac OS X, not only the BrowserSuite.
You can try adding a TreeView bean for example and the app will freeze too. This is true only the first time you place a bean though, and only if you didn't launch the debug client before doing it... You can try it at home ;-)

There is a deadlock occuring between the main() Thread and the AWT EventDispatchThread, both are holding a lock on the same object, so they are waiting forever on the other.

My idea was to put the SWT thread to sleep which might be a workable solution for the Blank screen but will not solve that freeze.
Will talk to Johan about all that.

#7

Updated by Patrick Talbot about 11 years ago

  • % Done changed from 50 to 100

Patch sent to Johan Companer/Jan Blok
So until it is part of Servoy 5.2.1 please use the attached jar to use the BrowserSuite in 5.2 on Mac OS X developer.

Explanation and Thread Dump also send about the deadlock, didn't found a solution but they will probably see the problem straight away using the Thread Dump.

And a suggestion for the blank screen on Mac OS X.

Will follow up on these issues with Servoy and keep you posted.

#8

Updated by Patrick Talbot about 11 years ago

  • Status changed from In Progress to Closed

Patch is now part of next Servoy (5.2.1) update.
@see http://www.servoyforge.net/projects/servoy/repository/revisions/687

Also the place bean issue the first time should also be corrected because instead of creating a new J2DBDebugClient for a simple call to IClientPluginAccess.getApplicationType() a constant is returned.

#9

Updated by Marc Boegem about 11 years ago

v.5.2.1 still has this problem. What happened to the patch?

Besides I tried to include the HTML editor.
So created an empty form, started the debug smart client.
Add the browser bean > no problem
Add the html editor > Serclipse crashes

Mac 10.6.4
Java 1.6.0_20
BrowserSuite 0.9.41

#10

Updated by Patrick Talbot about 11 years ago

The patch has been applied, otherwise you wouldn't be able to add the browser bean at all.
I didn't noticed that the ServoyHtmlEditor bean was having a different behavior.

Will check that this evening, do you manage to reproduce this all the time?

#11

Updated by Patrick Talbot about 11 years ago

  • Status changed from Closed to In Progress

A different deadlock occur when a bean using IServoyAware or being instanciated by an IServoyBeanFactory is put for the first time on the form editor.
If the debug client has not been launched or if another simple bean has not been put on the editor, the app will lock (Mac OS X only).
This is not exactly the same as the previous one, but close...
The Thread dump has been forwarded to Johan Compagner.

This is true for other beans as well (not simple Java beans, but ServoyAware ones, so this affects the ServoySlider, SVGBean and DateChooserBean as well for example).

As for the ServoyHtmlEditor in particular, this is something else: the crash happens in the SWT_AWT bridge so I have forwarded to Christopher Deckers.

#12

Updated by Patrick Talbot about 11 years ago

Patrick Talbot wrote:

A different deadlock occur when a bean using IServoyAware or being instanciated by an IServoyBeanFactory is put for the first time on the form editor.
If the debug client has not been launched or if another simple bean has not been put on the editor, the app will lock (Mac OS X only).
This is not exactly the same as the previous one which has been fixed in 5.2.1, but it is close...
The Thread dump has been forwarded to Johan Compagner.

This is true for other beans as well (not simple Java beans, but ServoyAware ones, so this affects the ServoySlider, SVGBean and DateChooserBean as well for example).

As for the ServoyHtmlEditor in particular, this is something else: the crash happens in the SWT_AWT bridge so I have forwarded to Christopher Deckers.

#13

Updated by Patrick Talbot about 11 years ago

  • % Done changed from 100 to 50

The first kind of deadlock for beans using IServoyAware or instatiated by an IServoyBeanFactory is fixed in the Servoy SVN sources (will be available with 5.2.2), see http://www.servoyforge.net/projects/servoy/repository/revisions/936

A workaround in the meantime is to launch the debug client at least once before adding a bean.

For the ServoyHtmlEditor though, there is something else: an invalid memory access in the Native Thread that we are investigating.
It might be that the editor could be instantiated as a simple JPanel in the form editor, and the real bean instance would then be loaded in the Smart client, I will try that on my side, while Christopher is working at the DJNativeSwing-SWT level.

#14

Updated by Patrick Talbot about 11 years ago

  • Status changed from In Progress to Closed

ServoyHtmlEditor crash on Mac OS X fixed with v0.9.42 - see issue #148

Also available in: Atom PDF