database: Add basic database validation and error description#12
database: Add basic database validation and error description#12
Conversation
|
Hello, now i can find this kind of description, Reading database luglio25.db What i'm supposed to do? There are options to print details? If i search this entry and i delete them maybe i can fix the problem of the dude! I will try |
|
I been working into adding ID validation for individual object references to produce outputs like. However based on your log is quite interesting. No new data formats or types which is good. However your entries were parsed without errors but seem incomplete as the object id is zero. Give me some time to make the error a lot more verbose. I should be able to make it display all fields in plain text, hopefully this will allow us to identify what is wrong with these. |
|
@pmattia90 Give it a second try to this PR. I added a detailed description. If any error happens while the parser is running it will also display that error. The message should look as follows: This is the same data but with text descriptions instead of hex values. |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
The text descriptions are based on the enums at All your entries are of type |
|
@pmattia90 Seems like I was trying to read a byte on an int field. I promoted a bunch of fields to int. Now it should output no errors. I also added the |
|
I can confirm that now no errors are reported, So i can't understand which node or field creates problem in dude, correct? |
|
That's great news for me. Not so much for you. Correct we don't know which node or field is causing your dude to crash. Maybe after finishing the integrity test we will have more clues. For now we don't have the slightest idea. |
d30dd45 to
ce1a33c
Compare
Some databases are corrupted like #11. This PR adds an explanation for parser errors and checks for new types that aren't handled by this program.
The new error message will contain the ID of the corrupted entry a short explanation and a dump of the entry blob. This will be helpful for users reporting issues with corrupted entries. However since the entry couldn't be parsed correctly it can contain sensitive data encoded within the blob.
Update
The PR is more complete and has shown that a valid database can have invalid entries. It appears like the dude has some actual bugs. Like deleting images, services or notification types doesn't remove the reference in other objects.
The dude seems to handle these fairly well. For example an invalid image will show as no image. An invalid notification method will not show at all. However it will not remove these invalid references.
Most of these are fixable by removing the invalid reference or changing the value for the default one directly on the database without any data loss.