Patch to fix two crashes of E++

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

Patch to fix two crashes of E++

Post by ajs »

Patch to fix two crashes of E++

This patch fixes the following situations (which could/would make E++ crash)

1) when copying files asynchronously, the pao member of the aoi was not initialized, and when the operation was completed, E++ could/would crash when receiving the WM_APP_COPYOPERATIONFINISHED, trying to do execute this:
paoi->pao->EndOperation(paoi->hr,NULL,paoi->dwEffect);

2) with commit 202, in the CFolderView::DirectoryAltered() function David introduced a bug in incrementing the iterator for going through m_FileSelectionList. The iterator was already incremented in the body of the for loop, without need to increment that in the for condition.
To avoid further mistakes, I changed the for loop into a while loop.

Patch against commit 204.

NOTE for David: my local development tree and a locally compiled commit 204 crashes as described above. For some reasons, a downloaded nightly built executable doesn't. Is there something wrong in the nightly built update/creation script? Have a look.
Attachments
patch_64__v204.7z
(582 Bytes) Downloaded 524 times
PietO
Posts: 35
Joined: Wed Feb 23, 2011 5:04 am

Re: Patch to fix two crashes of E++

Post by PietO »

hope this solves the annoying crash reported in
http://www.explorerplusplus.com/forum/v ... ?f=5&t=782

As "normal" user, i did not realize a difference in asynchronous copy and synchronous copy.
ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Patch to fix two crashes of E++

Post by ajs »

PietO wrote:hope this solves the annoying crash reported in
http://www.explorerplusplus.com/forum/v ... ?f=5&t=782

As "normal" user, i did not realize a difference in asynchronous copy and synchronous copy.
Hi PietO,
the problem described in the link you posted seems exactly the problem I was having. The bug was introduced on March 15 for the records
PietO
Posts: 35
Joined: Wed Feb 23, 2011 5:04 am

Re: Patch to fix two crashes of E++

Post by PietO »

Dear Ajs,

the latest nightly build of 28.3.2011 (commit 207 ??) did NOT resolve the simple reproducable crash after drag/drop From one folder to another on the same partition.

If you need further info, please PM me.
ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Patch to fix two crashes of E++

Post by ajs »

Hi PietO,
as I said, I made a patch for the problem and submitted that, but merging the patch to the development tree is up to David.
Till commit 207 it hasn't been committed yet.
And yes, that bug is VERY annoying.

PS: before I made the fix, I found that if I copy and paste files using the right-click menu (not keyboard shortcut nor drap-n-drop), E++ doesn't crash. If I remember correctly, copy-paste in the right-click menu is handled differently from the other copy-paste operations (basically the action is just invoked) and that is the reason why it didn't crash. I should check the code once again to be 100% sure, but you can take this at 99%.
Till the fix gets committed, just get used to this work-around ;)
David Erceg
Site Admin
Posts: 936
Joined: Sat Apr 18, 2009 1:46 am

Re: Patch to fix two crashes of E++

Post by David Erceg »

Thanks, committed.
Post Reply