levitation / vwkvasdopager

Automatically exported from code.google.com/p/vwkvasdopager
1 stars 0 forks source link

Crash when dismissing the floating toolbar #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Unlocked the taskbar
2. Drag the pager on the desktop to change into a floating toolbar window
3. Close the floating toolbar or drag it back into the taskbar

What is the expected output? What do you see instead?

The floating toolbar should disappear but explorer.exe crashes instead.

What version of the product are you using? On what operating system?

bjasspa version on 32-bit Windows XP

Original issue reported on code.google.com by alexandre.jasmin on 6 Jul 2010 at 11:57

GoogleCodeExporter commented 9 years ago
It seems the deskband implementation of IObjectWithSite::SetSite() doesn't 
manage the site reference count properly. It never calls AddRef() when making a 
copy of the OLE site and when Release() is called the site is probably freed 
too early.

My theory is that that the taskbar try to access the site object internally 
after it has been prematurely released. That would explain why the crash 
happens in an obscure part of explorer.exe.

From the MSDN documentation for IObjectWithSite::SetSite()
http://msdn.microsoft.com/en-us/library/aa768221%28VS.85%29.aspx

“The object should hold the IUnknown pointer, calling AddRef  in doing so. If 
the object already has a site, it should first call pUnkSite->AddRef  to secure 
the new site, call IUnknown::Release on the existing site, and then save 
pUnkSite.”

Attaching a patch that implement the behavior described on MSDN.

Another solution would be to manage the site pointer using an ATL smart pointer.

Original comment by alexandre.jasmin on 7 Jul 2010 at 3:28

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry previous patch had incoherent indentation style.

Why is the deskband dll source indented with tabs and the VirtuaWin module 
indented with spaces?

Original comment by alexandre.jasmin on 7 Jul 2010 at 3:38

Attachments:

GoogleCodeExporter commented 9 years ago
patch is applied
closing the issue

Original comment by kvasdo...@gmail.com on 17 Jul 2010 at 2:28