Closed AinRyzen closed 4 months ago
Are you sure that the installation is run only once at a time? It looks like the same file is downloaded twice at the same time
Are you sure that the installation is run only once at a time? It looks like the same file is downloaded twice at the same time
i am defining a Context and a Version than i install it and After that i am running the Version all in a thread when i am home will send you a replica of this situation
Your report is interesting tho., because it may be an issue with PMC, where the same file is downloaded twice at the same time by different downloading threads.
Your report is interesting tho., because it may be an issue with PMC, where the same file is downloaded twice at the same time by different downloading threads.
Here is my example
import customtkinter as ctk
import threading
import portablemc.standard
import pathlib
def launch():
def threadlaunch(): context=portablemc.standard.Context(main_dir=pathlib.Path("maintesting"),work_dir=pathlib.Path("maintesting"))
print("Defining the version")
version = portablemc.standard.Version(version="1.16.5",context=context)
print("installing")
env = version.install()
print("Running")
env.run()
threading.Thread(target=threadlaunch,daemon=True).start()
window = ctk.CTk()
startbutton = ctk.CTkButton(window,text="Start",command=launch)
startbutton.pack(pady=10,padx=10,fill="both")
window.mainloop()
Apparently, this dose only happen when the script is run in a thread
Never mind, I just got this error without using threading
Ok, this is definitely interesting, would you be ok to take time to test a specific dev branch later on?
Also, from you "print" calls, are you sure that only one threadlaunch
is called at a time? (threaded or not, I don't know if the callback given to CTkButton
is launched in a thread.
Also, from you "print" calls, are you sure that only one
threadlaunch
is called at a time? (threaded or not, I don't know if the callback given toCTkButton
is launched in a thread.
Yes i am sure that it's downloading only once i think its a specific file or folder that is a problem you might saw that the main directory and working directory are the same maybe there are two folder or file who have the same name if you know what i mean but that doesn't explain why working without the thread it's definitely installing a few folder and files and only than give me the error
I'll be working on a new patch version soon, I'll try to fix the issue at the same time.
I've found the issue, I think.
For example, in the asset index 17 there are two identical assets 6ea4e448fbc2a079acb0cf3564273083dadae165
: minecraft/sounds/entity/fish/swim1.ogg
and minecraft/sounds/liquid/swim1.ogg
. I didn't know this was possible, so I'll just download once.
Nice
Fixed in 4.4.0, reopen the issue if not
So to put this in context, I build a GUI app around your module with tkinter or customtkinter, so I have to run the launch process in a thread and I think that's what make this issue I noticed that the version would work after I rebooted my application however here is the error