Explorer++ 1.4
It’s now been just over 6 years since the last stable release of Explorer++. In that time, there have been a significant number of changes to the code, though no new releases.
The reason for that is the bookmarks system, which I first started rewriting in 2011. That work is still in progress at the moment and is holding up any future release. I think the functionality is mostly there, but there are still some key parts that are missing. Once it’s done, the next release can go ahead and any future releases should be a lot quicker.
In this post, I’ll cover some of the important changes that have been made since version 1.3.5.
Fixing the column retrieval code
In Explorer++, column results are retrieved in a background thread. That stops the application from hanging while data is being retrieved. However, the code to do that had a number of issues with thread safety. In simple terms, it wasn’t thread safe at all. It was trivial to crash the application just by changing folders while results were being retrieved.
In the updated implementation, that’s no longer a problem. The column results are retrieved in a way that means that directory changes have no effect on the process.
The same thing also applies to the retrieval of file icons and thumbnails.
Some of the newer features of C++ (e.g. std::future
) were quite helpful in implementing this set of changes. If you’re interested in some of the technical points, see this commit, for example, which explains some of the previous issues and how they’ve been fixed.
To me, this is a fairly major improvement and one that should help cut down the crashes that people sometimes see.
Fixing a crash that occurred when right-clicking in Windows 10
This is something that’s been frequently reported by users. It’s due to an interaction with the OneDrive shell extension. Ultimately, I’m not sure why it causes a crash, but as a workaround, Explorer++ won’t load the extension, which stops the crash from occurring.
Removing support for Windows XP
This one had been a long time coming. Unfortunately, supporting older versions of Windows has a number of costs associated with it.
For example, it makes it hard to use API methods introduced in newer versions of Windows. While it is technically possible to use newer API methods on newer versions of Windows, it’s more complex than I would like and it can mean that you have to maintain two implementations - one for older versions of Windows and one for newer versions.
For that reason, I avoided using any API methods introduced since Windows XP was released. Dropping support for it means that it’s now possible to easily use methods that were introduced with Windows Vista.
Support for Vista will also be dropped at some point, probably after the next release.
Updating the menus so that they’re drawn by the system
Previously, all menus in the application were custom drawn. That was done because drawing a standard menu item with an image didn’t work too well on Windows XP. With the removal of Windows XP support, that’s no longer a concern. That means that all menus in the application are now drawn by the system (which is better overall).
The old code to custom draw menus also had a number of bugs and general issues, so removing it was a plus.
Fixing the “friendly date” functionality
The “friendly date” functionality formats a date in a relative way (e.g. as “Yesterday”). Unfortunately, the code that handled this had a number of bugs and the functionality didn’t work very well. That’s been fixed and the dates should now be displayed correctly.
Fixing a number of memory leaks
The excellent Dr. Memory has been a huge help here in finding leaks and other memory-related issues.
Overall improvements to code quality
One general thing I’ve been working on over the last couple of years has been to improve the quality of parts of the code. For example, adding error checking where it’s absent, breaking down large classes and functions, and adding logging where appropriate.
The hope is that these changes will firstly make it easier to do continued development and secondly help to reduce the probability of future bugs.
Other changes
The changes discussed here represent only a portion of the changes that have been made since version 1.3.5 of Explorer++ was released. There have been quite a few bug fixes and other smaller changes. See the History.txt file in the repository for a more complete list. Also see the list of commits made since version 1.3.5.