nus-cs2103-AY2324S1 / forum

10 stars 0 forks source link

Clarification on bugs involving crashing the app with specific data files #535

Closed jedkohjk closed 10 months ago

jedkohjk commented 10 months ago

Hi,

I refer to #510. In #510 , the poster says that inserting a null value in the data file causes the app to crash.

Prof @damithc responded by saying that the app only needs to support what is specified in the AB3 User Guide, with the following screenshot:

image

He then goes on to say:

Recovering from improper edits to the data file (or other config files) was not an expectations at v1.4, unless you specifically stated such a feature in the UG.

However, there is a misalignment between the AB3 User Guide and the behaviour of the poster's program (btw, I was not a tester for this poster, I am asking a more general question).

According to the AB3 User Guide, should the data file be invalid, the app will be cleared. However, in this case, the app completely crashes/does not start with an invalid data file. The app does not fail gracefully.

Hence, the 2 statements by Prof seem to contradict. I want to ask about which is correct.

I think the mismatch between user guide and app may confuse real users (again, I know the poster changed their user guide, but I'm speaking more generally).

To give an example, consider the following scenario from AB3:

The user uses tags to store projects they work on together with a given person and the original data file is as follows:

{
  "persons" : [ {
    "name" : "Alice Pauline",
    "phone" : "94351253",
    "email" : "alice@example.com",
    "address" : "123, Jurong West Ave 6, #08-111",
    "tags" : [ "projectX", "projectY" ]
  }, {
    "name" : "Benson Meier",
    "phone" : "98765432",
    "email" : "johnd@example.com",
    "address" : "311, Clementi Ave 2, #02-25",
    "tags" : [ "projectY", "projectX", "projectZ" ]
  }, {
    "name" : "Carl Kurz",
    "phone" : "95352563",
    "email" : "heinz@example.com",
    "address" : "wall street",
    "tags" : [ "projectX" ]
  }, {
    "name" : "Daniel Meier",
    "phone" : "87652533",
    "email" : "cornelia@example.com",
    "address" : "10th street",
    "tags" : [ "projectX", "projectZ" ]
  }, {
    "name" : "Elle Meyer",
    "phone" : "9482224",
    "email" : "werner@example.com",
    "address" : "michegan ave",
    "tags" : [ "projectY", "projectZ" ]
  }, {
    "name" : "Fiona Kunz",
    "phone" : "9482427",
    "email" : "lydia@example.com",
    "address" : "little tokyo",
    "tags" : [ "projectX" ]
  }, {
    "name" : "George Best",
    "phone" : "9482442",
    "email" : "anna@example.com",
    "address" : "4th street",
    "tags" : [ "projectY", "projectX" ]
  } ]
}

Now projectX is over. There is no easy way to remove all projectX tags using the app's functions. The user tries changing the json files directly. They want to use find and replace, but do not know what to replace with because there will sometimes be leftover commas. Hence they do the following:

find: "projectX"
replace: null

Thinking that it worked, they close the data file and do not try opening the app until a few days later.

A few days later, the user tries running the app, but it cannot start/crashes immediately after starting. It is not obvious to them that the issue arose because they changed the data file a few days prior. Referring to the user guide, there is no indication that anything they do can cause the app not to start, nor is there any troubleshooting offered. Changing the data file should only clear the app at worst, not cause the app to be unable to boot. Hence they do not draw the link between their changing of the data file a few days prior, to the current problem of the app not being able to start.

The user is left confused, thinking the app has stopped working.

Hence, I personally believe that it is a valid bug as it can affect real users and the documentation does not align with the behaviour of the app.

However, after reading Prof @damithc 's response to #510, I am not very sure and hope to seek clarification. Thank you!

damithc commented 10 months ago

@jedkohjk Sorry if my reply earlier led to confusion.

Recovering from improper edits to the data file (or other config files) was not an expectations at v1.4, unless you specifically stated such a feature in the UG.

The above was not meant to contradict the AB3 minimum requirement because by 'recovering' I meant more than just start with no data. For example, preserve some of the data with no errors, auto-correct some errors (e.g., replace unsuitable values with empty values), point out the error to the user and ask the user to correct the error, etc. So, crashing when the file has improper values falls below the minimum requirement.

jedkohjk commented 10 months ago

Thank you Prof for the clarification!