Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NullPointerException in PlaylistEditCtrl #89

Merged
merged 1 commit into from
Feb 12, 2023

Conversation

Borewit
Copy link
Owner

@Borewit Borewit commented Feb 12, 2023

Changes:

  • Remove constructor in PlaylistEditCtrl without passing callback to main GUI window.
  • Abstracted callbacks to main GUI window to interface IListFixGui.

Should resolve NullPointerException reported in #64 (comment)

java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "listfix.view.GUIScreen.getMediaLibrary()" because "this.mainWindow" is null
	at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:?]
	at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:?]
	at javax.swing.SwingWorker.get(Unknown Source) ~[?:?]
	at listfix.view.controls.PlaylistEditCtrl$3.done(PlaylistEditCtrl.java:294) ~[listFix.exe:2.5.1-19]

Remove constructor in PlaylistEditCtrl without passing callback to main GUI window.
Abstracted callbacks to main GUI window to interface `IListFixGui`.
@Borewit Borewit self-assigned this Feb 12, 2023
@Borewit Borewit added the bug Something isn't working label Feb 12, 2023
@Borewit
Copy link
Owner Author

Borewit commented Feb 12, 2023

Build: listFix_2.5.1-PR89-26.exe

@touwys, can you test this version?

Please delete your log files (.listFix()\logs\logs\rollingfile.log), before running / testing this version, and focus on the following:

  1. Is the NullPointerException (Cannot invoke "listfix.view.GUIScreen.getMediaLibrary()") resolved?
  2. Does PR (represented by this build) break something new?
  3. 🙏 Does it resolve Double printed tab pane headings of the playlist editors #55 ?

@Borewit Borewit mentioned this pull request Feb 12, 2023
@touwys
Copy link

touwys commented Feb 12, 2023

Build: listFix_2.5.1-PR89-26

Log-file was cleared before installation commenced:

  • Is the NullPointerException (Cannot invoke "listfix.view.GUIScreen.getMediaLibrary()") resolved?

I do not have a clue what this log-entry refers to. I did not notice anything untoward, sorry. If it, perhaps, refers to GUI-problems while trying to add to the Media Library, please note that I did not notice any problems with it. What else does "listfix.view.GUIScreen.getMediaLibrary() refer to, so I can take another look at it?

  • Does PR (represented by this build) break something new?

Do you have anything specific in mind that I should look out for? Running a few quick checks, did not show up any quirks. To be continued.

Does it resolve Double printed tab pane headings of the playlist editors #55 ?

This is the very first test I ran. Unfortunately, this ghost is still hanging around.


rollingfile.log

@touwys
Copy link

touwys commented Feb 12, 2023

Build: listFix_2.5.1-PR89-26

Also see #91

@Borewit
Copy link
Owner Author

Borewit commented Feb 12, 2023

I do not have a clue what this log-entry refers to

That was the exception you reported #64 (comment)
But in the log file you provided I no longer see it, so that is good.
To bad it was not the cause of #55 as your ghost is still hanging around.

Do you have anything specific in mind that I should look out for?

Nope, just if you noticed I introduced a new problem

@Borewit Borewit merged commit 855a9fc into main Feb 12, 2023
@Borewit Borewit deleted the fix-NullPointerException-in-PlaylistEditCtrl branch February 12, 2023 20:45
@touwys
Copy link

touwys commented Feb 13, 2023

That was the exception you reported #64 (comment)

Thank you, I was aware of that, but my words keep on failing me: What I meant is that I do not have a clue what a "NullPointerException" intends — in general, or, as in this issue, in particular. 🤔

Thank you for showing so much patience trying to interpret, and explaining what I am posting here. Understandably, it is important that we stay on the same page. However, it appears that I am not even on the same chapter yet. 🤣

@Borewit
Copy link
Owner Author

Borewit commented Feb 13, 2023

What I meant is that I do not have a clue what a "NullPointerException" intends

When programming we use variables. Just like variables in mathematical formula's. A special variable is reference to a certain type of Object. An Object is collection of functions, variables (including references to other objects).

A reference to an object may be null. Which means, it's empty.

Car myCar = new Car(); // We create new object "Car" and store it the instance in reference variable myCar
myCar.drive(); // Now we call the function of the Car instance "myCar": drive()

A NullPointer exception is thrown in the following condition:

Car myCar = null; 
myCar.drive(); // NullPointerException will be thrown here 

We can a function (method) of object instance, which is null.

Same when I want to take my Porsche for a drive, I know how it looks like, but I don't own one (it is null), so unfortunately I cannot drive it.

Ref:

@touwys
Copy link

touwys commented Feb 13, 2023

Thank you.

@Borewit
Copy link
Owner Author

Borewit commented Feb 17, 2023

Fixed in release v2.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants