crash running latest MapSplitter?

pagan

22-02-2006 14:43:05

Hi,
First of all, great work on PLSM! The demo is impressive and I'm working towards integrating it with my latest project.

I downloaded the latest source out of CVS this morning and following the Wiki instructions I'm trying to run MapSplitter when I get a crash.

It appears that in MapUtil::LoadDataFromSource() there is a new
PagingLandScapeData2D_HeightField created with a NULL PagingLandScapeData2DManager. The crash occurs when trying to access a null mParent member in the PagingLandScapeData2D_HeightField constructor.

This is the call stack:
> Ogre::PagingLandScapeData2DManager::getOptions() Line 113
Ogre::PagingLandScapeData2D_HeightField::PagingLandScapeData2D_HeightField(Ogre::PagingLandScapeData2DManager * dataMgr=0x00000000) Line 55
Ogre::MapUtil::LoadDataFromSource() Line 480
Ogre::MapUtil::processOneMap() Line 525
Ogre::MapUtil::process() Line 335
main(int argc=1, char * * argv=0x003d80d0) Line 48
__tmainCRTStartup() Line 586
mainCRTStartup() Line 403

This being my first build of PLSM, its not unforseable that I'm missing something. Anyway, hope this helps,
Thanks!

- pagan

tuan kuranes

22-02-2006 17:12:34

CVS bug.
I'll look after that asap.
Thanks to point that out.

tuan kuranes

22-02-2006 17:30:29

Seems that the bug may take time to fix, so... Note that you can use demo mapslitted files wiht CVS plsm2 plugin.

tuan kuranes

22-02-2006 19:12:30

fixed in CVS.

mihaim

26-02-2006 11:14:54

Hello again,
when i run MapSplitter i'm getting a seg fault:


Width : 2049 Height : 2049 Bpp : 3
ps_texture_1k..png
created : ps_texture_1k.0.0.png
created : ps_texture_1k.0.1.png
created : ps_texture_1k.1.0.png
created : ps_texture_1k.1.1.png
Fatal signal: Segmentation Fault (SDL Parachute Deployed)


Running it from gdb gives this info:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 8675)]
0x08058087 in Ogre::MapSplitter::SplitAndSpaceHeightData (this=0xbfb995c0, filename=@0x80a5040, Heightdata=0x41de2008, width=1025,
height=1025, tile_spacing=1, page_size=512) at MapSplitter.cpp:168
168 assert (Heightdata[i] * divider <= 65535);




(gdb) bt
#0 0x08058087 in Ogre::MapSplitter::SplitAndSpaceHeightData (this=0xbfb995c0, filename=@0x80a5040, Heightdata=0x41de2008, width=1025,
height=1025, tile_spacing=1, page_size=512) at MapSplitter.cpp:168
#1 0x08057f75 in Ogre::MapSplitter::saveAndSpaceAndSplitHeightData (this=0xbfb995c0, filename=@0x80a5040, Heightdata=0x41de2008,
width=1025, height=1025) at MapSplitter.cpp:148
#2 0x080681c1 in Ogre::MapUtil::processOneMap (this=0x80a5040) at MapUtil.cpp:657
#3 0x08063491 in Ogre::MapUtil::process (this=0x80a5040) at MapUtil.cpp:333
#4 0x08060fab in main (argc=1, argv=0xbfb996e4) at MapTool.cpp:46


I hope this infos helps . thx,
Mihai

tuan kuranes

27-02-2006 08:13:25

If you can give me the value of "filename" in the call stack it would help a lot.
I'll look that asap.

mihaim

27-02-2006 10:44:19


(gdb) print filename
$1 = (const String &) @0x80a5040: {static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<No data fields>},
_M_p = 0x87285ec "ps_height_1k.png"}, static _S_empty_rep_storage = {0, 0, 0, 0}}


(gdb) print Heightdata
$2 = (Real *) 0x41df5008

(gdb) print Heightdata[0]
Cannot access memory at address 0x41df5008

tuan kuranes

27-02-2006 11:18:10

Thanks.
Looking at it.

tuan kuranes

27-02-2006 14:29:07

Fixed in CVS.