Opened 12 years ago

Closed 12 years ago

#1679 closed defect (fixed)

Running from zipped archive broken since r12643

Reported by: ricotz Owned by:
Priority: Release Blocker Milestone: Alpha 12
Component: Core engine Keywords:
Cc: Patch:

Description

r12643 introduced some incompatible usage of tex_decode() in source/renderer/SkyManager.cpp which broke it.

Program received signal SIGSEGV, Segmentation fault. tga_is_hdr (file=0x0) at ../../../source/lib/tex/tex_[tga.cpp:83 tga.cpp:83] 83 ../../../source/lib/tex/tex_tga.cpp: Datei oder Verzeichnis nicht gefunden. (gdb) bt #0 tga_is_hdr (file=0x0) at ../../../source/lib/tex/tex_[tga.cpp:83 tga.cpp:83] #1 0x00000000007cb775 in tex_codec_for_header (file=0x0, file_size=<optimized out>, c=0x7fffffffd370)

at ../../../source/lib/tex/tex_[codec.cpp:88 codec.cpp:88]

#2 0x00000000007cae90 in tex_decode (data=..., dataSize=140737488344416, t=0x7fffffffd4b0) at ../../../source/lib/tex/tex.cpp:720 #3 0x000000000065d2c9 in SkyManager::LoadSkyTextures (this=0x1556440) at ../../../source/renderer/SkyManager.cpp:120 #4 0x00000000005ffe30 in CXMLReader::ReadEnvironment (this=this@entry=0x5897910, parent=...)

at ../../../source/graphics/MapReader.cpp:595

#5 0x0000000000605275 in CXMLReader::ProgressiveRead (this=this@entry=0x5897910) at ../../../source/graphics/MapReader.cpp:998 #6 0x00000000006054d2 in CMapReader::ReadXML (this=0x2b68030) at ../../../source/graphics/MapReader.cpp:1082 #7 0x00000000005fb4d5 in MemFunThunk<CMapReader> (param=0x2d6bd70) at ../../../source/ps/LoaderThunks.h:60 #8 0x0000000000575a7b in LDR_ProgressiveLoad (time_budget=<optimized out>, description=0x7fffffffdc10 L"CMapReader::ReadXML",

max_chars=100, progress_percent=0x7fffffffd96c) at ../../../source/ps/Loader.cpp:228

#9 0x000000000042473d in ProgressiveLoad () at ../../../source/main.cpp:237 #10 Frame () at ../../../source/main.cpp:347 #11 RunGameOrAtlas (argc=argc@entry=1, argv=argv@entry=0x7fffffffdf08) at ../../../source/main.cpp:507 #12 0x000000000041aa27 in main (argc=1, argv=0x7fffffffdf08) at ../../../source/main.cpp:550 (gdb) bt full #0 tga_is_hdr (file=0x0) at ../../../source/lib/tex/tex_[tga.cpp:83 tga.cpp:83]

hdr = 0x0

#1 0x00000000007cb775 in tex_codec_for_header (file=0x0, file_size=<optimized out>, c=0x7fffffffd370)

at ../../../source/lib/tex/tex_[codec.cpp:88 codec.cpp:88]

func = "tex_codec_for_header"

#2 0x00000000007cae90 in tex_decode (data=..., dataSize=140737488344416, t=0x7fffffffd4b0) at ../../../source/lib/tex/tex.cpp:720

status_ = <optimized out> c = 0xb26140 <LINE_176_> min_hdr_size = <optimized out> func = "tex_decode" hdr_size = <optimized out>

#3 0x000000000065d2c9 in SkyManager::LoadSkyTextures (this=0x1556440) at ../../../source/renderer/SkyManager.cpp:120

file = {px = 0x0, pn = {pi_ = 0x0}} tex = {data = {px = 0x0, pn = {pi_ = 0x0}}, dataSize = 92896376, ofs = 4332334924175824896, w = 140737488344688,

h = 7944156, bpp = 140737488344448, flags = 45331021}

data = <optimized out> path = {path = {static npos = <optimized out>,

_M_dataplus = {<std::allocator<wchar_t> > = {< gnu_cxx::new_allocator<wchar_t>> = {<No data fields>}, <No data fields>}, _M_p = 0x588bb88 L"art/textures/skies/sunny/front.dds"}}, separator = 47 L'/'}

fileSize = 140737488344416 i = <optimized out> types = {34069, 34070, 34073, 34074, 34071, 34072} images = {0x849590 L"front", 0x8495a8 L"back", 0x8495bc L"right", 0x8495d4 L"left", 0x8495e8 L"top", 0x8495e8 L"top"}

#4 0x00000000005ffe30 in CXMLReader::ReadEnvironment (this=this@entry=0x5897910, parent=...)

at ../../../source/graphics/MapReader.cpp:595

