Hard-freezes and System Reboots using cvs HEAD

fiesch

15-12-2005 12:41:16

Hi there.. maybe I'm just plain dumb but i can't get any custom terrain i make shown right in my app with PLSM2.

Whenever there's something splatting-related in the texture-mode, no matter which one, my system just freezes, the second tft i use for tool windows looses the input signal and powers down and that's it..

I've tried using a 4096x4096 grayscale png with the mapsplitter but that just knocked itsself out in the OgreMemManager, being obviousely out-of-mem while calculating the normal maps.

got it working with a 1024x1024 scaled version of the png and i have all the maps you could possibly wish for, normal maps, alpha maps, base maps, coverage, texture etc etc etc.

I'm actually trying to integrate this into my in-game editor which nears completion in it's basic features and which has already a nice Terrain Geom-Edit functionality thanks to your code... but this just won't work.

I've played around with the gen.cfg and .cfg files for days now, rebooting the machine around 30 times a day or more due to the freezeups...

well first things first.. I'm having a real hard time finding the error since the freezeups occur on pageLoad, not on terrain-load (meaning i can see the scene without terrain for a frame or two before it freezes up).. so stepping through is not that easy but I'll try to step-debug the page loading code when i get the chance.

Second: it's a really bad thing that the PLSM2 code can freeze the system up and even auto-reboot it(that might have been due to ATI Vpu recover).. i don't have an idea right now how that happened or where the freezes could come from (most probably and infnite loop on page loading)
but there's certainly a safety check or two missing that would crash the app when sth like that occurs instead of locking the OS.

Third: I was having a real hard time finding out how to use some of the Options in the set/getOption mechanism since they're just not documented, i hope there will be the time for eithe ryou or me in the future to get back to that problem (which a major portion of the PLSM2 code has, btw)

Fourth: The documentation on splatting modes and the techniques incorporated in each one is a little confusing to me, as it appears to be for some others on the forum as that has had it's own thread recently, maybe either you could give me a crash course on it and I complete the documentation or you might find the time to do it yourself, anyway I'd really appreciate some more insight on this.

thx for now

[Edit]

Fifth: (i forgot about this) the PLSM2 manager only cares in part about changed ResourceGroups in the terrain-definition.
When i set it to EG_Terrain in which the config files for the terrain and all data are, it tries to load texture files from either "General" or "PLSM2" which i also find a bit confusing..


Here are the config-files used: (i don't know if i synced the last modifications yet so they might look a bit odd)

eg_base_small.cfg

GroupName=EG_Terrain
TextureStretchFactor=2
Data2DFormat=HeightField
LandScapeFileName=eg_base_small

#TextureFormat=Splatting7Edit
TextureFormat=Image
ImageFilename=eg_base_small_texture

ScaleX=15000
ScaleY=1000
ScaleZ=15000

#Deformable=yes
#VertexCompression=yes
#VertexProgramMorph=yes
#VertexNormals=yes

NumMatHeightSplat=4
MaterialHeight1=15
MaterialHeight2=50
MaterialHeight3=80
MaterialHeight4=95
SplatFilename0=splatting_sand.png
SplatFilename1=splatting_grass.png
SplatFilename2=splatting_rock.png
SplatFilename3=splatting_snow.png

# where to put camera on load.
BaseCameraViewpoint.x=935.0f
BaseCameraViewpoint.y=24000.0f
BaseCameraViewpoint.z=-432.0f

Baselookat.x=0.0f
Baselookat.y=0.0f
Baselookat.z=0.0f


eg_base_small.gen.cfg

GroupName=EG_Terrain
LandScapeFileName=eg_base_small
TextureStretchFactor=2

ScaleX=1.5
ScaleY=1
ScaleZ=1.5

OutDirectory=../../../../Samples/Media/eg_base


Data2DFormat=HeightField

ColorMapName=eg_base_small_texture.png
ColorMapSplit=yes


HeightMap=yes
BaseMap=yes
CoverageMap=yes
AlphaMaps=yes
NormalMap=yes
#ZHorizon=yes

#LightMap=yes
#Sunx=0.0f
#Suny=0.88f
#Sunz=0.47f
#Ambient=0.5f
#Diffuse=0.5f
#Blur=0.0f

MiniMap=yes
MiniMapWidth=64
MiniMapHeight=64

NumMatHeightSplat=4

MaterialHeight1=12
MaterialHeight2=35
MaterialHeight3=80
MaterialHeight4=95

AvgColorsExists=yes

#Sand
MaterialColor0.r=0.0f
MaterialColor0.g=0.0f
MaterialColor0.b=1.0f
#Grass
MaterialColor1.r=0.145f
MaterialColor1.g=0.624f
MaterialColor1.b=0.0f
#Rock
MaterialColor2.r=0.411764f
MaterialColor2.g=0.811764f
MaterialColor2.b=0.811764f
#Rock
MaterialColor3.r=0.411764f
MaterialColor3.g=0.811764f
MaterialColor3.b=0.811764f
#Snow
MaterialColor4.r=1.0f
MaterialColor4.g=0.0f
MaterialColor4.b=0.0f


Maptool config used for generation:

DefaultMap=eg_terrain

eg_terrain=eg_base.gen
#eg_terrain_mid=eg_base_mid.gen
eg_terrain_small=eg_base_small.gen
#puget_sound=puget_1k.gen
#grand_canyon=gcanyon_height_4k2k.gen
#terragen_genrated=terragen16bits.gen
#European_Alpes=Alpes.gen
#TSM=TsmTerrain.gen

# resource group name
GroupName=EG_Terrain
#GroupName=PLSM2

#do you want to run it on all maps listed here
BatchMode=no



matching resources.cfg (from the samples/common dir):

# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
Zip=../../../Media/packs/OgreCore.zip

# Resource locations to be added to the default path
[General]
FileSystem=../../../Media
FileSystem=../../../Media/fonts
FileSystem=../../../Media/materials/programs
FileSystem=../../../Media/materials/scripts
FileSystem=../../../Media/materials/textures
FileSystem=../../../Media/models
FileSystem=../../../Media/overlays
FileSystem=../../../Media/particle
FileSystem=../../../Media/gui
FileSystem=../../../Media/DeferredShadingMedia
Zip=../../../Media/packs/cubemap.zip
Zip=../../../Media/packs/cubemapsJS.zip
Zip=../../../Media/packs/dragon.zip
Zip=../../../Media/packs/fresneldemo.zip
Zip=../../../Media/packs/ogretestmap.zip
Zip=../../../Media/packs/skybox.zip

[PLSM2]
FileSystem=../../../Media/paginglandscape2

FileSystem=../../../Media/paginglandscape2/gui
FileSystem=../../../Media/paginglandscape2/fonts
FileSystem=../../../Media/paginglandscape2/models
FileSystem=../../../Media/paginglandscape2/overlays
FileSystem=../../../Media/paginglandscape2/materials
#FileSystem=../../../Media/paginglandscape2/materials/scripts
FileSystem=../../../Media/paginglandscape2/materials/textures
FileSystem=../../../Media/paginglandscape2/materials/programs

FileSystem=../../../Media/paginglandscape2/datasrcs
FileSystem=../../../Media/paginglandscape2/terrains
#FileSystem=../../../Media/paginglandscape2/terrains/alpes
#FileSystem=../../../Media/paginglandscape2/terrains/eg_base
#FileSystem=../../../Media/paginglandscape2/terrains/hf129_3
FileSystem=../../../Media/paginglandscape2/terrains/TsmTerrain
#FileSystem=../../../Media/paginglandscape2/terrains/ps_height_1k
#FileSystem=../../../Media/paginglandscape2/terrains/terragen16bits
#FileSystem=../../../Media/paginglandscape2/terrains/gcanyon_height_4k2k

[EG_Terrain]
FileSystem=../../../Media/eg_base


the paginglandscape2.cfg used in my app:

GroupName=EG_Terrain

DefaultMap=EG_Default
#DefaultMap=TSM



EG_Default=eg_base_small
#TSM=TsmTerrain

def=Default



# resource group name where to find map definition

#GroupName=PLSM2
VertexNormals=yes
VertexLit=yes



# Try forbidden textureformat combinations

TextureFormatDebug=no


# Under Cam make LOD always at max, no matter how simple is the tile
MaxLodUnderCam=yes


and the dir-dump of the folder with terrain-data:

Volume in Laufwerk C: hat keine Bezeichnung.
Volumeseriennummer: E003-EA5E

Verzeichnis von C:\dev\client\Media\EG_Terrain

15.12.2005 13:40 <DIR> .
15.12.2005 13:40 <DIR> ..
15.12.2005 13:40 0 dir.txt
14.12.2005 19:41 711 eg_base.cfg
14.12.2005 03:53 1.056 eg_base.gen.cfg
14.12.2005 22:30 88.323 eg_base_small.0.0.png
14.12.2005 22:30 85.413 eg_base_small.0.1.png
14.12.2005 22:30 82.756 eg_base_small.1.0.png
14.12.2005 22:30 86.387 eg_base_small.1.1.png
14.12.2005 22:30 1.228 eg_base_small.Alpha.0.0.0.png
14.12.2005 22:30 3.958 eg_base_small.Alpha.0.0.1.png
14.12.2005 22:30 25.613 eg_base_small.Alpha.0.1.0.png
14.12.2005 22:30 3.883 eg_base_small.Alpha.0.1.1.png
14.12.2005 22:30 67.810 eg_base_small.Alpha.1.0.0.png
14.12.2005 22:30 37.001 eg_base_small.Alpha.1.0.1.png
14.12.2005 22:30 93.845 eg_base_small.Alpha.1.1.0.png
14.12.2005 22:30 48.228 eg_base_small.Alpha.1.1.1.png
14.12.2005 22:30 399.431 eg_base_small.Alpha.2.0.0.png
14.12.2005 22:30 355.329 eg_base_small.Alpha.2.0.1.png
14.12.2005 22:30 356.405 eg_base_small.Alpha.2.1.0.png
14.12.2005 22:30 333.789 eg_base_small.Alpha.2.1.1.png
14.12.2005 22:30 352.176 eg_base_small.Alpha.3.0.0.png
14.12.2005 22:30 335.447 eg_base_small.Alpha.3.0.1.png
14.12.2005 22:30 293.671 eg_base_small.Alpha.3.1.0.png
14.12.2005 22:30 299.309 eg_base_small.Alpha.3.1.1.png
14.12.2005 22:30 163.086 eg_base_small.Base.0.0.png
14.12.2005 22:30 121.877 eg_base_small.Base.0.1.png
14.12.2005 22:30 212.382 eg_base_small.Base.1.0.png
14.12.2005 22:30 132.966 eg_base_small.Base.1.1.png
14.12.2005 23:13 757 eg_base_small.cfg
14.12.2005 22:30 691.352 eg_base_small.Coverage.0.0.png
14.12.2005 22:30 603.126 eg_base_small.Coverage.0.1.png
14.12.2005 22:30 674.483 eg_base_small.Coverage.1.0.png
14.12.2005 22:30 548.027 eg_base_small.Coverage.1.1.png
14.12.2005 19:52 1.054 eg_base_small.gen.cfg
14.12.2005 22:30 1.411.581 eg_base_small.N.0.0.png
14.12.2005 22:30 1.453.656 eg_base_small.N.0.1.png
14.12.2005 22:30 1.316.724 eg_base_small.N.1.0.png
14.12.2005 22:30 1.368.590 eg_base_small.N.1.1.png
14.12.2005 22:30 342.596 eg_base_small.Nsmall.0.0.png
14.12.2005 22:30 339.898 eg_base_small.Nsmall.0.1.png
14.12.2005 22:30 335.345 eg_base_small.Nsmall.1.0.png
14.12.2005 22:30 336.016 eg_base_small.Nsmall.1.1.png
14.12.2005 03:54 267.025 eg_base_small.png
14.12.2005 22:30 4.723 eg_base_small.Small.png
14.12.2005 22:30 160.536 eg_base_small_texture.0.0.png
14.12.2005 22:30 157.951 eg_base_small_texture.0.1.png
14.12.2005 22:30 137.826 eg_base_small_texture.1.0.png
14.12.2005 22:30 159.810 eg_base_small_texture.1.1.png
14.12.2005 03:55 654.320 eg_base_small_texture.png
14.12.2005 22:30 6.641 eg_base_small_texture.Small.png
14.12.2005 01:28 95.974 splatting_grass.png
14.12.2005 01:28 136.287 splatting_rock.png
14.12.2005 01:28 167.413 splatting_sand.png
14.12.2005 01:29 46.892 splatting_snow.png
53 Datei(en) 15.400.683 Bytes
2 Verzeichnis(se), 11.987.087.360 Bytes frei


and the files i needed to have in "General" group to get it to load:

Volume in Laufwerk C: hat keine Bezeichnung.
Volumeseriennummer: E003-EA5E

Verzeichnis von C:\dev\client\Media\EG_Textures

15.12.2005 13:41 <DIR> .
15.12.2005 13:41 <DIR> ..
15.12.2005 13:41 0 dir.txt
14.12.2005 02:25 2.756.948 eg_base.png
14.12.2005 19:52 163.058 eg_base_small.Base.0.0.png
14.12.2005 19:52 120.905 eg_base_small.Base.0.1.png
14.12.2005 19:52 212.382 eg_base_small.Base.1.0.png
14.12.2005 19:52 130.414 eg_base_small.Base.1.1.png
14.12.2005 19:52 691.352 eg_base_small.Coverage.0.0.png
14.12.2005 19:52 603.126 eg_base_small.Coverage.0.1.png
14.12.2005 19:52 674.483 eg_base_small.Coverage.1.0.png
14.12.2005 19:52 548.027 eg_base_small.Coverage.1.1.png
14.12.2005 19:52 1.411.581 eg_base_small.N.0.0.png
14.12.2005 19:52 1.453.656 eg_base_small.N.0.1.png
14.12.2005 19:52 1.316.724 eg_base_small.N.1.0.png
14.12.2005 19:52 1.368.590 eg_base_small.N.1.1.png
14.12.2005 19:52 342.596 eg_base_small.Nsmall.0.0.png
14.12.2005 19:52 339.898 eg_base_small.Nsmall.0.1.png
14.12.2005 19:52 335.345 eg_base_small.Nsmall.1.0.png
14.12.2005 19:52 336.016 eg_base_small.Nsmall.1.1.png
14.12.2005 03:54 267.025 eg_base_small.png
14.12.2005 19:52 4.971 eg_base_small.Small.png
14.12.2005 19:52 160.536 eg_base_small_texture.0.0.png
14.12.2005 19:52 157.951 eg_base_small_texture.0.1.png
14.12.2005 19:52 137.826 eg_base_small_texture.1.0.png
14.12.2005 19:52 159.810 eg_base_small_texture.1.1.png
14.12.2005 03:55 654.320 eg_base_small_texture.png
14.12.2005 19:52 6.641 eg_base_small_texture.Small.png
14.12.2005 02:33 4.604.701 eg_base_texture.png
19.10.2005 00:51 347.398 sky_volume_back.jpg
19.10.2005 00:51 4.194.322 sky_volume_back.tga
19.10.2005 00:51 263.987 sky_volume_front.jpg
19.10.2005 00:51 4.194.322 sky_volume_front.tga
19.10.2005 00:51 219.809 sky_volume_left.jpg
19.10.2005 00:51 4.194.322 sky_volume_left.tga
19.10.2005 00:51 357.187 sky_volume_right.jpg
19.10.2005 00:51 4.194.322 sky_volume_right.tga
19.10.2005 00:51 290.565 sky_volume_up.jpg
36 Datei(en) 37.215.116 Bytes
2 Verzeichnis(se), 11.986.984.960 Bytes frei

Falagard

15-12-2005 20:19:41

I hate to be the bearer of bad news, but you have some bad ram or a faulty video card if you're getting system freezes and reboots.

fiesch

16-12-2005 14:09:35

hm yes i actually thought about that, too..
but that's really very unlikely...
itÄs a brand new system used for very heavy compiling and i also had it over at a LAN-session last weekend and it didn't have any problems under 3-day power gaming either...

The >only< thing that freezes the system is PLSM2... like i said i have no idea why but i really think it might be a infinite loop..

As a timespot just opened this evening (with me being unabled to attend a gig) I'll have a intense look on it tonight, hopefully I'll get to it in a devastating 1-hour step-by-step debugging frenzy.

tuan kuranes

16-12-2005 14:42:42

1) CVS ? plsm2 does lock/freezes on which Splatting Texture Mode ? All ?
"Image" texturemode does Work ?

