0.708 crashes when closing a hub

Bug #262540 reported by maksis
2
Affects Status Importance Assigned to Milestone
DC++
Fix Released
High
Unassigned

Bug Description

OS Vista x64

For example close the hub basement.s-mnet.org:20715 just after it has started downloading the userlist. Crashes every time I try it. Happens only if I right-click the hub name and close the hub, not when using Ctrl+F4.

Revision history for this message
maksis (maksis) wrote :

Happens for me only if i connect the hub from the hublist but a XP user also confirmed the crash when he connected the hub via quick connect.

Revision history for this message
eMTee (realprogger) wrote :

Crashes in both ways for me...

Changed in dcplusplus:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Pietry (pietry) wrote :

Confirmed here too . Couldn't get any stack info unfortunately.
(gdb) bt
#0 0x7d64d233 in ?? ()
#1 0x00000001 in ?? ()
#2 0x00000000 in ?? ()

Tried 3 times and same thing...

Also, it does not happen everytime, it seems that only after 400-600 users have been loaded. I believe its something in particular with some user's information...

Revision history for this message
poy (poy) wrote :

the problem i think is that async calls don't know that the hub window is closed and still try to run after it is closed.

the crash is easier to reproduce with the right-click menu because no async call runs while the menu is opened; they wait for it to close, and then run in an empty context because the hub window has already been closed from the menu.

Revision history for this message
poy (poy) wrote :

this patch makes every asynchronous callback dependent on a window handle; when the call is about to run, it makes sure that the window still exists before running. it solves this kind of "window-closed-from-a-menu" crashes (tested), and also probably those other crashes - like bug 261618 - reported when DC++ is under a heavy load (not tested).

i only included the dwt/ changes for readability.

Revision history for this message
poy (poy) wrote :
Revision history for this message
eMTee (realprogger) wrote :

Unfortunately it does not solve https://bugs.launchpad.net/bugs/261618 ...

Revision history for this message
vespasian (rousseau-o2) wrote :

I have similar problem dc crashes when closing a hub tab
in Application Event log there is an information that module which make a error is ntdll.dll, version 5.1.2600.5512, adress 0x0001b1fa.

Revision history for this message
Jota.Ce (psidtg) wrote :

I had several crashes when finishing DC++ v0.708 (XP SP3), but i don't know if that fact could be linked to this thread...

Revision history for this message
Jacek Sieka (arnetheduck) wrote :

poy, while the patch might make sense (I'm not totally convinced since the hwnd handle might be reused before the async call is done - maybe at least, I'm not sure how windows handles this...) I make dwt aware of the handle check but make a decorator function which checks the hwnd and then calls the callback if it's ok. More flexible and doesn't encumber the list with the hwnd...

the cleanest solution would be to use some sort of smart pointer for widgets so that they wouldn't die until all stuff has been processed but that needs careful studying...

poy (poy)
Changed in dcplusplus:
status: Confirmed → Fix Committed
Revision history for this message
LillaLilly (anjalivija) wrote :

DC++ v0.708 crashes on my XP SP3 when I try to close all inactive windows.

Pietry (pietry)
Changed in dcplusplus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.