Windows 7: T-engine takes ages to load, is a CPU hog

Moderator: Moderator

Post Reply
Message
Author
Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Windows 7: T-engine takes ages to load, is a CPU hog

#1 Post 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?

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Windows 7: T-engine takes ages to load, is a CPU hog

#2 Post 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!
<DarkGod> lets say it's intended

dusijun
Low Yeek
Posts: 6
Joined: Wed Feb 29, 2012 9:58 am
Location: Singapore
Contact:

Re: Windows 7: T-engine takes ages to load, is a CPU hog

#3 Post 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

dusijun
Low Yeek
Posts: 6
Joined: Wed Feb 29, 2012 9:58 am
Location: Singapore
Contact:

Re: Windows 7: T-engine takes ages to load, is a CPU hog

#4 Post 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

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: Windows 7: T-engine takes ages to load, is a CPU hog

#5 Post by Lord Estraven »

Just FWIW guys, my issue was on Win7 32-bit.

tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

Re: Windows 7: T-engine takes ages to load, is a CPU hog

#6 Post by tiger_eye »

Is this b37 or b38, 'cause it kinda looks like you're using b37 lua code with the b38 executable?
darkgod wrote:OMFG tiger eye you are my hero!

dusijun
Low Yeek
Posts: 6
Joined: Wed Feb 29, 2012 9:58 am
Location: Singapore
Contact:

Re: Windows 7: T-engine takes ages to load, is a CPU hog

#7 Post by dusijun »

I update to B38 and rebuid , the error is still there.


Windows 7 b4 Bits

dusijun
Low Yeek
Posts: 6
Joined: Wed Feb 29, 2012 9:58 am
Location: Singapore
Contact:

Re: Windows 7: T-engine takes ages to load, is a CPU hog

#8 Post 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.

dusijun
Low Yeek
Posts: 6
Joined: Wed Feb 29, 2012 9:58 am
Location: Singapore
Contact:

Re: Windows 7: T-engine takes ages to load, is a CPU hog

#9 Post 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.

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: Windows 7: T-engine takes ages to load, is a CPU hog

#10 Post by Lord Estraven »

In that case it's not the same problem. I didn't build the game, I just downloaded the b38 binary.

Post Reply