[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nedit-develop
Subject:    [ nedit-Bugs-1578869 ] NEdit crashed on window close
From:       "SourceForge.net" <noreply () sourceforge ! net>
Date:       2006-10-29 22:22:37
Message-ID: E1GeJ37-0003kM-Fm () sc8-sf-web4 ! sourceforge ! net
[Download RAW message or body]

Bugs item #1578869, was opened at 2006-10-17 13:40
Message generated for change (Comment added) made by edg
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=111005&aid=1578869&group_id=11005

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Program
>Group: release
>Status: Closed
>Resolution: Fixed
Priority: 6
Private: No
Submitted By: Thorsten Haude (yooden)
>Assigned to: Eddy De Greef (edg)
Summary: NEdit crashed on window close

Initial Comment:
>From a thread starting here:
http://www.nedit.org/pipermail/develop/2006-October/012649.html

>I just got a freezing NEdit:
>#0  0x08067af1 in WidgetToWindow (w=0x852c0d8) at
window.c:2037
>#1  0x0806bc91 in GetTopDocument (w=0x89) at window.c:4112
>#2  0x0806bcb7 in IsTopDocument (window=0x8514f28) at
window.c:4119
>#3  0x08067c34 in UpdateWindowTitle (window=0x8514f28)
at window.c:2075
>#4  0x0805608c in CheckForChangesToFile
(window=0x8514f28) at file.c:1968
>#5  0x418ee699 in XtCallCallbacks () from
/usr/X11R6/lib/libXt.so.6
>#6  0x419226c7 in _XtMatchAtom () from
/usr/X11R6/lib/libXt.so.6
>#7  0x41922bfb in _XtMatchAtom () from
/usr/X11R6/lib/libXt.so.6
>#8  0x419231f3 in _XtTranslateEvent () from
/usr/X11R6/lib/libXt.so.6
>#9  0x418fb73b in XtDispatchEventToWidget () from
/usr/X11R6/lib/libXt.so.6
>#10 0x418fcc3e in _XtSendFocusEvent () from
/usr/X11R6/lib/libXt.so.6
>#11 0x41904fbf in _XtHandleFocus () from
/usr/X11R6/lib/libXt.so.6
>#12 0x418fb76f in XtDispatchEventToWidget () from
/usr/X11R6/lib/libXt.so.6
>#13 0x418fc11d in _XtOnGrabList () from
/usr/X11R6/lib/libXt.so.6
>#14 0x418fc43f in XtDispatchEvent () from
/usr/X11R6/lib/libXt.so.6
>#15 0x080b897e in ServerDispatchEvent
(event=0x419306b0) at server.c:212
>#16 0x080b8884 in ServerMainLoop (context=0x83a4868)
at server.c:170
>#17 0x0805178b in main (argc=2, argv=0xbffff6e4) at
nedit.c:785
>
>It was busy removing some directories where NEdit had
opened
>documents, and closed two of them. A second late I
look back and NEdit
>was frozen solid with all of the CPU it could get. Now
CPU usage is
>back to normal, but NEdit is still frozen.

I'm guessing that the following has happened (in this
order):

  - You deleted a file.
  - You closed the matching window.
  - A focus change event arrived late (asynchronously)
after some
    of the widgets were destroyed already.
  - The CheckForChangesToFile callback is unaware of
the ongoing
    destructions and (indirectly) calls WidgetToWindow.
  - WidgetToWindow tries to climb the widget hierarchy
to find
    the top widget, but because some of the structures have
    been destroyed it accesses garbage and it ends up in an
    endless loop. It could have crashed equally well.

I've seen similar things before, but they are almost
impossible to
reproduce (timing is crucial). Most probably, it's our
fault, and not a
bug in X, but I have no idea what is wrong exactly or
how you could
safely detect/avoid accesses to destroyed widgets.


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

>Comment By: Eddy De Greef (edg)
Date: 2006-10-29 23:22

Message:
Logged In: YES 
user_id=73597

My earlier analysis was wrong.

The problem was that, if the user closed the window while a
"File modified externally" dialog was up, we still tried to
update the title of the (destroyed) window. It's now fixed
in CVS.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=111005&aid=1578869&group_id=11005
-- 
NEdit Develop mailing list - Develop@nedit.org
http://www.nedit.org/mailman/listinfo/develop
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic