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

Zero-byte registry file causes null reference exception on load #2433

Closed
HobbitJack opened this issue Apr 28, 2018 · 13 comments
Closed

Zero-byte registry file causes null reference exception on load #2433

HobbitJack opened this issue Apr 28, 2018 · 13 comments
Assignees

Comments

@HobbitJack
Copy link

HobbitJack commented Apr 28, 2018

Background

CKAN Version:
1.25.1

KSP Version:
1.3.1/1.4.2

Operating System:
Windows 10 64x

Have you made any manual changes to your GameData folder (i.e., not via CKAN)?
No

Problem

What steps did you take in CKAN?
Launch CKAN

What did you expect to happen?
CKAN to launch and the directory select window to pop up

What happened instead?
I got an error

Screenshots:

image

CKAN error codes (if applicable):
(Possibly)
7713 [1]

@HobbitJack
Copy link
Author

BTW, if I'm a moron and did not see a previous issue relating to this, I'm sorry.

@HebaruSan
Copy link
Member

You mention two steps that you took, but it's not clear when the problem happened. Did the error occur during launching, or sometime later?

@HobbitJack
Copy link
Author

The problem occurres a few seconds after running CKAN. Also, I don't have my computer in front of me right now.

@HobbitJack
Copy link
Author

I'm in front of my computer and can work on the issue.

@HebaruSan
Copy link
Member

So you launch CKAN, and you wait a few seconds without doing anything else, and it crashes?

If you are clicking something, please specify exactly what.

@HobbitJack
Copy link
Author

I am not clicking anything. I just launch it, then this crash occurs.

@HebaruSan
Copy link
Member

Thanks, that helps.

The stack trace implies that registry is null in ScanDlc, which implies that JsonConvert.DeserializeObject returned null in Load, which suggests a problem in creating the registry. This looks like it may be related to KSP-CKAN/NetKAN#6459, which also describes a mysterious crash along a same or similar code path.

Can you please check whether a file called registry.json exists in the CKAN subdirectory of your KSP install?

Sorry, something went wrong.

@HobbitJack
Copy link
Author

I'm not exactly sure which of my two KSP installs it's looking at, but i'll check both.

Sorry, something went wrong.

@HobbitJack
Copy link
Author

Both installs have a registry.json.
image
image

However, I did get an idea about the issue...

Sorry, something went wrong.

@HebaruSan
Copy link
Member

Thanks for those screenshots; the file should never be 0 KB, so that gives us another clue as to what's going on. If you delete the registry.json file, does it reappear as 0 KB?

@HobbitJack
Copy link
Author

One sec

@HobbitJack
Copy link
Author

Well, crap. It worked when I deleted the registry files. Case closed.

@HebaruSan
Copy link
Member

Well, we still shouldn't be generating a 0 KB registry file to begin with, and we should be handling its existence more gracefully. I'm going to re-open this so we can deal with those issues...

@HebaruSan HebaruSan reopened this Apr 28, 2018
@HebaruSan HebaruSan self-assigned this Apr 28, 2018
@HebaruSan HebaruSan changed the title Register Management Error Zero-byte registry file causes null reference exception on load May 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants