Patch for E++ crash when collapsing folders in treeview

Discuss development issues and submit patches here
Post Reply
ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Patch for E++ crash when collapsing folders in treeview

Post by ajs »

Hi David,
this patch fixes a situation which used to crash E++.

E++ used to crash in "void CMyTreeView::EraseItems(HTREEITEM hParent)" at line
CoTaskMemFree((LPVOID)pItemInfo->pridl);
because the pridl was not initialized. The problem could be easily reproduce by
creating and renaming folder in a way that swap folder orders in the tree
(for example creating folder B, expanding the tree to show B, creating C and then changing the name of folder C to A.
Then clicking on the "-" beside the parent folder, which collapses the tree and
invoke "CMyTreeView::EraseItems".
So we need to initialize the relative pidl as well, to avoid crashing E++
Previous patch file was incorrect. Attachment updated
Patch against commit 156, including all previous not yet committed patches.
Attachments
patch_05__v156.zip
(36.03 KiB) Downloaded 504 times
David Erceg
Site Admin
Posts: 936
Joined: Sat Apr 18, 2009 1:46 am

Re: Patch for E++ crash when collapsing folders in treeview

Post by David Erceg »

Hi Michael,

I know it might be a bit more work, but could you keep each of the patches separate? It should make it easier for me to check that the patch is correct, and allow me to commit them out of order (provided they don't rely on each other). If two patches do rely on each other, feel free to merge them into one, and I'll check them as a single unit.

If you could upload a patch that includes only the changes for this specific issue, that would be great.

Thanks
ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Patch for E++ crash when collapsing folders in treeview

Post by ajs »

David Erceg wrote:Hi Michael,
I know it might be a bit more work, but could you keep each of the patches separate? It should make it easier for me to check that the patch is correct, and allow me to commit them out of order (provided they don't rely on each other). If two patches do rely on each other, feel free to merge them into one, and I'll check them as a single unit.
If you could upload a patch that includes only the changes for this specific issue, that would be great.
Thanks
Ok David, I see your point. Today when I have some time, I will start reviewing the pending patches and re-upload them as separate ones against the last commit. I hope I can update all of them in just a couple of days.
ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Patch for E++ crash when collapsing folders in treeview

Post by ajs »

Updated patch against commit 159.
This patch includes only the changes for this function, without any another change made.
Attachments
patch_05__v159.7z
(778 Bytes) Downloaded 527 times
David Erceg
Site Admin
Posts: 936
Joined: Sat Apr 18, 2009 1:46 am

Re: Patch for E++ crash when collapsing folders in treeview

Post by David Erceg »

Thanks for taking the time to split them up, it's appreciated. This patch has been committed.
Post Reply