MarcTheSpark / scamp

a Suite in Python for Computer-Assisted Music [MIRROR of https://git.sr.ht/~marcevanstein/scamp]
http://scamp.marcevanstein.com
GNU General Public License v3.0
122 stars 11 forks source link

using pyinstaller #6

Closed simdax closed 1 year ago

simdax commented 1 year ago

Hello !

scamp seems very nice. I'm trying to build a little example app, and export it with pyinstaller to show it.

I have problems, the pkged application search not in the good path. e.g. it searchs the default sf2 Merlin.sf2 in the root of my pkg, and not in scamp anymore. Simply copy the soundfounts folder lead to other errors.

I would just want to know if someone was able to package an app with scamp with pyinstaller.

Cheers !

simdax commented 1 year ago

Oh I see this, I'm not sure its working for me image

simdax commented 1 year ago

OK, my bad, really I was just tricked by git lfs, the soundfont was not really here when I put it locally...

But really, there is another problem with multiprocess, Scamp don't stop to throw process even after the end of the process :o !

I'm using asyncio for the rest of the app, I was thinking it could go easily together but maybe not ?

But somehow its strange, because the leaks happen only with pyinstaller, when I run my app like a script there is no problem

simdax commented 1 year ago

OK that's a leak, sometimes even with the most simple example, it can lead the infinite zombie processes

image

import scamp

s = scamp.Session()
cello = s.new_part()

cello.play_note(50, 1, 1)

Even if I add a s.kill() at the end, it still keep spawning processes after end

simdax commented 1 year ago

OK. So it unrelated with scamp, but maybe with something else, but adding multiprocessing.freeze_support()

solves the problem.