Yue Posted June 15 Share Posted June 15 Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted June 15 Share Posted June 15 @Yue and I have been discussing on discord about why my game does not load packages on his PC. On my PC and several others who have run my game it works as it should. The game states that it is loading the package then it will crash. This occurs for both password protected and non password protected zip files. Writing an example for this is extremely hard as It's only happening on his PC. The only thing that we can see what is different is that his Windows PC is in Spanish. Could that be effecting something? @Yue Can you please post your system specs here for Josh? 1 Quote Link to comment Share on other sites More sharing options...
Yue Posted June 15 Author Share Posted June 15 Windows 10. GTX 1070 8 Gigas VRAM. CPU I7 2600 24 Ram. 1 Quote Link to comment Share on other sites More sharing options...
Dreikblack Posted June 15 Share Posted June 15 1 hour ago, SpiderPig said: Windows PC is in Spanish Or user name uses non-latin symbols Quote Link to comment Share on other sites More sharing options...
Josh Posted June 21 Share Posted June 21 Perhaps zip_open() does not support UTF8 strings... Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted June 21 Share Posted June 21 I tried this and it worked with no issues: Assert(FileType(GetPath(PATH_DESKTOP) + L"/Пожалуйста.zip") == 1); auto p = LoadPackage(GetPath(PATH_DESKTOP) + L"/Пожалуйста.zip"); If you are storing a path in a string and not a WString you could lose information. Please upload a zip file for me to test, or tell me what the path that is causing the problem is. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted June 21 Share Posted June 21 Please upload the zip file so I can test it. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Yue Posted June 21 Author Share Posted June 21 Pass: 1500 Maps.zip Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted June 21 Share Posted June 21 This is my code for loading all packages within the game directory. Yue has uploaded a zip on the thread he created. vector<shared_ptr<Engine::Package>> packages; void LoadPackages(Engine::WString path = "") { auto directories = LoadDir(path); for (auto dir : directories) { auto ext = ExtractExt(dir); if (ext != "") { if (ext == "zip" || ext == "pak") { auto package = LoadPackage((path != "" ? path + "\\" : "") + dir); if (package != nullptr) { package->SetPassword("password"); packages.emplace_back(package); #ifdef ENABLE_LOG Log("SUCCESS : Loaded Package : " + path + "\\" + dir); #endif } else { #ifdef ENABLE_LOG Log("ERROR : Failed to Load Package : " + path + "\\" + dir + "!"); #endif } } } else { LoadPackages((path != "" ? path + "\\" : "") + dir); } } } Quote Link to comment Share on other sites More sharing options...
Josh Posted June 21 Share Posted June 21 This code works without any problem: auto p = LoadPackage("maps.zip"); p->SetPassword("1500"); auto stream = p->ReadFile("Test.ultra"); Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
SpiderPig Posted June 21 Share Posted June 21 I think you will need to do a remote debug. Its only happening on his PC. Quote Link to comment Share on other sites More sharing options...
Yue Posted June 21 Author Share Posted June 21 Video on Discord. https://discord.com/channels/1175951843118031049/1175951843612954786/1253806372634755124 Quote Link to comment Share on other sites More sharing options...
Yue Posted June 21 Author Share Posted June 21 I've created a new project, and I'm still the same, installing on another hard drive and the application close Quote Link to comment Share on other sites More sharing options...
Yue Posted June 21 Author Share Posted June 21 Proyect Test, Press key R for load zip. https://www.mediafire.com/file/f4qmp77zneigfku/Test.zip/file Quote Link to comment Share on other sites More sharing options...
Yue Posted June 21 Author Share Posted June 21 Update main, herror continue. --Initialze Steam (optional) --if not Steamworks.Initialize() then return 1 end --Load FreeImage plugin (optional) local fiplugin = LoadPlugin("Plugins/FITextureLoader") --Get the displays local displays = GetDisplays() --Create a window local window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[1], WINDOW_CENTER | WINDOW_TITLEBAR) --Create a framebuffer local framebuffer = CreateFramebuffer(window) --Create a world local world = CreateWorld() --Load a map local mapname = "Maps/start.ultra" local cl = CommandLine() if type(cl["map"]) == "string" then mapname = cl["map"] end local scene = LoadMap(world, mapname) while window:KeyDown(KEY_ESCAPE) == false and window:Closed() == false do --Garbage collection step collectgarbage() --Update the world world:Update() Steamworks.Update() if window:KeyDown(KEY_R) then local p = LoadPackage("Maps.zip") p:SetPassword("1500") end --Render the world to the framebuffer world:Render(framebuffer) end Steamworks.Shutdown() main.lua Quote Link to comment Share on other sites More sharing options...
Josh Posted June 21 Share Posted June 21 Your code says this: p:SetPasworld("1500") It should be this: p:SetPassword("1500") Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Yue Posted June 21 Author Share Posted June 21 Sorry, that's why I updated the main file. It doesn't work anywa Quote Link to comment Share on other sites More sharing options...
Josh Posted June 21 Share Posted June 21 What is the full path to your project directory? Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Yue Posted June 21 Author Share Posted June 21 C:\Users\Yue\Documents\Ultra Engine\Projects\Test Quote Link to comment Share on other sites More sharing options...
Josh Posted June 21 Share Posted June 21 I do not know what the problem is. Your example runs perfectly, even if I put it in a folder with non-English characters. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Yue Posted June 21 Author Share Posted June 21 I'll try another hard drive, maybe that's it. Quote Link to comment Share on other sites More sharing options...
Josh Posted June 21 Share Posted June 21 You should check to make sure LoadPackage is returning a value. Right now we don't know what command is causing the problem: local p = LoadPackage("Maps.zip") if p == nil then Print("Failed to load package") else p:SetPassword("1500") end Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Yue Posted June 22 Author Share Posted June 22 I have this, but it still doesn't go past loading the package, I don't get any information in the debugger before closing, just that it's loading the package. If for example I put a zip that doesn't exist, I get this back. Quote Link to comment Share on other sites More sharing options...
Yue Posted June 22 Author Share Posted June 22 Only script load pack. Crash. Quote Link to comment Share on other sites More sharing options...
Yue Posted June 22 Author Share Posted June 22 What I perceive is that it stays inside the command to load the package and the automatic closing happens, it is very strange Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.