fulgor icon indicating copy to clipboard operation
fulgor copied to clipboard

Non-informative messages if the used index is damaged (libc++abi: terminating due to uncaught exception of type std::length_error: vector)

Open karel-brinda opened this issue 1 year ago • 2 comments

When using Fulgor in large-scale projects and eg copy / download of an index fails from any reason, Fulgor prints a message that's difficult to trace down to the original issue, e.g.,

libc++abi: terminating due to uncaught exception of type std::length_error: vector

It would be extremely helpful if it could print something like "Error: Index corrupted" or "Error: Index loading failed" or something similar.

karel-brinda avatar Nov 07 '24 15:11 karel-brinda

Hi @karel-brinda,

Thanks for the suggestion! Actually @jermp --- the more I think about it (and given how helpful it has been in my other work in different aspects), it would be incredibly useful to have some sort of signature/checksum for the index. That is, we could compute the signature of the valid index upon the termination of construction, and store this value in the index itself. It would then be possible to have e.g. a verify command that ensures that someone has the index they believe they have (and that it is not corrupted).

rob-p avatar Nov 07 '24 15:11 rob-p

Thanks Karel and Rob for your thoughts. Yes, I agree and will add something soon! Also ping: @Alessio-Campa.

jermp avatar Nov 07 '24 21:11 jermp

Hi everybody, I added a serialization number to the Fulgor index (this feature is currently in a branch of the codebase that will be merged in main soonish). I'll add a check_version subtool to explicitly check this, although currently any time the index is loaded from disk, the check is made.

jermp avatar May 30 '25 07:05 jermp

Here it is https://github.com/jermp/fulgor/commit/f85ff8f5c4cb379f8d6924e4150018c3505f5861. Will be merged into main then. Closing this for now.

jermp avatar May 30 '25 09:05 jermp