2) 4096x4096 grayscale png => make sure TextureStretchFactor=1 unless you have several Gb of RAM. (paged mapsplitter is on TODO list only...)

3) Yes, there's a documentation problem, getOption setOption are mainly documented on PLSM2 thread on the ogre main forums. A Wiki Page about that should really be done soon.

4) Use the wiki page about texture modes to talk/point out documentation problem on texture modes.

5) Strange, perhaps a CVS HEAD change not fixed in code, I'm syncing with latest CVS HEAD so I'll see that.


If you wish you can send me the map so that I can reproduce the freeze/lock and find what went wrong.

set MaxLodUnderCam=no, as it's experimental.

tuan kuranes

16-12-2005 15:33:44

follow up to 5), CVS HEAD synced and no bug related to that.

I'll try to reproduce using your config files, with a dumb 16 bits raw map (bug is surely data independant) but to be sure, from the .gen.cfg you seems to use a png.

So bug occurs on 8 or 16 bits, png or Raw ?

fiesch

16-12-2005 16:39:32

hm just checked it again - with these settings and maps it even freezes on me with image texture mode.

I'll try to re-run the mapsplitter with scaling = 1 just to be sure it's not related to that...

About the wiki stuff.. I'll have a look in the main forums and try to cook sth up..

Unfortunately i can't upload the maps.. it's 29MB and I'm at a very slow german ISDN line for the next two or three weeks. Anyway I'll have a look into it later tonight and I'll get back to you as soon as i find sth out.

