Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Exception at dispose shell
Exception at dispose shell [message #134169] Wed, 27 May 2009 07:59 Go to next message
No real name is currently offline No real nameFriend
Messages: 38
Registered: July 2009
Member
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 09: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 09:19 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

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: Tue Dec 07 19:35:28 GMT 2021

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

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

Back to the top