Page 1 of 1
Windows 7: T-engine takes ages to load, is a CPU hog
Posted: Sat Feb 04, 2012 4:24 pm
by Lord Estraven
Yes, it's another resource usage bug! This time on Windows 7 SP1! ToME4 beta 37 takes more than five minutes to start; during and after startup, it uses ~95% of available CPU time. Win7 handles this a bit more gracefully than Linux (maybe because the graphical server runs at higher priority?) but it still slows everything down quite a bit.
Also, level generation takes even longer than startup, blocks all user input, and happens at inopportune times (like when I'm fiddling with the video preferences).
After about 15 minutes I never even got to start a game. What's going on here?
Re: Windows 7: T-engine takes ages to load, is a CPU hog
Posted: Sat Feb 04, 2012 4:38 pm
by yufra
This sounds like the behavior you see when Lua errors occur during loading. You can try to right-click on your T-Engine executable and tell it to run with the `--flush-stdout` command-line option. Then when the loading really slows down you can force quit the process and search the te4 logfile (in the T-Engine directory) for `Lua error` and post the results. Keep in mind that flushing the logfile does not work perfectly on Windows, so even if this is the issue you may not be able to report the error. Cheers!
Re: Windows 7: T-engine takes ages to load, is a CPU hog
Posted: Wed Feb 29, 2012 10:02 am
by dusijun
Hi, I have the same problem on my Win7 64bits, and I found the error is
@ /engine/Map.lua:196: bad argument #10 to 'newMap' (number expected, got no value)
Details:
[GAMMA] Setting gamma correction using fullscreen shader 1.2
Loading entities file from file /data/zones/dungeon/npcs.lua
Loading entities file from file /data/general/npcs/skeleton.lua
Loading entities file from file /data/general/npcs/canine.lua
Loading entities file from file /data/general/npcs/troll.lua
Loading entities file from file /data/zones/dungeon/grids.lua
Loading entities file from file /data/general/grids/basic.lua
Loading entities file from file /data/general/grids/forest.lua
Loading entities file from file /data/general/grids/water.lua
Loading entities file from file /data/general/grids/underground.lua
Loading entities file from file /data/zones/dungeon/objects.lua
Loading entities file from file /data/zones/dungeon/traps.lua
Initiated zone Forest with base_level 1
Lua Error: /engine/Map.lua:196: bad argument #10 to 'newMap' (number expected, got no value)
At [C]:-1
At [C]:-1 newMap
At /engine/Map.lua:196 makeCMap
At /engine/Map.lua:224 loaded
At /engine/Map.lua:178 init
At /engine/class.lua:38 new
At /engine/Zone.lua:689 newLevel
At /engine/Zone.lua:662 getLevel
At /mod/class/Game.lua:203 changeLevel
At /mod/class/Game.lua:150 newGame
At /mod/class/Game.lua:90 run
At /engine/Module.lua:570 instanciate
At /engine/utils.lua:1214 showMainMenu
At /engine/init.lua:123
At [C]:-1 dofile
At /loader/init.lua:170
Re: Windows 7: T-engine takes ages to load, is a CPU hog
Posted: Wed Feb 29, 2012 10:11 am
by dusijun
I have the same problem, I using win7 64 bits, after I rebuild B37
[SHADER] Loading from /data/gfx/shaders/full_fbo.lua
New GL Shader program 3
New GL Shader 4 of type 35632
[SHADER] created fragment shader from /data/gfx/shaders/full_fbo.frag
*p 3: Uniform: 0: 1406 gamma
*p 3: Uniform: 1: 8B5E sceneBuffer
[GAMMA] Setting gamma correction using fullscreen shader 1.2
Loading entities file from file /data/zones/dungeon/npcs.lua
Loading entities file from file /data/general/npcs/skeleton.lua
Loading entities file from file /data/general/npcs/canine.lua
Loading entities file from file /data/general/npcs/troll.lua
Loading entities file from file /data/zones/dungeon/grids.lua
Loading entities file from file /data/general/grids/basic.lua
Loading entities file from file /data/general/grids/forest.lua
Loading entities file from file /data/general/grids/water.lua
Loading entities file from file /data/general/grids/underground.lua
Loading entities file from file /data/zones/dungeon/objects.lua
Loading entities file from file /data/zones/dungeon/traps.lua
Initiated zone Forest with base_level 1
Lua Error: /engine/Map.lua:196: bad argument #10 to 'newMap' (number expected, got no value)
At [C]:-1
At [C]:-1 newMap
At /engine/Map.lua:196 makeCMap
At /engine/Map.lua:224 loaded
At /engine/Map.lua:178 init
At /engine/class.lua:38 new
At /engine/Zone.lua:689 newLevel
At /engine/Zone.lua:662 getLevel
At /mod/class/Game.lua:203 changeLevel
At /mod/class/Game.lua:150 newGame
At /mod/class/Game.lua:90 run
At /engine/Module.lua:570 instanciate
At /engine/utils.lua:1214 showMainMenu
At /engine/init.lua:123
At [C]:-1 dofile
At /loader/init.lua:170
Re: Windows 7: T-engine takes ages to load, is a CPU hog
Posted: Wed Feb 29, 2012 7:42 pm
by Lord Estraven
Just FWIW guys, my issue was on Win7 32-bit.
Re: Windows 7: T-engine takes ages to load, is a CPU hog
Posted: Wed Feb 29, 2012 7:55 pm
by tiger_eye
Is this b37 or b38, 'cause it kinda looks like you're using b37 lua code with the b38 executable?
Re: Windows 7: T-engine takes ages to load, is a CPU hog
Posted: Thu Mar 01, 2012 3:21 am
by dusijun
I update to B38 and rebuid , the error is still there.
Windows 7 b4 Bits
Re: Windows 7: T-engine takes ages to load, is a CPU hog
Posted: Thu Mar 01, 2012 3:28 am
by dusijun
tiger_eye wrote:Is this b37 or b38, 'cause it kinda looks like you're using b37 lua code with the b38 executable?
Do you mean I need update the source code and and game resource as well?
My game resource is downloaded in B37, and source code is in B38
I will try using game resource in B38.
Re: Windows 7: T-engine takes ages to load, is a CPU hog
Posted: Thu Mar 01, 2012 3:41 am
by dusijun
dusijun wrote:tiger_eye wrote:Is this b37 or b38, 'cause it kinda looks like you're using b37 lua code with the b38 executable?
Do you mean I need update the source code and and game resource as well?
My game resource is downloaded in B37, and source code is in B38
I will try using game resource in B38.
Yes! Problem solved!
This error is due to using newer version executable with lower version of game resource.
Re: Windows 7: T-engine takes ages to load, is a CPU hog
Posted: Sun Apr 08, 2012 5:02 pm
by Lord Estraven
In that case it's not the same problem. I didn't build the game, I just downloaded the b38 binary.