Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Problem in Progress Bar
Problem in Progress Bar [message #75545] Tue, 26 February 2008 11:44 Go to next message
Eclipse UserFriend
Originally posted by: cheney_chen.i-len.com

hi,
Some problem in RAP Demo Progress Bar.
Steps to reproduce:
1. Download the RAP Demo from CVS.
2. Launch the RAP Demo and Switch to Planning Perspective.
3. Click the "Start Job With Dialog" action,When the Progress Bar is
running(the percent of the task isn't complete),refresh the Browser then
relaunch the application.
4. Switch to the eclipse,in eclipse console view,you can see the Exception
information:
osgi> Feb 26, 2008 7:33:43 PM org.mortbay.http.HttpServer doStart
INFO: Version Jetty/5.1.x
Feb 26, 2008 7:33:44 PM org.mortbay.util.Container start
INFO: Started org.mortbay.jetty.servlet.ServletHandler@1b49105b
Feb 26, 2008 7:33:44 PM org.mortbay.util.Container start
INFO: Started HttpContext[/,/]
Feb 26, 2008 7:33:44 PM org.mortbay.http.SocketListener start
INFO: Started SocketListener on 0.0.0.0:40066
Feb 26, 2008 7:33:44 PM org.mortbay.util.Container start
INFO: Started org.mortbay.http.HttpServer@580eac5a
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:1553)
at org.eclipse.swt.SWT.error(SWT.java:1473)
at org.eclipse.swt.SWT.error(SWT.java:1444)
at org.eclipse.swt.widgets.Widget.error(Widget.java:767)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:710)
at org.eclipse.swt.widgets.ProgressBar.getSelection(ProgressBar .java:151)
at
org.eclipse.jface.dialogs.ProgressIndicator.worked(ProgressI ndicator.java:119)
at
org.eclipse.jface.dialogs.ProgressIndicator.sendRemainingWor k(ProgressIndicator.java:100)
at
org.eclipse.jface.dialogs.ProgressMonitorDialog$ProgressMoni tor.done(ProgressMonitorDialog.java:182)
at
org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog$4 .done(ProgressMonitorJobsDialog.java:361)
at
org.eclipse.ui.internal.progress.ProgressMonitorFocusJobDial og$8.run(ProgressMonitorFocusJobDialog.java:244)
at
org.eclipse.ui.internal.progress.ProgressMonitorFocusJobDial og$10.run(ProgressMonitorFocusJobDialog.java:319)
at
org.eclipse.rwt.internal.lifecycle.UICallBackManager$Runnabl eBase.run(UICallBackManager.java:51)
at
org.eclipse.rwt.internal.lifecycle.UICallBackManager.process RunnablesInUIThread(UICallBackManager.java:157)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.afterPhaseEx ecution(RWTLifeCycle.java:369)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.continueLife Cycle(RWTLifeCycle.java:183)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.sleep(RWTLif eCycle.java:269)
at org.eclipse.swt.widgets.Display.sleep(Display.java:703)
at
org.eclipse.ui.application.WorkbenchAdvisor.eventLoopIdle(Wo rkbenchAdvisor.java:356)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2311)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2273)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:372)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:153)
at org.eclipse.rap.demo.DemoWorkbench.createUI(DemoWorkbench.ja va:24)
at
org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPointManager.java:92)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.java:212)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(RWTLifeCycle.java:109)
at java.lang.Thread.run(Thread.java:595)

is it a bug?How to fix it?

thanks a lot,
        cheney
