java.lang.OutOfMemoryError: PermGen space

WindowTester allows you to easily create and run unit tests for every GUI they build. It can also be used to generate system level tests.

Moderators: gnebling, Eric Clayberg, Dan Rubel, keertip, Phil Quitslund

java.lang.OutOfMemoryError: PermGen space

Postby EDWARD BOLLES » Tue Jun 17, 2008 10:16 am

WindowTester: WindowTesterPro_v3.0.1.200806101125
Eclipse: Eclipse SDK 3.3.1.1
Use: Evaluation

When I play the following script, I get error: "java.lang.OutOfMemoryError: PermGen space" at the line indicated below.

--------------------------------------------

public class simulateScript extends UITestCaseSWT {

/**
* Main test method.
*/
public void testsimulateScript() throws Exception {
IUIContext ui = getUI();
// import project ---------------------------------------------------
ui.contextClick(new SWTWidgetLocator(Tree.class, new ViewLocator(
"org.eclipse.ui.navigator.ProjectExplorer")),
"&Import/&Import...");
ui.wait(new ShellShowingCondition("Import"));
ui.click(new FilteredTreeItemLocator("General"));
ui.click(new FilteredTreeItemLocator(
"General/Existing Projects into Workspace"));
ui.click(new ButtonLocator("&Next >"));
ui.click(new SWTWidgetLocator(Text.class, 0, new SWTWidgetLocator(
Composite.class)));
ui
.enterText("C:\\dir1\\RCPapplication\\tutorial\\basic\\Tutorial");
ui.keyClick(WT.CR);
ui.click(new ButtonLocator("&Finish"));
ui.wait(new ShellDisposedCondition("Import"));

// open BPEL file to canvas ------------------------
ui.click(2, new TreeItemLocator(
"Tutorial/bpel/loanProcessCompleted.bpel", new ViewLocator(
"org.eclipse.ui.navigator.ProjectExplorer"))); // ERROR IS TRIGGERED HERE
ui.click(new ContributedToolItemLocator(
"com.RCPapplication.bpep.start_simulation"));
ui.click(new CTabItemLocator("Debug"));
ui.click(new ContributedToolItemLocator(
"org.eclipse.debug.ui.commands.StepInto"));
ui.click(new ContributedToolItemLocator(
"org.eclipse.debug.ui.commands.StepInto"));
ui.click(new ContributedToolItemLocator(
"org.eclipse.debug.ui.commands.StepInto"));
ui.click(new CTabItemLocator("loanProcessCompleted.bpel"));
ui.click(new ContributedToolItemLocator(
"com.RCPapplication.bpep.clear_animation"));
ui.close(new CTabItemLocator("loanProcessCompleted.bpel"));
ui.click(new TreeItemLocator("Tutorial", new ViewLocator(
"org.eclipse.ui.navigator.ProjectExplorer")));
ui.contextClick(new TreeItemLocator("Tutorial", new ViewLocator(
"org.eclipse.ui.navigator.ProjectExplorer")), "Delete");
ui.wait(new ShellShowingCondition("Confirm Project Delete"));
ui.click(new ButtonLocator("&Yes"));
ui.wait(new ShellDisposedCondition("Confirm Project Delete"));
ui.wait(new ShellDisposedCondition("Progress Information"));
ui.wait(new ShellShowingCondition("Deleting resources"));
ui.wait(new ShellDisposedCondition("Deleting resources"));
}

}
--------------------------------------------

The complete error message is:

Exception in thread "DefaultQuartzScheduler_QuartzSchedulerThread" java.lang.OutOfMemoryError: PermGen space
java.lang.OutOfMemoryError: PermGen space
Exception in thread "WT Test Thread" java.lang.OutOfMemoryError: PermGen space
Exception in thread "WorkbenchTestable" org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.OutOfMemoryError: PermGen space)
java.lang.OutOfMemoryError: PermGen space
Exception in thread "ShutdownHook" java.lang.OutOfMemoryError: PermGen space
Exception in thread "Thread-3" java.lang.OutOfMemoryError: PermGen space

I have tried boosting my numbers in the RecordDialogue->Arguments->VM Argument field but I always get the same OutofMemoryError.
-XX:PermSize=256M
-XX:MaxPermSize=256M
-Xms40m
-Xmx512m

Could you clue me as to where the bug is and if there is any way to get around it?

Thanks,
Edward
Last edited by EDWARD BOLLES on Thu Jun 26, 2008 9:12 am, edited 1 time in total.
EDWARD BOLLES
 
Posts: 7
Joined: Tue Jun 17, 2008 9:02 am

Re: java.lang.OutOfMemoryError: PermGen space

Postby Phil Quitslund » Fri Jun 20, 2008 12:38 pm

Boosting memory, as you tried, is the way to go. I think you'll want to do it in the launch configuration for the test itself ("simulateScript"). If this does not remedy the problem, please send a bug report to support: wintest-support@instantiations.com.

Thanks!
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am


Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest