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

[0.17-beta] When compiled to exe: Random errors occur sometimes when sparkles subprocesses are started too fast after each other. (For multithreading) #4

Open
LtqxWYEG opened this issue Oct 13, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@LtqxWYEG
Copy link
Owner

LtqxWYEG commented Oct 13, 2024

My multithreading solution causes n subprocesses of sparkles to spawn. This happens too fast when it's all compiled to a executable; Random errors occur that are seemingly related to how much time the program had to run through before the next subprocess was started.

I had to add a 1.5 second delay between launches of the sparkles subprocesses. This is annoying, but barely noticable when there are only 2 - which is the best anyway for up to a medium amount of particles.
So this seems to be a sufficient work-around until I figure out what really the problem is. It's never what I think it is.

if isCompiledToExe:
    returnValue = Popen("sparkles.exe", shell=False, creationflags=CREATE_NO_WINDOW, cwd=getcwd())
    proc.append(returnValue)
    if numberTasks > 1:
        sleep(1.5)  # random errors occur when running multiple exe at the same time. Sleep does help

Any Ideas?

@LtqxWYEG LtqxWYEG added the bug Something isn't working label Oct 13, 2024
@LtqxWYEG LtqxWYEG self-assigned this Oct 13, 2024
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

1 participant