Re: Problem in Progress Bar [message #75619 is a reply to message #75545] Tue, 26 February 2008 21:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

seems as if the thread survives the session restart, which is in
principle nothing we can do about. There's no way to cancel a thread if
there's no build in check by the application code. So if a background
thread is associated with a session a robust implementation should check
whether the session has been expired and terminate itself in that case.
The demo doesn't have such a build in check.

On the other hand it seems as the background thread is still able to
call Display#asyncExcec or Display#syncExec even if the display has been
already disposed of. This should not be possible, since the problem
kills the proper execution of the UIThread of the newly initialzed
session. So from that point of view it's a bug in terms of robustness.
The background thread that tries to add the runnable into the new
session should retrieve the exception not the UIThread.

I filed a bug (#220467) using your problem description. Thx!


Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: Cheney Chen [mailto:cheney_chen@i-len.com]
Bereitgestellt: Dienstag, 26. Februar 2008 12:45
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: Problem in Progress Bar
Betreff: Problem in Progress Bar


hi,
Some problem in RAP Demo Progress Bar.
Steps to reproduce:
1. Download the RAP Demo from CVS.
2. Launch the RAP Demo and Switch to Planning Perspective.
3. Click the "Start Job With Dialog" action,When the Progress
Bar is running(the percent of the task isn't complete),refresh the
Browser then relaunch the application.
4. Switch to the eclipse,in eclipse console view,you can see the
Exception
information:
osgi> Feb 26, 2008 7:33:43 PM org.mortbay.http.HttpServer
doStart
INFO: Version Jetty/5.1.x
Feb 26, 2008 7:33:44 PM org.mortbay.util.Container start
INFO: Started org.mortbay.jetty.servlet.ServletHandler@1b49105b
Feb 26, 2008 7:33:44 PM org.mortbay.util.Container start
INFO: Started HttpContext[/,/]
Feb 26, 2008 7:33:44 PM org.mortbay.http.SocketListener start
INFO: Started SocketListener on 0.0.0.0:40066
Feb 26, 2008 7:33:44 PM org.mortbay.util.Container start
INFO: Started org.mortbay.http.HttpServer@580eac5a
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:1553)
at org.eclipse.swt.SWT.error(SWT.java:1473)
at org.eclipse.swt.SWT.error(SWT.java:1444)
at org.eclipse.swt.widgets.Widget.error(Widget.java:767)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:710)
at
org.eclipse.swt.widgets.ProgressBar.getSelection(ProgressBar .java:151)
at
org.eclipse.jface.dialogs.ProgressIndicator.worked(ProgressI ndicator.jav
a:119)
at
org.eclipse.jface.dialogs.ProgressIndicator.sendRemainingWor k(ProgressIn
dicator.java:100)
at
org.eclipse.jface.dialogs.ProgressMonitorDialog$ProgressMoni tor.done(Pro
gressMonitorDialog.java:182)
at
org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog$4 .done(Progre
ssMonitorJobsDialog.java:361)
at
org.eclipse.ui.internal.progress.ProgressMonitorFocusJobDial og$8.run(Pro
gressMonitorFocusJobDialog.java:244)
at
org.eclipse.ui.internal.progress.ProgressMonitorFocusJobDial og$10.run(Pr
ogressMonitorFocusJobDialog.java:319)
at
org.eclipse.rwt.internal.lifecycle.UICallBackManager$Runnabl eBase.run(UI
CallBackManager.java:51)
at
org.eclipse.rwt.internal.lifecycle.UICallBackManager.process RunnablesInU
IThread(UICallBackManager.java:157)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.afterPhaseEx ecution(RWTL
ifeCycle.java:369)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.continueLife Cycle(RWTLif
eCycle.java:183)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.sleep(RWTLif eCycle.java:
269)
at org.eclipse.swt.widgets.Display.sleep(Display.java:703)
at
org.eclipse.ui.application.WorkbenchAdvisor.eventLoopIdle(Wo rkbenchAdvis
or.java:356)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2311)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2273)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:3
72)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:153)
at
org.eclipse.rap.demo.DemoWorkbench.createUI(DemoWorkbench.ja va:24)
at
org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPoint
Manager.java:92)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.ja
va:212)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(R
WTLifeCycle.java:109)
at java.lang.Thread.run(Thread.java:595)

is it a bug?How to fix it?

thanks a lot,
        cheney
