waldi
04-10-2005 15:50:37
another crash...
using ogre 1.0.5, and sdk compatible src of PLSM2 (http://tuan.kuranes.free.fr/paginglandscape.zip).
Added resource location 'Media/terragen16bits' of type 'FileSystem' to resource group 'PLSM2'
alpes.raw
normal Map Calc :
alpes.HN.raw
Map Calc :
alpes.Base.png
alpes.Coverage.png
alpes.Alpha.0.png
alpes.Alpha.1.png
alpes.Alpha.2.png
alpes.Alpha.3.png
Horizon Map Calc : alpes.HS.png
alpes.L.png
gcanyon_height_4k2k.png
normal Map Calc :
gcanyon_height_4k2k.HN.png
gcanyon_texture_4k2k..png
Map Calc :
gcanyon_height_4k2k.Base.png
gcanyon_height_4k2k.Coverage.png
gcanyon_height_4k2k.Alpha.0.png
gcanyon_height_4k2k.Alpha.1.png
gcanyon_height_4k2k.Alpha.2.png
gcanyon_height_4k2k.Alpha.3.png
Horizon Map Calc : gcanyon_height_4k2k.HS.png
gcanyon_height_4k2k.L.png
ps_height_1k.png
normal Map Calc :
ps_height_1k.HN.png
ps_texture_1k..png
Segmentation fault (core dumped)
maybe this helps:
using ogre 1.0.5, and sdk compatible src of PLSM2 (http://tuan.kuranes.free.fr/paginglandscape.zip).
Added resource location 'Media/terragen16bits' of type 'FileSystem' to resource group 'PLSM2'
alpes.raw
normal Map Calc :
alpes.HN.raw
Map Calc :
alpes.Base.png
alpes.Coverage.png
alpes.Alpha.0.png
alpes.Alpha.1.png
alpes.Alpha.2.png
alpes.Alpha.3.png
Horizon Map Calc : alpes.HS.png
alpes.L.png
gcanyon_height_4k2k.png
normal Map Calc :
gcanyon_height_4k2k.HN.png
gcanyon_texture_4k2k..png
Map Calc :
gcanyon_height_4k2k.Base.png
gcanyon_height_4k2k.Coverage.png
gcanyon_height_4k2k.Alpha.0.png
gcanyon_height_4k2k.Alpha.1.png
gcanyon_height_4k2k.Alpha.2.png
gcanyon_height_4k2k.Alpha.3.png
Horizon Map Calc : gcanyon_height_4k2k.HS.png
gcanyon_height_4k2k.L.png
ps_height_1k.png
normal Map Calc :
ps_height_1k.HN.png
ps_texture_1k..png
Segmentation fault (core dumped)
maybe this helps:
#0 0xb71d007f in memcpy () from /lib/tls/libc.so.6
(gdb) bt
#0 0xb71d007f in memcpy () from /lib/tls/libc.so.6
#1 0x0805a03d in Ogre::MapSplitter::BlitSubImage (this=0xbff73540, BaseData=0xb3263008 "â<", OutData=0xb3863008 "â<", x=0,
y=0, tile_width=1026, tile_height=1026, tile_width_copy=1026, tile_height_copy=1026, base_width=1025, bpp=3)
at MapSplitter.cpp:697
#2 0x0805c014 in Ogre::MapSplitter::SplitCurrentMap (this=0xbff73540, filename=@0xbff734a0, page_size=1026)
at MapSplitter.cpp:992
#3 0x0805670d in Ogre::MapSplitter::saveAndSplitMap (this=0xbff73540, filename=@0xbff734a0, newImage=0xbff73450)
at MapSplitter.cpp:109
#4 0x0806131e in Ogre::MapUtil::processOneMap (this=0x8092a70) at MapUtil.cpp:646
#5 0x0805e5ce in Ogre::MapUtil::process (this=0x8092a70) at MapUtil.cpp:219
#6 0x0805ce77 in main (argc=1, argv=0xbff739f4) at MapTool.cpp:46
(gdb) fr 1
#1 0x0805a03d in Ogre::MapSplitter::BlitSubImage (this=0xbff73540, BaseData=0xb3263008 "â<", OutData=0xb3863008 "â<", x=0,
y=0, tile_width=1026, tile_height=1026, tile_width_copy=1026, tile_height_copy=1026, base_width=1025, bpp=3)
at MapSplitter.cpp:697
697 memcpy (dest, src, dest_shift_copy);
(gdb) p dest
$1 = (uchar *) 0xb3b6540e ""
(gdb) p src
$2 = (const uchar *) 0xb356480b ""
(gdb) p dest_shift_copy
$3 = 3078
(gdb) p dest[3077]
$4 = 0 '\0'
(gdb) p src[3077]
Cannot access memory at address 0xb3565410
(gdb) p *src
$5 = 0 '\0'
(gdb) l
682 uchar * const OutData,
683 const uint x, const uint y,
684 const uint tile_width, const uint tile_height,
685 const uint tile_width_copy, const uint tile_height_copy,
686 const uint base_width,
687 const uint bpp)
688 {
689 const uint src_shift = bpp * base_width;
690 const uint dest_shift = bpp * tile_width;
691 const uint dest_shift_copy = bpp * tile_width_copy;
692
693 const uchar *src = BaseData + y*src_shift + bpp*x;
694 uchar *dest = OutData;
695 for (uint j = 0; j < tile_height_copy; j++)
696 {
697 memcpy (dest, src, dest_shift_copy);
698 dest += dest_shift;
699 src += src_shift;
700 }
701 }
702 //-----------------------------------------------------------------------
703 void MapSplitter::SplitAndSpaceCurrentMap(const String &filename,
704 const int tile_spacing,
705 const int page_size)
706 {
707 const uint base_image_width = static_cast <uint> (mCurrentMap->getWidth ());
708 const uint base_image_height = static_cast <uint> (mCurrentMap->getHeight ());
709 const uint base_image_bypp = static_cast < uint > (PixelUtil::getNumElemBytes (mCurrentMap->getFormat ()));
710
711
(gdb) p j
$6 = 1025
(gdb) p tile_height_copy
$7 = 1026