element_name = 19 attrs = {Count = 0, m_Pointer = 0x7fffc9d672a2 "f", m_LastItemID = -2, m_LastPointer = 0xb <Address 0xb out of bounds>} _i_582 = <optimized out> el_skyset = 19 el_suncolour = 20 el_terrainambientcolour = 24 el_water = 28 el_height = 6 el_waviness = 30 at_r = 3 func = "ReadEnvironment " el_lightingmodel = 7 el_type = 26 el_murkiness = 8 el_unitsambientcolour = 27 el_colour = 1 el_shininess = 18 _children_582 = {Count = 8, m_Pointer = 0x7fffc9d6724c ".", m_LastItemID = 1, m_LastPointer = 0x7fffc9d6727a "("} element = {m_Pointer = 0x7fffc9d6727a "("} el_tint = 25 el_reflectiontint = 13 el_reflectiontintstrength = 14 el_sunelevation = 21 el_sunrotation = 22 el_waterbody = 29 at_g = 2 at_b = 1

#5 0x0000000000605275 in CXMLReader::ProgressiveRead (this=this@entry=0x5897910) at ../../../source/graphics/MapReader.cpp:998

node = {m_Pointer = 0x7fffc9d67234 "V\004"} name = {<std::basic_string<char, std::char_traits<char> , std::allocator<char> >> = {static npos = <optimized out>,

_M_dataplus = {<std::allocator<char> > = {< gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},

_M_p = 0x58a56b8 "Environment"}}, <No data fields>}

end_time = 16.110986674999999 ret = <optimized out> func = "ProgressiveRead "

#6 0x00000000006054d2 in CMapReader::ReadXML (this=0x2b68030) at ../../../source/graphics/MapReader.cpp:1082

ret = <optimized out>

#7 0x00000000005fb4d5 in MemFunThunk<CMapReader> (param=0x2d6bd70) at ../../../source/ps/LoaderThunks.h:60

ret = <optimized out>

#8 0x0000000000575a7b in LDR_ProgressiveLoad (time_budget=<optimized out>, description=0x7fffffffdc10 L"CMapReader::ReadXML",

max_chars=100, progress_percent=0x7fffffffd96c) at ../../../source/ps/Loader.cpp:228

lr = @0xb33cc0: {func = 0x5fb4a0 <MemFunThunk <CMapReader>(void*, double)>, param = 0x2d6bd70,

description = {<std::basic_string<wchar_t, std::char_traits<wchar_t> , std::allocator<wchar_t> >> = {

static npos = <optimized out>, _M_dataplus = {<std::allocator<wchar_t> > = {< gnu_cxx::new_allocator<wchar_t>> = {<No data fields>}, <No data fields>}, _M_p = 0x2e7dae8 L"CMapReader::ReadXML"}}, <No data fields>}, estimated_duration_ms = 5800}

t0 = 15.910986078000001 status = <optimized out> elapsed_time = <optimized out> estimated_duration = <optimized out> ret = <optimized out> time_left = <optimized out> func = "LDR_ProgressiveLoad" new_description = <optimized out> progress = 0

#9 0x000000000042473d in ProgressiveLoad () at ../../../source/main.cpp:237

ret = <optimized out> profile = {<No data fields>} profile2 = {m_Name = 0x813c8b "progressive load"} description = L"CMapReader::ReadXML\000p\000Settings\000\xf4a694e0\001\000\xb1f8f0\000\000\000\000\000\000\000\000\000\xf7de8784\001\000\000\xf449ab48\xb36910\000\xffffdf00\001\000\xffffddf0\xffffdf08\xffffdf00\xf7def245\x5056bcca\000\xf44d2478\xf6a9e910\000\x341c9de9\x5056bcca\000\001\000\xffffddf0\xf44d1f81\000\x586e7c\000\xf44a31d0\xf484c6a8\xb36910\000\001\000\x839d99\000\x839da0" progress_percent = 29

#10 Frame () at ../../../source/main.cpp:347

realTimeSinceLastFrame = 0.00226672413 need_render = 255 profile2 = {m_Name = 0x84ac27 "frame"} time = <optimized out> need_update = true

#11 RunGameOrAtlas (argc=argc@entry=1, argv=argv@entry=0x7fffffffdf08) at ../../../source/main.cpp:507

args = {m_Args = {<std::_Vector_base<std::pair<CStr8, CStr8> , std::allocator<std::pair<CStr8, CStr8> > >> = {

_M_impl = {<std::allocator<std::pair<CStr8, CStr8> >> = {< gnu_cxx::new_allocator<std::pair<CStr8, CStr8> >> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}, m_Arg0 = {path = { static npos = <optimized out>, _M_dataplus = {<std::allocator<wchar_t> > = {< gnu_cxx::new_allocator<wchar_t>> = {<No data fields>}, <No data fields>}, _M_p = 0xb36b48 L"/usr/games/pyrogenesis"}}, separator = 47 L'/'}}

ran_atlas = <optimized out> res = <optimized out>

#12 0x000000000041aa27 in main (argc=1, argv=0x7fffffffdf08) at ../../../source/main.cpp:550

Change History (3)

comment:1 by myconid, 12 years ago

My fault. WIP code. It'll be fixed before Alpha 12.

comment:2 by myconid, 12 years ago

Patched it up slightly, so it should work for now. Requires rebuild. 

For the record, all that (horrible) code will be removed eventually, as the better solution I'm considering is to add proper cubemap support in the TextureManager/low-level libraries. Currently, all those have GL_TEXTURE_2D hardcoded everywhere, so they don't generalise very well to other texture types.

comment:3 by myconid, 12 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.