btw.. here are some more details:

AMD Athlon 64 3000+
Radeon 9250
512 MB Ram

PNGS fed to the mapSplitter: 1024x1024
Texture: 24 bit
Heightmap: 8 bit

fiesch

16-12-2005 17:56:55

the 4096 png map conversion is stable now with the scaling=1 setting, so is for some reason the image texturing mode...

but i just tried Splatting2 again and it freezed again..

tuan kuranes

16-12-2005 18:59:59

By scaling you mean TextureStretchFactor or scaling.x, scaling.y, etc ?

Make sure TextureStretchFactor is consistent between .gen.cfg and .cfg otherwise you'll be loading incorrectly sized alpha texture... (set a breakpoint in PagingLandScapeTexture_Splatting2::LoadAlphaMap()) which could easily leads to an ATI driver segfault.

fiesch

16-12-2005 20:44:21

i was referring to TextureStretchFactor, yes.

I double-checked the consistency between .gen.cfg and .cfg as that was mentionned in a earlier thread already..

still haven't had the time to step through the code, I hope I'll have the time later tonight

fiesch

16-12-2005 20:51:53

Hm do you have a link to the thread on the main forums where the get/setOption possibilities are explained? can't seem to find it

tuan kuranes

17-12-2005 06:54:38

from some serch try, it's on several threads, so I started a page :
http://www.ogre3d.org/wiki/index.php/Pa ... ger_Option

