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

Got NPE during testing SelectModules game screen #3358

Closed
ar0ne opened this issue May 11, 2018 · 4 comments
Closed

Got NPE during testing SelectModules game screen #3358

ar0ne opened this issue May 11, 2018 · 4 comments
Assignees
Labels
Topic: Architecture Requests, Issues and Changes related to software architecture, programming patterns, etc.
Milestone

Comments

@ar0ne
Copy link
Contributor

ar0ne commented May 11, 2018

How to reproduce:

  1. Open create new game screen
  2. Open SelectModules screen and close it.
  3. Open Details game screen and close it.
  4. Try to open SelectModules again.
    ==> NPE

logs: https://pastebin.com/jYTnn37m

@mkienenb
Copy link
Contributor

Thanks for the report. I was planning on taking a look at this code in a couple of hours and I'll add your item to my list.

@mkienenb mkienenb self-assigned this May 11, 2018
@Cervator
Copy link
Member

FYI see #2509 and related issues, this sounds quite related. Specifically opening "Details" then closing it again leaves the module environment or something in a bad state (unless the next thing you do is start the game)

I believe this will be sorted out with @TheFlash98's GSOC item as it involves reordering these menu screens. Not that I'd turn out a quick and easy shorter term fix :-)

@mkienenb
Copy link
Contributor

This is a pretty weird one. It's NPE'ing on sortedModules.
But sortedModules is set on initialise() and should not be able to revert back to null once set.

The only thing I can think of is that the SelectModulesScreen has been reconstructed and we're not using the one which was previously-initialized. Maybe this is due to the clearing of the environment (reloaded the modules?) and this clearing doesn't re-initialise the NUI widgets when it recreates them.

In any case, the cause wasn't what I thought it would be. Somehow the fix would have to insure that initialise() was called again for this object. I'm going to let someone else figure it out since I don't see a quick and easy fix.

@mkienenb mkienenb removed their assignment May 12, 2018
@mkienenb mkienenb added the Topic: Architecture Requests, Issues and Changes related to software architecture, programming patterns, etc. label May 12, 2018
@Cervator Cervator added this to the v2.1.0 milestone Jun 18, 2018
@Cervator
Copy link
Member

Closing this as rendered obsolete by #3399 being merged - UI overhaul of involved screens :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Topic: Architecture Requests, Issues and Changes related to software architecture, programming patterns, etc.
Projects
None yet
Development

No branches or pull requests

4 participants