Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » endless loop when moving figure outside of display area
endless loop when moving figure outside of display area [message #178817] Fri, 22 April 2005 17:16 Go to next message
Eclipse UserFriend
Originally posted by: christian.sell.netcologne.de

Hello,

I have a graphical editor developed on top of GEF 3.1M6. I just
discovered that when I slowly drag a figure outside of the displayed
editor area, at a certain point the app goes into an endless loop and
completely locks up. Prior to this, I see the scrollbar becoming very
small very fast, as if the figure was moving way beyond the display area.

I ran the app in the debugger and suspended it randomly. The main thread
seems to be looping around calls to revalidate() to different figures in
the GEF-internal hierarchy. Heres the stack:

Thread [main] (Suspended)
ArrayList.indexOf(Object) line: 220
ArrayList.contains(Object) line: 201
DeferredUpdateManager.addInvalidFigure(IFigure) line: 115
LightweightSystem$RootFigure(Figure).revalidate() line: 1351
FreeformViewport(Figure).revalidate() line: 1353
FreeformLayeredPane(Figure).revalidate() line: 1353
FreeformLayer(Figure).revalidate() line: 1353
ResizeHandle(Figure).revalidate() line: 1353
ResizeHandle(AbstractHandle).ancestorMoved(IFigure) line: 84
AncestorHelper.fireAncestorMoved(IFigure) line: 107
AncestorHelper.figureMoved(IFigure) line: 98
FreeformLayeredPane(Figure).fireFigureMoved() line: 461
FreeformLayeredPane(Figure).setBounds(Rectangle) line: 1403
FreeformHelper.setFreeformBounds(Rectangle) line: 86
FreeformLayeredPane.setFreeformBounds(Rectangle) line: 106
FreeformViewport.readjustScrollBars() line: 78
FreeformViewport(Viewport).validate() line: 364
LightweightSystem$RootFigure(Figure).validate() line: 1738
DeferredUpdateManager.validateFigures() line: 271
DeferredUpdateManager.performUpdate() line: 143
DeferredUpdateManager$UpdateRequest.run() line: 40
RunnableLock.run() line: 35
UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 118
Display.runAsyncMessages(boolean) line: 2755
Display.readAndDispatch() line: 2475
Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 1570
Workbench.runUI() line: 1534
Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line:


can anybody help me with debugging this? I tried to reproduce it with
other similar apps, but without success. It must be somewhere with mine,
but I am rather clueless at the moment.

thanks,
chris
Re: endless loop when moving figure outside of display area [message #178837 is a reply to message #178817] Fri, 22 April 2005 18:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: christian.sell.netcologne.de

ok, never mind, i found the culprit. A simple equals() check in the move
command did the trick.

Christian Sell wrote:
> Hello,
>
> I have a graphical editor developed on top of GEF 3.1M6. I just
> discovered that when I slowly drag a figure outside of the displayed
> editor area, at a certain point the app goes into an endless loop and
> completely locks up. Prior to this, I see the scrollbar becoming very
> small very fast, as if the figure was moving way beyond the display area.
>
> I ran the app in the debugger and suspended it randomly. The main thread
> seems to be looping around calls to revalidate() to different figures in
> the GEF-internal hierarchy. Heres the stack:
>
> Thread [main] (Suspended)
> ArrayList.indexOf(Object) line: 220
> ArrayList.contains(Object) line: 201
> DeferredUpdateManager.addInvalidFigure(IFigure) line: 115
> LightweightSystem$RootFigure(Figure).revalidate() line: 1351
> FreeformViewport(Figure).revalidate() line: 1353
> FreeformLayeredPane(Figure).revalidate() line: 1353
> FreeformLayer(Figure).revalidate() line: 1353
> ResizeHandle(Figure).revalidate() line: 1353
> ResizeHandle(AbstractHandle).ancestorMoved(IFigure) line: 84
> AncestorHelper.fireAncestorMoved(IFigure) line: 107
> AncestorHelper.figureMoved(IFigure) line: 98
> FreeformLayeredPane(Figure).fireFigureMoved() line: 461
> FreeformLayeredPane(Figure).setBounds(Rectangle) line: 1403
> FreeformHelper.setFreeformBounds(Rectangle) line: 86
> FreeformLayeredPane.setFreeformBounds(Rectangle) line: 106
> FreeformViewport.readjustScrollBars() line: 78
> FreeformViewport(Viewport).validate() line: 364
> LightweightSystem$RootFigure(Figure).validate() line: 1738
> DeferredUpdateManager.validateFigures() line: 271
> DeferredUpdateManager.performUpdate() line: 143
> DeferredUpdateManager$UpdateRequest.run() line: 40
> RunnableLock.run() line: 35
> UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 118
> Display.runAsyncMessages(boolean) line: 2755
> Display.readAndDispatch() line: 2475
> Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 1570
> Workbench.runUI() line: 1534
> Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line:
>
>
> can anybody help me with debugging this? I tried to reproduce it with
> other similar apps, but without success. It must be somewhere with mine,
> but I am rather clueless at the moment.
>
> thanks,
> chris
rejoiced too early - still happens [message #178885 is a reply to message #178837] Sat, 23 April 2005 15:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: christian.sell.netcologne.de

unfortunately, I was too optimistic. The problem still appears. When I
drag a figure across the border of the display area, the diagram srcolls
to the side very fast. As soon as I release the figure, the IDE locks up..

Christian Sell schrieb:
> ok, never mind, i found the culprit. A simple equals() check in the move
> command did the trick.
>
> Christian Sell wrote:
>
>> Hello,
>>
>> I have a graphical editor developed on top of GEF 3.1M6. I just
>> discovered that when I slowly drag a figure outside of the displayed
>> editor area, at a certain point the app goes into an endless loop and
>> completely locks up. Prior to this, I see the scrollbar becoming very
>> small very fast, as if the figure was moving way beyond the display area.
>>
>> I ran the app in the debugger and suspended it randomly. The main
>> thread seems to be looping around calls to revalidate() to different
>> figures in the GEF-internal hierarchy. Heres the stack:
>>
>> Thread [main] (Suspended)
>> ArrayList.indexOf(Object) line: 220
>> ArrayList.contains(Object) line: 201
>> DeferredUpdateManager.addInvalidFigure(IFigure) line: 115
>> LightweightSystem$RootFigure(Figure).revalidate() line: 1351
>> FreeformViewport(Figure).revalidate() line: 1353
>> FreeformLayeredPane(Figure).revalidate() line: 1353
>> FreeformLayer(Figure).revalidate() line: 1353
>> ResizeHandle(Figure).revalidate() line: 1353
>> ResizeHandle(AbstractHandle).ancestorMoved(IFigure) line: 84
>> AncestorHelper.fireAncestorMoved(IFigure) line: 107
>> AncestorHelper.figureMoved(IFigure) line: 98
>> FreeformLayeredPane(Figure).fireFigureMoved() line: 461
>> FreeformLayeredPane(Figure).setBounds(Rectangle) line: 1403
>> FreeformHelper.setFreeformBounds(Rectangle) line: 86
>> FreeformLayeredPane.setFreeformBounds(Rectangle) line: 106
>> FreeformViewport.readjustScrollBars() line: 78
>> FreeformViewport(Viewport).validate() line: 364
>> LightweightSystem$RootFigure(Figure).validate() line: 1738
>> DeferredUpdateManager.validateFigures() line: 271
>> DeferredUpdateManager.performUpdate() line: 143
>> DeferredUpdateManager$UpdateRequest.run() line: 40
>> RunnableLock.run() line: 35
>> UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 118
>> Display.runAsyncMessages(boolean) line: 2755
>> Display.readAndDispatch() line: 2475
>> Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 1570
>> Workbench.runUI() line: 1534
>> Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line:
>>
>>
>> can anybody help me with debugging this? I tried to reproduce it with
>> other similar apps, but without success. It must be somewhere with
>> mine, but I am rather clueless at the moment.
>>
>> thanks,
>> chris
more details [message #178895 is a reply to message #178885] Sat, 23 April 2005 17:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: christian.sell.netcologne.de

Hello

heres a few more findings, in the hope that someone will point me to the
problem:

- the phenomenon only seems to be happening when a figure is moved to a
negative x or y location, i.e. beyond the left or top border of the
diagram area.
- as soon as the mouse pointer touches a certain threshhold, the
movement of the viewport starts. This is the same on all borders (and
expected behavior), but with a negative location it becomes extremely
fast, the scrollbar size decreses very quickly.
- as soon as the (negative) location is set on the figure, the IDE locks up
- if I disable setting of the location (canExecute returns false for
negative locations), the move is undone automatically but takes place
rather slow, as if a movie was played backwards

chris
Re: more details [message #178921 is a reply to message #178895] Sun, 24 April 2005 16:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

You are probably mixing things that shouldn't be mixed. For example, if you
are using the Freeform root editpart, you must use freeformXxxx everywhere,
including hte layout manager.

Put a breakpoint in DeferredUpdateManager.addInvalidFigure once the infinite
loop has started.

"Christian Sell" <christian.sell@netcologne.de> wrote in message
news:d4e09k$2n6$1@news.eclipse.org...
> Hello
>
> heres a few more findings, in the hope that someone will point me to the
> problem:
>
> - the phenomenon only seems to be happening when a figure is moved to a
> negative x or y location, i.e. beyond the left or top border of the
> diagram area.
> - as soon as the mouse pointer touches a certain threshhold, the movement
> of the viewport starts. This is the same on all borders (and expected
> behavior), but with a negative location it becomes extremely fast, the
> scrollbar size decreses very quickly.
> - as soon as the (negative) location is set on the figure, the IDE locks
> up
> - if I disable setting of the location (canExecute returns false for
> negative locations), the move is undone automatically but takes place
> rather slow, as if a movie was played backwards
>
> chris
Re: more details [message #178936 is a reply to message #178921] Sun, 24 April 2005 20:13 Go to previous message
Eclipse UserFriend
Originally posted by: christian.sell.netcologne.de

wow, I think that did it. I was using XYLayout instead of
FreeformLayout. Small cause large consequence.

thanks
chris

Randy Hudson wrote:
> You are probably mixing things that shouldn't be mixed. For example, if you
> are using the Freeform root editpart, you must use freeformXxxx everywhere,
> including hte layout manager.
>
> Put a breakpoint in DeferredUpdateManager.addInvalidFigure once the infinite
> loop has started.
>
> "Christian Sell" <christian.sell@netcologne.de> wrote in message
> news:d4e09k$2n6$1@news.eclipse.org...
>
>>Hello
>>
>>heres a few more findings, in the hope that someone will point me to the
>>problem:
>>
>>- the phenomenon only seems to be happening when a figure is moved to a
>>negative x or y location, i.e. beyond the left or top border of the
>>diagram area.
>>- as soon as the mouse pointer touches a certain threshhold, the movement
>>of the viewport starts. This is the same on all borders (and expected
>>behavior), but with a negative location it becomes extremely fast, the
>>scrollbar size decreses very quickly.
>>- as soon as the (negative) location is set on the figure, the IDE locks
>>up
>>- if I disable setting of the location (canExecute returns false for
>>negative locations), the move is undone automatically but takes place
>>rather slow, as if a movie was played backwards
>>
>>chris
>
>
>
Previous Topic:Infinite Loop using ShortestPathConnectionRouter
Next Topic:EMF/GEF IBM redbook tutorial updated for eclipse 3+ ?
Goto Forum:
  


Current Time: Wed Feb 08 08:37:26 GMT 2023

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

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

Back to the top