fiesch

17-12-2005 12:09:18

great, thanks

tuan kuranes

17-12-2005 13:30:13

still have a lot to write tough...
btw, paginglandscape2.cfg doesn't support terrain specific option (VertexNormals, VertexLit, MaxLodUnderCam are not supposed to be here.)

tuan kuranes

17-12-2005 13:55:01

cannot reproduce the lock / freeze segfault here.

And you've forgot to precise width and height for the map.
if 1024 it's

Width=2
Height=2


4096 would give

Width=8
Height=8

tuan kuranes

17-12-2005 14:15:43

fixed in CVS.
Height and Width are now mandatory.

fiesch

17-12-2005 15:25:23

k I'll try that..
I've "narrowed" the freeze down to the actual rendering, stepped through the loading steps, they're safe

fiesch

18-12-2005 05:00:11

hm btw the width/height thing didn't work..
I actually am postponing his issue to early next week now as I'll have access to a new system then with a radeon mobility X700, gotta see if it freezes there, too

tuan kuranes

18-12-2005 14:17:41

Very strange bugs you get there, indeed.
Cannot reproduce the material resource group problem as well.

fiesch

18-12-2005 15:30:08

I was actually abled to track that one down...
the "error" occurs in texture loading, you're cloning the material from the loaded definition and set the texture by hand...

Problem there is the definition is (or here rather was) still in the PLSM2 group while the texture was in EG_Terrain... and so Ogre tried to load all of the texture from "PLSM2"

tuan kuranes

18-12-2005 16:24:35

Ok, I see the problem.
A Config Variable named "TextureModeMaterialGroup" could do the trick ?

fiesch

18-12-2005 18:28:55

hm something like that, yes.. is there already a variable like that?

tuan kuranes

18-12-2005 19:45:40

Not now, but as it seems a good idea, I'll add it asap.
But what about splatting_*.png ?

From a content based point of view, it should be in the Terrain groupName, not in the texturemodemateriagroupname... no ?

fiesch

18-12-2005 20:33:50

yes, basically it's not a bug.. it really should all be in the same group anyway, that's the setup i use now, anyway

tuan kuranes

19-12-2005 16:03:27

Texture problem is fixed in CVS.
(without another option variable, that is.)

Still no lock or freezes that would help debugging the other bug.