Bug 476 - Program crashed upon incorrect inputs on MacOS Mojave
Summary: Program crashed upon incorrect inputs on MacOS Mojave
Status: CONFIRMED
Alias: None
Product: Group 4
Classification: Unclassified
Component: Main (show other bugs)
Version: unspecified
Hardware: Macintosh Mac OS
: Highest critical
Deadline: 2020-11-27
Assignee: sharitsang97
URL:
Depends on:
Blocks:
 
Reported: 2020-11-26 12:25 HKT by kykao2-c
Modified: 2020-11-26 12:25 HKT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kykao2-c 2020-11-26 12:25:20 HKT
The program is immediately crashed upon an incorrect input on my 2017 13-ich
Macbook Pro (OS: macOS Mojave; version 10.14.6). This error causes the program
unable to operate properly for normal usage.

Severity: Critical. 

Specification of the device which encountered this problem:
MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports)
Processor: 2.3 GHz Intel Core i5
Memory: 16 GB 2133 MHz LPDDR3
Graphics: Intel Iris Plus Graphics 640 1536 MB

The inputs leading to program crash are as follows:
1. "ListMember" (incorrect command - correct: "listMember")
2. "makePurchase 10" (incorrect input arguments)
3. "randomCommand" (command that does not exist)

Observation:
The program crashes if the input does not match the correct ones coded in the
program; the failure-causing inputs passed to parameters cannot be executed
correctly and lead to an exception.

Expectation:
The program should ask the user to enter another command in a non-stop manner instead of breaking a program.

Solution:
An input checking mechanism can be implemented for avoiding failure-causing
input to break the program. For example, check if the input fulfils the size of
arguments to be passed as well as to ensure it returns a error message to the
user without passing such input for retry instead.