Ok… I packaged up my app into a JAR file and set it off for someone to try.
When they run it it gives a java.lang.StackOverflowError that I can’t seem to figure out why? I get an obvious stack that this huge but can’t really make any sense of it.
Along with my app JAR file I have included
swt.jar
JGoSWT.jar
JGoSWTSVG.jar
swt-*.dll
… it runs without a problem on mine… any clues or things I should look at? could it be an incorrect dll or jar file on the other system?
Here is the last part of the trace (which repeats for about 20 pages)…
java.lang.StackOverflowError
java.lang.StackOverflowError
at org.eclipse.swt.widgets.EventTable.hooks(EventTable.java:51)
at org.eclipse.swt.widgets.Widget.hooks(Widget.java:620)
at org.eclipse.swt.widgets.Composite.WM_PRINTCLIENT(Composite.java:1340)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3304)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025)
at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:1842)
at org.eclipse.swt.widgets.Button.callWindowProc(Button.java:327)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025)
at org.eclipse.swt.internal.win32.OS.SetWindowTextW(Native Method)
at org.eclipse.swt.internal.win32.OS.SetWindowText(OS.java:2636)
at org.eclipse.swt.widgets.Button._setText(Button.java:290)
at org.eclipse.swt.widgets.Button.setText(Button.java:914)
at com.nwoods.jgo.JGoButton.paint(Unknown Source)
at com.nwoods.jgo.JGoView.paintViewObjects(Unknown Source)
at com.nwoods.jgo.JGoView.paintView(Unknown Source)
at com.nwoods.jgo.JGoView.paintControl(Unknown Source)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:83)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)
at org.eclipse.swt.widgets.Composite.WM_PRINTCLIENT(Composite.java:1355)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3304)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025)
at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:1842)
at org.eclipse.swt.widgets.Button.callWindowProc(Button.java:327)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025)
at org.eclipse.swt.internal.win32.OS.SetWindowTextW(Native Method)
at org.eclipse.swt.internal.win32.OS.SetWindowText(OS.java:2636)
at org.eclipse.swt.widgets.Button._setText(Button.java:290)
at org.eclipse.swt.widgets.Button.setText(Button.java:914)
I also tried using the -Xss1m option and got the same.
I was able to to get it to work on other systems by replacing the JGoSWT*.jar and swt.jar/swt-*.dll with the ones included in the 5.15 versions… so now I am really confused!
Are you trying to print a JGoButton? When I try that, nothing shows up on the printed page, since there is no support for printing of Controls.
If you don't really need a Button widget/Control, it might be best to implement a JGoArea containing a JGo3DRect and a JGoText, implementing a doMouseClick method (or a JGoViewListener looking for JGoViewEvent.CLICKED).
// Create a button for things I want it to do
myView.addObjectAtTail( new OpenButton( this, new Point(20,10), new Dimension(50,25) ) );
saveButton = new SaveButton( this, new Point(80,10), new Dimension(50,25) );
myView.addObjectAtTail( saveButton );
myView.addObjectAtTail( new GenXmlButton( new Point(140,10), new Dimension(60,25) ) );
and I am not trying to print them. The buttons are extending the JGoButton and overriding the doMouseClick but other then that nothing else.