Jump to content

Texture Error


wowgetoffyourcellphone
 Share

Recommended Posts

Odd that the error code doesn't make mention of the offending texture file....

 

  Reveal hidden contents

 

Link to comment
Share on other sites

  • 4 months later...

i get this on a build done on Debian sid from 0ad gitlab ( HEAD commit 6739e81b57c626735c531e4a6b5ebd5784734f76  Fri May 22 05:00:18 2020 +0200 ) but i didn't manage to fix it

clearing cache is not enough : did rm -rf ~/.cache/0ad , content is recreated at restart.

Here a small video :

https://pire.artisanlogiciel.net/videos/watch/8b81e3ed-e9ec-46ae-b727-7bd230c660ad

 

stack trace :

#0  0x00007f87fa4f2ec5 in __GI___nanosleep (requested_time=requested_time@entry=0x7fffd17a83e0, remaining=remaining@entry=0x7fffd17a83e0)
    at ../sysdeps/unix/sysv/linux/nanosleep.c:28
#1  0x00007f87fa4f2dca in __sleep (seconds=0, seconds@entry=3) at ../sysdeps/posix/sleep.c:55
#2  0x000055debf23c994 in udbg_launch_debugger () at ../../../source/lib/sysdep/os/unix/udbg.cpp:85
#3  0x000055debf23f875 in try_gui_display_error (no_continue=false, allow_suppress=true, manual_break=true,
    text=0x6582 <error: Cannot access memory at address 0x6582>) at ../../../source/lib/sysdep/os/unix/unix.cpp:175
#4  sys_display_error (
    text=text@entry=0x7f87e8020000 L"Function call failed: return value was -120102 (Invalid/unsupported texture format)\r\nLocation: tex_dds.cpp:418 (decode_pf)\r\n\r\nCall stack:\r\n\r\n(0x55debf23bd45) binaries/system/pyrogenesis(+0x619d45) [0x"..., flags=flags@entry=6)
    at ../../../source/lib/sysdep/os/unix/unix.cpp:216
#5  0x000055debf1dc6fb in CallDisplayError (flags=<optimized out>,
    text=0x7f87e8020000 L"Function call failed: return value was -120102 (Invalid/unsupported texture format)\r\nLocation: tex_dds.cpp:418 (decode_pf)\r\n\r\nCall stack:\r\n\r\n(0x55debf23bd45) binaries/system/pyrogenesis(+0x619d45) [0x"...) at ../../../source/lib/debug.cpp:383
#6  debug_DisplayError (description=<optimized out>, flags=<optimized out>, context=0x7fffd17a9140, lastFuncToSkip=0x55debf334eb8 L"debug_OnError",
    pathname=<optimized out>, line=418, func=<optimized out>,
    suppress=0x55debf438368 <decode_pf(DDS_PIXELFORMAT const*, unsigned long&, unsigned long&)::suppress__>) at ../../../source/lib/debug.cpp:474
#7  0x000055debf1dc823 in debug_OnError (err=err@entry=-120102,
    suppress=suppress@entry=0x55debf438368 <decode_pf(DDS_PIXELFORMAT const*, unsigned long&, unsigned long&)::suppress__>,
    file=file@entry=0x55debf340ac0 L"../../../source/lib/tex/tex_dds.cpp", line=line@entry=418, func=func@entry=0x55debf340a8e "decode_pf")
    at ../../../source/lib/debug.cpp:551
#8  0x000055debf25c720 in decode_pf (flags=@0x7f87f5296a50: 0, bpp=@0x7f87f5296a48: 8, pf=0x55dec2f0204c) at ../../../source/lib/tex/tex_dds.cpp:418
#9  decode_sd (flags=@0x7f87f5296a50: 0, bpp=@0x7f87f5296a48: 8, h=@0x7f87f5296a40: 512, w=@0x7f87f5296a38: 1024, sd=0x55dec2f02004)
    at ../../../source/lib/tex/tex_dds.cpp:514
#10 TexCodecDds::decode (this=<optimized out>, data=0x55dec2f02000 "DDS |", t=0x7f87f5296a18) at ../../../source/lib/tex/tex_dds.cpp:610
#11 0x000055debf259703 in Tex::decode (this=this@entry=0x7f87f5296a18, Data=std::shared_ptr<unsigned char> (use count 2, weak count 0) = {...},
    DataSize=524416) at ../../../source/lib/tex/tex.cpp:736
#12 0x000055debf22dff0 in OglTex_reload (ot=0x7f87f5296a18, vfs=..., pathname=..., h=917518) at ../../../source/lib/res/graphics/ogl_tex.cpp:472
#13 0x000055debf230a07 in call_init_and_reload (type=0x55debf430ae0 <V_OglTex>, type=0x55debf430ae0 <V_OglTex>, init_args=0x7fffd17a9b98, pathname=...,
    vfs=std::shared_ptr<struct IVFS> (use count 4, weak count 0) = {...}, hd=0x7f87f52969c0, h=<optimized out>) at ../../../source/lib/res/h_mgr.cpp:438
#14 alloc_new_handle (init_args=0x7fffd17a9b98, flags=140736707862800, key=4043432962, pathname=...,
    vfs=std::shared_ptr<struct IVFS> (use count 4, weak count 0) = {...}, type=0x55debf430ae0 <V_OglTex>) at ../../../source/lib/res/h_mgr.cpp:481
