Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Exception at dispose shell
Exception at dispose shell [message #134169] Wed, 27 May 2009 03:59 Go to next message
Eclipse UserFriend
Hello,

I get an java.lang.StackOverflowError when I close my shell. I have the
following code snippet for this close event.

mainShell.addShellListener(new ShellAdapter() {

public void shellClosed(ShellEvent e) {
resultList = null;
mainShell.dispose();
}

public void shellDeactivated(ShellEvent e) {
resultList = null;
mainShell.dispose();
}
});

The error is in methode shellClosed at line mainShell.dispose().
Where is the error in my code?

Thanks,
kristin
Re: Exception at dispose shell [message #134196 is a reply to message #134169] Wed, 27 May 2009 05:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: benjamin.wolff.web.de

Hi Kristin,


just a wild guess: the dispose() method calls the shellClosed() method of the listener, thus you end up in an endless loop.
maybe you could use a simple boolean variable isClosed to avout calling the dispose() method for a second time...


HTH,
ben



Kristin Polenz schrieb:
> Hello,
>
> I get an java.lang.StackOverflowError when I close my shell. I have the
> following code snippet for this close event.
>
> mainShell.addShellListener(new ShellAdapter() {
>
> public void shellClosed(ShellEvent e) {
> resultList = null;
> mainShell.dispose();
> }
> public void shellDeactivated(ShellEvent e) {
> resultList = null;
> mainShell.dispose();
> }
> });
>
> The error is in methode shellClosed at line mainShell.dispose(). Where
> is the error in my code?
> Thanks,
> kristin
>
>
Re: Exception at dispose shell [message #134209 is a reply to message #134169] Wed, 27 May 2009 05:19 Go to previous message
Eclipse UserFriend
Hi Kristin,

The StackOverflowError might be related to this bug:
229309: StackOverflow when widget disposes of its parent while itself in
dispose
https://bugs.eclipse.org/bugs/show_bug.cgi?id=229309

Anyway, there is no use in disposing of the shell on shellClose. Closing
a shell automatically disposes it. So you can safely remove this call.

Regards, Ralf

> I get an java.lang.StackOverflowError when I close my shell. I have the
> following code snippet for this close event.
>
> mainShell.addShellListener(new ShellAdapter() {
>
> public void shellClosed(ShellEvent e) {
> resultList = null;
> mainShell.dispose();
> }
> public void shellDeactivated(ShellEvent e) {
> resultList = null;
> mainShell.dispose();
> }
> });
>
> The error is in methode shellClosed at line mainShell.dispose(). Where
> is the error in my code?
> Thanks,
> kristin
>
>
Previous Topic:could i build a wiki using RAP?
Next Topic:reference to undefined property this.__registry[$0]
Goto Forum:
  


Current Time: Fri Jul 18 02:08:34 EDT 2025

Powered by FUDForum. Page generated in 0.04337 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top