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

Dictionary changed size during Iteration #481

Open
coreduo0099 opened this issue Oct 30, 2023 · 1 comment
Open

Dictionary changed size during Iteration #481

coreduo0099 opened this issue Oct 30, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@coreduo0099
Copy link

Describe the bug
Organizing new files frequently causes a crash with the following output...
image

To Reproduce
Steps to reproduce the behaviour:
I don't have a way to produce it every time, but it happens frequently when adding a measurable number of new files and then organizing via NUT

Expected behaviour
Not to crash on file scan

NUT version (or git hash):

  • Nut:3.3
  • Windows 10
@coreduo0099 coreduo0099 added the bug Something isn't working label Oct 30, 2023
@privateemu
Copy link

I still get this error, I note it seems to be related to stale entries in my list of files that if I purge and rescan files it works.

From the error, it's clearly related to the dict in here:

def getFiles(self, ext=None):
	if len(fileLUT) == 0:
		for path, f in Nsps.files.items():
			tid = f.titleId.upper()
			if tid not in fileLUT:
				fileLUT[tid] = []
			fileLUT[tid].append(f)

	if self.id in fileLUT:
		return self.filterExt(fileLUT[self.id], ext)

	return []

Changing, so the nsps.files.items() can't find that's expected. I might try to debug more, but it would be useful it also when one hit "scan" it would purge deleted records.

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

No branches or pull requests

2 participants