#15 h_alloc (type=type@entry=0x55debf430ae0 <V_OglTex>, vfs=std::shared_ptr<struct IVFS> (use count 4, weak count 0) = {...}, pathname=...,
    flags=flags@entry=17) at ../../../source/lib/res/h_mgr.cpp:518
#16 0x000055debf22c581 in ogl_tex_load (vfs=std::shared_ptr<struct IVFS> (use count 4, weak count 0) = {...}, pathname=..., flags=flags@entry=17)
    at ../../../source/lib/res/graphics/ogl_tex.cpp:544
#17 0x000055debf0298ae in CTextureManagerImpl::LoadTexture (this=this@entry=0x55debf6927d0,
    texture=std::shared_ptr<class CTexture> (use count 4, weak count 4) = {...}, path=...) at ../../../source/graphics/TextureManager.cpp:179
#18 0x000055debf033ffe in CTextureManagerImpl::TryLoadingCached (this=0x55debf6927d0,
    texture=std::shared_ptr<class CTexture> (use count 4, weak count 4) = {...}) at ../../../source/graphics/TextureManager.cpp:267
#19 0x000055debf028400 in CTexture::TryLoad (this=0x55dec2c2be00) at ../../../source/graphics/TextureManager.cpp:566
#20 CTexture::GetHandle (this=0x55dec2c2be00) at ../../../source/graphics/TextureManager.cpp:553
#21 0x000055debf007711 in CShaderProgram::BindTexture (this=0x55dec2623ef0, id=..., tex=...) at /usr/include/c++/9/bits/shared_ptr_base.h:1020
#22 0x000055debf024e42 in CTextRenderer::Render (this=this@entry=0x7fffd17aa5d0) at /usr/include/c++/9/ext/atomicity.h:96
#23 0x000055debf1cee78 in CGUIText::Draw (this=0x55dec1d4d870, pGUI=..., DefaultColor=..., pos=..., z=<optimized out>, clipping=...)
    at ../../../source/gui/CGUIText.cpp:462
#24 0x000055debf1c5282 in CText::Draw (this=0x55dec00ee370) at ../../../source/gui/ObjectTypes/CText.cpp:230

 

(gdb) frame 15
#15 h_alloc (type=type@entry=0x55bb8d5c7ae0 <V_OglTex>, vfs=std::shared_ptr<IVFS> (use count 4, weak count 0) = {...}, pathname=..., flags=flags@entry=17)
    at ../../../source/lib/res/h_mgr.cpp:518
518        h = alloc_new_handle(type, vfs, pathname, key, flags, &args);
(gdb) print pathname
$1 = (const VfsPath &) @0x7ffebb105730: {path = L"cache/mod/fonts/sans-16.png.5e0d34defe0a67d4.dds", separator = 47 L'/'}

 

 

Link to comment
Share on other sites

well, how do i proceed, my tentative with :

./update-workspaces.sh

cd gcc; make -j2

fails with

usr/bin/ld : ../../../binaries/system/libgraphics.a(TextureConverter.o) : dans la fonction « CTextureConverter::ConvertTexture(std::shared_ptr<CTexture> const&, Path const&, Path const&, CTextureConverter::Settings const&) » :
/extmounts/var/develp/games/0ad/0ad/build/workspaces/gcc/../../../source/graphics/TextureConverter.cpp:436 : référence indéfinie vers « nvtt::InputOptions::setTextureLayout(nvtt::TextureType, int, int, int) »
collect2: error: ld returned 1 exit status
make[1]: *** [test.make:331: ../../../binaries/system/test] Error 1
make: *** [Makefile:189: test] Error 2

I have to make clean ? If i do it this is a full long build to do ... is there a shortcut ?

 

seems rm ./gcc/obj/graphics_Release/TextureManager.o ./gcc/obj/graphics_Release/TexturedLineRData.o ./gcc/obj/graphics_Release/TextureConverter.o  allowed to recompile only needed things ... will see

well not enough, same problem, doing the full clean rebuild...

Edited by artlog
Link to comment
Share on other sites

I couldn't answer to you since i am new on this forum and did use my 4 posts what i was not aware of beforehand.

yep this is working now using nvtt shipped within 0ad sources what is default behavior with using ./update-workspaces.sh

I cleaned everything to fully rebuild, because my previous tentatives to only rebuild parts didn't succeed.

I did test --without-nvtt but that was a terrible idea, it does not work at all since this does fully remove nvtt, i doubt even this option has still an interest.

Then i got a working configuration, i wanted to move my binary somewhere else to keep this as a reference, and learnt the hard way it is compiled with RUNPATH  $ORIGIN meaning dynamic libraries should be copied within the same path and that a data directory populated with assets should exists in parent else it crashes badly with segfault. 

I think i lost lots of time due to this https://trac.wildfiregames.com/wiki/BuildInstructions#Linux Debian / Ubuntu "With these dependencies you have to run: ./update-workspaces.sh --with-system-nvtt"

remark  : for system nvtt under debian unstable there is debian bug open on libnvtt2 for which 0ad was one of the main trigger : https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=916909 but this is unclear if it came from a messed environement or from libnvtt2 itself, i won't go further...

 

Link to comment
Share on other sites

  On 24/05/2020 at 10:36 AM, artlog said:

 

I did test --without-nvtt but that was a terrible idea, it does not work at all since this does fully remove nvtt, i doubt even this option has still an interest.

Expand  

Sorry my bad, I didn't mean with the flag without-system-nvtt I meant without --with-system-nvtt :)

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...