dsicol / pe

0 stars 0 forks source link

Entire application crashes when handling budget of negative number #8

Open dsicol opened 1 year ago

dsicol commented 1 year ago

Negative number budget

image.png

As shown in the image above, the corrupted save file data is able to produce a negative budget in item number 4, big budget.

Creating an expense for big budget

Creating an expense of amount 1, crashed the application shown by the following:

image.png

As shown in the image, an innocent user trying to add an expense to the budget: big budget will run into an application crash that is not handled rooting from the corruption of the save file.

Unable to launch the application again

image.png

As shown by the image above, the aforementioned bug will lead to the application being unable to be run again, with no error messages to help the user, and no direct documentation in the user guide to help.

nus-pe-script commented 1 year ago

Team's Response

We already indicated in the user guide that the user should not edit the file. However, I will accept this bug as we did not handle cases for negative numbers in the data file.

Items for the Tester to Verify

:question: Issue severity

Team chose [severity.Medium] Originally [severity.High]

Reason for disagreement: ## Context

Thank you for your response.

I understand that the user guide has discouraged users from manipulating the data for good reason. However:

  1. Users are discouraged but not banned from editing the text file as shown in the User Guide:

image.png

This implies that users are allowed to manipulate data

  1. The module constraints strictly states that the save file is supposed to be manipulated:

image.png

This is to simulate save file corruption to test if the application is able to handle it:

Rationale

  1. Invalid inputs such as negative numbers are allowed via manipulating the save file.

  2. Performing an action with the invalid input such as the negative number causes the application to fail; it crashes.

  3. The application is unable to launch again after the first crash, rendering it completely unreasonable should the save file be manipulated by corruption. The application should be able to handle the error.

  4. This bug is a High severity bug for the aforementioned reasons; it is not usable after the crash, and it does not have any documentation or interface for instructions to fix the issue.