Comments (2)
A related issue and the root cause of the crash is that the cache loading process corrupts the memory when invalid cache is encountered and it may not be good enough to simply retry.
This happens because Cache::load
stored a raw pointer from the sha buffer into the global cache (i.e. revsFiles
). However, if the reads errors, the caller (Git::loadFileCache
) does not keep this buffer alive so as soon as loadFileCache
returns the cache is already corrupted and must not be looked at again (every keys in the hash table becomes invalid AFAICT). The solution to this problem would be to unconditionally preserve the shaBuf
or revert all changes to the cache immediately.
It also seems that the reader of the shas does not check bound and simply forward the pointer by 41 bytes every cycle. A bounds check should probably be added...
from qgit.
And just for the reference, the cause for my corrupted cache file may be openning multiple qgit on the same checkout at the same time, or using complex options to filter the commits (--not
, --branches
, --remotes=*
, etc) or a combination of both. Clearing the cache (or let qgit
do it automatically with #103) fixes the problem and trying the command line options I've used before did not reproduce it.
In this case, the fresh cache file is 4.1kB whereas the old one was 1.8MB so the currupted one is clearly not just truncated.
from qgit.
Related Issues (20)
- qgit-2.9 deadlocks with 100% cpu usage when selecting a commit with many files changed HOT 1
- What is the minimum version QT framework in the project. HOT 2
- Show commit hash in Rev list HOT 2
- QGit release 2.10? — Please please :) HOT 6
- Let users customize diff colors HOT 1
- QGit download binaries HOT 1
- Changing default terminal HOT 8
- Annotate not working in linux kernel HOT 32
- Ctrl+ to increase font does not work on Mint 20.3 HOT 3
- Crash on repository with commit changing many files HOT 1
- Impossible to remove changed or new files from the index using the "Commit" dialog
- Selecting commit hash using double or triple mouse click works unpredictably HOT 1
- Commit list is not readable with dark colors schema
- Commit graph color doesn't follow color scheme changes
- Possible to restore Qt4 compatibility? HOT 3
- [macOS] App icon is broken on Sonoma / arm64 HOT 6
- Add possibility to highlight all search results at once HOT 3
- Incorrect file-to-diff jump when the diff contains patch files
- Feature wish: Select branch to be viewed HOT 2
- src/settingsimpl.cpp:108: suspicious for loop ? HOT 1
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 qgit.