Re: Problem in Progress Bar [message #75829 is a reply to message #75619] Wed, 27 February 2008 10:25 Go to previous message
Eclipse UserFriend
Originally posted by: cheney_chen.i-len.com

Hi,

Thank you for your answer.
Frank Appel wrote:

> Hi,
>
> seems as if the thread survives the session restart, which is in
> principle nothing we can do about. There's no way to cancel a thread if
> there's no build in check by the application code. So if a background
> thread is associated with a session a robust implementation should check
> whether the session has been expired and terminate itself in that case.
> The demo doesn't have such a build in check.
As I know there have SessionStoreListener class in RAP,so we can do
something before the session is destroy.Then it is possible to destroy the
backgroud thread is associated with a session before the session is
destroy,or we need do this by myself?

>
> On the other hand it seems as the background thread is still able to
> call Display#asyncExcec or Display#syncExec even if the display has been
> already disposed of. This should not be possible, since the problem
> kills the proper execution of the UIThread of the newly initialzed
> session. So from that point of view it's a bug in terms of robustness.
> The background thread that tries to add the runnable into the new
> session should retrieve the exception not the UIThread.
>
> I filed a bug (#220467) using your problem description. Thx!
>
>
> Ciao
> Frank
>
> -----Ursprüngliche Nachricht-----
> Von: Cheney Chen [mailto:cheney_chen@i-len.com]
> Bereitgestellt: Dienstag, 26. Februar 2008 12:45
> Bereitgestellt in: eclipse.technology.rap
> Unterhaltung: Problem in Progress Bar
> Betreff: Problem in Progress Bar
>
>
> hi,
> Some problem in RAP Demo Progress Bar.
> Steps to reproduce:
> 1. Download the RAP Demo from CVS.
> 2. Launch the RAP Demo and Switch to Planning Perspective.
> 3. Click the "Start Job With Dialog" action,When the Progress
> Bar is running(the percent of the task isn't complete),refresh the
> Browser then relaunch the application.
> 4. Switch to the eclipse,in eclipse console view,you can see the
> Exception
> information:
> osgi> Feb 26, 2008 7:33:43 PM org.mortbay.http.HttpServer
> doStart
> INFO: Version Jetty/5.1.x
> Feb 26, 2008 7:33:44 PM org.mortbay.util.Container start
> INFO: Started org.mortbay.jetty.servlet.ServletHandler@1b49105b
> Feb 26, 2008 7:33:44 PM org.mortbay.util.Container start
> INFO: Started HttpContext[/,/]
> Feb 26, 2008 7:33:44 PM org.mortbay.http.SocketListener start
> INFO: Started SocketListener on 0.0.0.0:40066
> Feb 26, 2008 7:33:44 PM org.mortbay.util.Container start
> INFO: Started org.mortbay.http.HttpServer@580eac5a
> org.eclipse.swt.SWTException: Invalid thread access
> at org.eclipse.swt.SWT.error(SWT.java:1553)
> at org.eclipse.swt.SWT.error(SWT.java:1473)
> at org.eclipse.swt.SWT.error(SWT.java:1444)
> at org.eclipse.swt.widgets.Widget.error(Widget.java:767)
> at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:710)
> at
> org.eclipse.swt.widgets.ProgressBar.getSelection(ProgressBar .java:151)
> at
> org.eclipse.jface.dialogs.ProgressIndicator.worked(ProgressI ndicator.jav
> a:119)
> at
> org.eclipse.jface.dialogs.ProgressIndicator.sendRemainingWor k(ProgressIn
> dicator.java:100)
> at
> org.eclipse.jface.dialogs.ProgressMonitorDialog$ProgressMoni tor.done(Pro
> gressMonitorDialog.java:182)
> at
> org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog$4 .done(Progre
> ssMonitorJobsDialog.java:361)
> at
> org.eclipse.ui.internal.progress.ProgressMonitorFocusJobDial og$8.run(Pro
> gressMonitorFocusJobDialog.java:244)
> at
> org.eclipse.ui.internal.progress.ProgressMonitorFocusJobDial og$10.run(Pr
> ogressMonitorFocusJobDialog.java:319)
> at
> org.eclipse.rwt.internal.lifecycle.UICallBackManager$Runnabl eBase.run(UI
> CallBackManager.java:51)
> at
> org.eclipse.rwt.internal.lifecycle.UICallBackManager.process RunnablesInU
> IThread(UICallBackManager.java:157)
> at
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.afterPhaseEx ecution(RWTL
> ifeCycle.java:369)
> at
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.continueLife Cycle(RWTLif
> eCycle.java:183)
> at
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.sleep(RWTLif eCycle.java:
> 269)
> at org.eclipse.swt.widgets.Display.sleep(Display.java:703)
> at
> org.eclipse.ui.application.WorkbenchAdvisor.eventLoopIdle(Wo rkbenchAdvis
> or.java:356)
> at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2311)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2273)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:3
> 72)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:153)
> at
> org.eclipse.rap.demo.DemoWorkbench.createUI(DemoWorkbench.ja va:24)
> at
> org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPoint
> Manager.java:92)
> at
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.ja
> va:212)
> at
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(R
> WTLifeCycle.java:109)
> at java.lang.Thread.run(Thread.java:595)
>
> is it a bug?How to fix it?
>
> thanks a lot,
> cheney
Previous Topic:loader constraint violation on Tomcat
Next Topic:Drag and Drop support - JFACE LocalSelectionTransfer
Goto Forum:
  


Current Time: Sat Apr 20 00:30:58 GMT 2024

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

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

Back to the top