Einlander Posted June 13, 2017 Share Posted June 13, 2017 With the last update the new default main.lua causes crashes when run. The old main.lua still works though. --edit-- Simply commenting out all the gui related related lines causes the game to 'Assert Failed' at world:Render() Link to comment Share on other sites More sharing options...
Einlander Posted June 13, 2017 Author Share Posted June 13, 2017 Further experimentation on my amd system (r9 390) System:GetGraphicsMode() returns vec2(0,0) for all screen modes for i=0 , System:CountGraphicsModes() do System:Print(i) System:Print(System:GetGraphicsMode(i).x .." " .. System:GetGraphicsMode(i).y) end Link to comment Share on other sites More sharing options...
Einlander Posted June 13, 2017 Author Share Posted June 13, 2017 The solution that I found is to use a ternary operator to fix it. add this after line 21: gfxmode = Vec2( (gfxmode.x <= 0 and 1280 or gfxmode.x) , (gfxmode.x <= 0 and 720 or gfxmode.x)) This will make sure the window is > (0,0), if not it will set it to 720p(16:9) . This will not effect the game if it is running properly. Think of it as safe mode like gta5 has, except it doesn't start at the absolute safest resolution (640,480). I need to do some looking into menu.lua to make sure it doesn't mess up when you select the non existent screen modes. (It gives you the option to select 0x0 screen res :/ ) Link to comment Share on other sites More sharing options...
Einlander Posted June 14, 2017 Author Share Posted June 14, 2017 in menu.lua add this after line 249: gfxmode = {tostring(tonumber(gfxmode[1]) <= 0 and 1280 or gfxmode[1]) , tostring(tonumber(gfxmode[2]) <= 0 and 720 or gfxmode[2])} Does the same as the above. it will only catch if the screenres is (0,0) or lower then set it to 720p. This is just a failsafe for when a screen resolution is unable to be selected. Think gta 4 for people with more than 2gb of video ram iirc. The game was unable to see all the ram and was unable to see the screen resolutions. Link to comment Share on other sites More sharing options...
Einlander Posted June 14, 2017 Author Share Posted June 14, 2017 When trying to run a fullscreen window you will get a Asser Failed error. <gamename.exe> will simply appear to fail to run. Attempting to run it from explorer or command line will give the same results. Link to comment Share on other sites More sharing options...
macklebee Posted June 14, 2017 Share Posted June 14, 2017 Have you updated the latest iteration of 4.4? There's been an update that fixed this. Just tried it and it works. Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Einlander Posted June 14, 2017 Author Share Posted June 14, 2017 Nope. The update from today broke it. It was always working for me until today. Link to comment Share on other sites More sharing options...
macklebee Posted June 14, 2017 Share Posted June 14, 2017 odd - it stopped working for me last week as shown in the original bug report and by updating tonight it works just fine now. Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Einlander Posted June 14, 2017 Author Share Posted June 14, 2017 Might be an amd thing? Link to comment Share on other sites More sharing options...
Josh Posted June 14, 2017 Share Posted June 14, 2017 Can you post your code? It will fail if the fullscreen resolution is not supported. 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 14, 2017 Share Posted June 14, 2017 What is your screen resolution and DPI? Your code above should be like this: for i=0 , System:CountGraphicsModes()-1 do 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...
Einlander Posted June 14, 2017 Author Share Posted June 14, 2017 Triple Monitor 1920x1080 on all 3, landscape orientation, (default) 96dpi Even if I didn't use ntGraphicsModes()-1, every resolution except the out of bounds one should have printed correctly. Link to comment Share on other sites More sharing options...
Einlander Posted June 14, 2017 Author Share Posted June 14, 2017 window=Window:Create("Test window",0,0,1920,1080,Window.FullScreen) --Create the graphics context context=Context:Create(window,0) if context==nil then return end while window:KeyDown(Key.Escape)==false do end As simple as I can make it. It will fail at any resolution. System Specs: http://i.imgur.com/46t02gl.png Gfx Card Specs: http://i.imgur.com/wsaj0bL.png Link to comment Share on other sites More sharing options...
Josh Posted June 14, 2017 Share Posted June 14, 2017 This is happening because the available graphics modes are not being returned correctly. It's due to a problem with some Window-specific code that handles DPI calculation. 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 14, 2017 Share Posted June 14, 2017 Is it possible to, in C++, print out this value AFTER CountGraphicsModes() has been called? System::DPIScaling 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...
AggrorJorn Posted June 14, 2017 Share Posted June 14, 2017 Running in to the same problem. I haven't further investigated it yet but just to add some info: 2 monitors: 1920x1080 en 2560×1440 Windows 10 Link to comment Share on other sites More sharing options...
reepblue Posted June 14, 2017 Share Posted June 14, 2017 I think it's a dual monitor issue, everything is good here. (Single Monitor) Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Einlander Posted June 14, 2017 Author Share Posted June 14, 2017 This is what i get if I count the graphics mode from c++ and getting the dpi scaling before and after the count > guitest.debug.exe Error: No debugger hostname supplied in command line. DPI Scaling0.000000 (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) DPI Scaling0.000000 Link to comment Share on other sites More sharing options...
reepblue Posted June 14, 2017 Share Posted June 14, 2017 Find it odd that the default template works, but when using Window.Fullscreen in my code, I'm getting similar issues. Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted June 14, 2017 Share Posted June 14, 2017 If you are having problems, please list your version of Windows (7, 8, 10, etc.) 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 14, 2017 Share Posted June 14, 2017 Please list your Windows version if you are having problems with this. It may be specific to Win 7. 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...
Einlander Posted June 14, 2017 Author Share Posted June 14, 2017 Windows 7 64 Link to comment Share on other sites More sharing options...
reepblue Posted June 14, 2017 Share Posted June 14, 2017 Win10 Pro. Einlander's sample code works, but strangely, my code doesn't work anymore. I might need to do some rewriting. Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
AggrorJorn Posted June 14, 2017 Share Posted June 14, 2017 Windows 10, 64 Link to comment Share on other sites More sharing options...
mdgunn Posted June 14, 2017 Share Posted June 14, 2017 Windows 10 64 Triple monitors. I don't think I see the crash message but I see the project launching in the task bar then just disappears. Link to comment Share on other sites More sharing options...
Recommended Posts