Skip to content
This repository has been archived by the owner on Mar 15, 2023. It is now read-only.

Exit only works after a song has been played #5

Closed
Rosyparadise opened this issue Feb 8, 2022 · 2 comments · Fixed by #6
Closed

Exit only works after a song has been played #5

Rosyparadise opened this issue Feb 8, 2022 · 2 comments · Fixed by #6
Assignees
Labels
bug Something isn't working

Comments

@Rosyparadise
Copy link
Contributor

Linux Manjaro [Kernel 5.14.21-2-MANJARO]
Desktop KDE Plasma 5.23.5

"exit" command only works after a song has played. Trying to exit the program by typing "exit" as the program starts, after using a command or after loading tracks to the playlist results to a null pointer exception error. "exit" command only works after using command "p" when there are tracks loaded in the playlist.

some error scenarios are:

  1. start the program
  2. type "exit"
  3. error

and

  1. start the program
  2. type "open"
  3. type "<"
  4. type "+ 1" to load user's .wav files to playlist
  5. type "q" to return to the player
  6. type "exit"
  7. error

scenario where "exit" works:

  1. start the program
  2. type "open"
  3. type "<"
  4. type "+ 1" to load user's .wav files to playlist
  5. type "q" to return to the player
  6. type "p" to play a file
  7. type "exit"
  8. success

I expect to be able to exit the player at any given time, in any given situation when I'm using the program without having to satisfy conditions.

@0x61nas 0x61nas added the bug Something isn't working label Feb 8, 2022
@0x61nas
Copy link
Member

0x61nas commented Feb 8, 2022

This happens because I do not set a value for the reference clip in the WAVPlayer except when I play a clip, and when I close the program I call the close function from it and this is an error because at the start of the program it is with null

@0x61nas 0x61nas self-assigned this Feb 8, 2022
@0x61nas
Copy link
Member

0x61nas commented Feb 8, 2022

This error also occurs with the next, previous, pauseandstop` functions

0x61nas added a commit that referenced this issue Feb 8, 2022
@0x61nas 0x61nas linked a pull request Feb 8, 2022 that will close this issue
@0x61nas 0x61nas closed this as completed in #6 Feb 9, 2022
0x61nas added a commit that referenced this issue Feb 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants