Comments (1)
That was a nasty one.
After checking for possibly invalid items at several places, I finally found the critical one in that loop in DirTree::refresh()
: In that particular case, the first loop iteration (where all items had still been valid) had invalidated all the other items, so that the next loop iteration would try to check a now invalid item if it is a DirInfo object (item->isDirInfo()
) or, if not, if it has a parent (item->parent()
) - both of which pointer dereferences would have caused a segfault.
That checkMagicNumber()
thingy is really a kludge, but a really helpful one: It checks if a magic number (4242, what else) is still in the first two bytes of the object the pointer points to. The constructor sets that magic number, the destructor resets it to 0, so it is very unlikely (albeit not impossible) that a pointer that has become invalid (because the underlying object is already destroyed) points to something that has the magic number set.
from qdirstat.
Related Issues (20)
- Selected empty directories don't get the correct highlight HOT 5
- Treemap Improvements HOT 1
- More Ideas for Treemap Improvements by @Lithopsian HOT 4
- Mime category config page glitches HOT 1
- Way to follow symlink? HOT 3
- File type statistics don't add up = literally HOT 10
- Qt6 support? HOT 7
- File type statistics for packages sometimes allowed, sometimes not HOT 9
- Find files subtree not updated when the DirTree is reloaded HOT 2
- Unexpected results when refreshing the locate files window HOT 2
- Accelerator clashes HOT 6
- Fonts can't always be resized in the output window HOT 1
- Crash during recursive cleanup with refresh policy "assume deleted" HOT 10
- Cross filesystems setting not respected HOT 2
- Possibly unintended change to the sorting of hardlinks HOT 1
- Crash when unable to open a cache file HOT 5
- 100% CPU after reading is aborted HOT 1
- Package member file sometimes not showing package data in file details view HOT 2
- Erratic crash apparently related to the Unpkg dialog HOT 12
- Question for use in Linux with files with multiple hard links HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qdirstat.