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

[Bug] NullReferenceException on spacebar with empty filter #3241

Closed
alex-gillott opened this issue Dec 18, 2020 · 5 comments · Fixed by #3266
Closed

[Bug] NullReferenceException on spacebar with empty filter #3241

alex-gillott opened this issue Dec 18, 2020 · 5 comments · Fixed by #3266
Labels
Bug Something is not working as intended GUI Issues affecting the interactive GUI

Comments

@alex-gillott
Copy link
Contributor

Background

Operating System: Windows 10
CKAN Version: 1.29.2
KSP Version: 1.11.0

No manual changes to GameData

Problem

A NullReferenceException is thrown in ManageMods.cs when the space bar is pressed on ModList, though I'm not sure on which line. I would suspect the cause be something around line 595, where ModGrid.CurrentCell is referenced..

The error occurred while on an empty Upgradeable filter, as this means there is no selected entry to reference, so ModGrid.CurrentCell is likely null. This would mean that, upon pressing the space bar, it would try to reference a null object, thus throwing the named exception.

Steps to reproduce
Go to the mod manager, and open a filter that makes the list empty
Press the space bar
Get NullReferenceException

@HebaruSan HebaruSan added Bug Something is not working as intended GUI Issues affecting the interactive GUI labels Dec 18, 2020
@HebaruSan
Copy link
Member

HebaruSan commented Dec 18, 2020

Sounds like you're pretty close to a fix, @Hydroxa. Any interest in submitting a pull request? The CKAN project welcomes contributions.

@HebaruSan HebaruSan changed the title [Bug] Crash - NullReferenceException [Bug] NullReferenceException on spacebar with empty filter Dec 19, 2020
@alex-gillott
Copy link
Contributor Author

I'll look into it. Despite having GitHub for a little while now, I'm still learning about its features haha

@HebaruSan
Copy link
Member

Hi @Hydroxa, how's it going? I saw that you made a branch with a fix for this, do you need any assistance in submitting it?

@alex-gillott
Copy link
Contributor Author

I had some issues when trying to build the solution, so I couldn't test the fix :/ The solution was unable to find any dependencies, despite other solutions succeeding in this

But yeah, I did also try to push it here in case the issue was just with my computer and couldn't really work out how ^^;

@HebaruSan
Copy link
Member

Well, doing a quick checkout and compile on my system, it looks OK so far. There are some build instructions over here that might help (substitute .\build.ps1 for ./build on Windows):

If you click here, it should take you to the pull request creation flow, where you can enter a description of the change and then submit it:

That gives us a place to do code review and, once any issues are figured out, eventually merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended GUI Issues affecting the interactive GUI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants