nus-cs2113-AY2324S2 / pe-dev-response

0 stars 0 forks source link

Storage error handling #769

Open nus-pe-bot opened 7 months ago

nus-pe-bot commented 7 months ago

image.png

(nitpicking storage errors here) after tampering with storage data of 1 out of 2 menus, the message displayed suggests that the whole menu file has been corrupted and deleted, however, i was still able to access and view the other untouched menu

image.png

then upon the next app startup, the app cannot display the untouched menu anymore even though i did not delete it

image.png

this may cause issues where users are unable to save their edited changes to the menu if they edited in the intermediate step but are unable to retreive said menu changes after


[original: nus-cs2113-AY2324S2/pe-interim#893] [original labels: severity.Low type.FunctionalityBug]

Zhengwinter commented 7 months ago

Team's Response

Can you provide more details on how the bug is produced?

We tried to create two menus and tampered with only one of those. This caused the whole menu file to be deleted, which was the correct behavior.

Based on our understanding, you might have modified the menu data file when the program is running midway, leading to the other menu still existing within that run (we only perform a check for the files in storage at the start of the program).

The checking for corrupted files would not occur immediately when the storage file was tampered with illegally, but only at the start of the program.

e3b68993-43d5-4741-b55a-8e01da1c9b3e.jpg

The menu data would be completely deleted once it has been tampered with illegally as can be seen from the code above.

Duplicate status (if any):

--