Opened 4 years ago
Closed 4 years ago
#5757 closed defect (fixed)
Invalid/unsupported texture format r23304 on Linux Mint
Reported by: | GunChleoc | Owned by: | Itms |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 24 |
Component: | Build & Packages | Keywords: | |
Cc: | Itms | Patch: | Phab:D2765 |
Description
Happens on program start:
$ gdb pyrogenesis GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from pyrogenesis...done. (gdb) run Starting program: /media/cuideigin/Linux/sources/0ad/binaries/system/pyrogenesis [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". TIMER| InitVfs: 146.763 us Writing the mainlog at /home/cuideigin/.config/0ad/logs/mainlog.html [New Thread 0x7fffe5233700 (LWP 22103)] TIMER| CONFIG_Init: 1.59175 ms [New Thread 0x7fffe4a32700 (LWP 22104)] [New Thread 0x7fffe4831700 (LWP 22105)] [New Thread 0x7fffe4630700 (LWP 22106)] [New Thread 0x7fffe442f700 (LWP 22107)] [New Thread 0x7fffe422e700 (LWP 22108)] [New Thread 0x7fffe402d700 (LWP 22109)] [New Thread 0x7fffe3e2c700 (LWP 22110)] [New Thread 0x7fffe3c2b700 (LWP 22111)] [New Thread 0x7fffe3a2a700 (LWP 22112)] [New Thread 0x7fffe3829700 (LWP 22113)] [New Thread 0x7fffe3628700 (LWP 22114)] [New Thread 0x7fffe3427700 (LWP 22115)] [New Thread 0x7fffe3226700 (LWP 22116)] [New Thread 0x7fffe3025700 (LWP 22117)] [New Thread 0x7fffe2e24700 (LWP 22118)] [New Thread 0x7fffe2c23700 (LWP 22119)] [New Thread 0x7fffe16b8700 (LWP 22120)] [Thread 0x7fffe16b8700 (LWP 22120) exited] [New Thread 0x7fffe1637700 (LWP 22121)] [New Thread 0x7fffe1637700 (LWP 22122)] [Thread 0x7fffe1637700 (LWP 22121) exited] [New Thread 0x7fffe0e36700 (LWP 22123)] Sound: AlcInit success, using OpenAL Soft [New Thread 0x7fff8bfff700 (LWP 22124)] TIMER| shutdown ConfigDB: 0.332 us [Thread 0x7fff8bfff700 (LWP 22124) exited] [Thread 0x7fffe0e36700 (LWP 22123) exited] TIMER| resource modules: 2.50807 ms TIMER TOTALS (9 clients) ----------------------------------------------------- tc_pool_alloc: 0 c (0x) tc_png_decode: 0 c (0x) [Thread 0x7fffe1637700 (LWP 22122) exited] tc_dds_transform: 0 c (0x) tc_transform: 0 c (0x) tc_plain_transform: 0 c (0x) tc_ShaderGLSLLink: 0 c (0x) tc_ShaderGLSLCompile: 0 c (0x) tc_ShaderValidation: 0 c (0x) xml_validation: 0 c (0x) ----------------------------------------------------- TIMER| shutdown misc: 119.363 us TIMER| InitVfs: 485.941 us Writing the mainlog at /home/cuideigin/.config/0ad/logs/mainlog.html TIMER| CONFIG_Init: 1.79592 ms [New Thread 0x7fffe1637700 (LWP 22125)] [New Thread 0x7fffe0e36700 (LWP 22126)] Sound: AlcInit success, using OpenAL Soft [New Thread 0x7fff8bfff700 (LWP 22127)] [New Thread 0x7fffe24ff700 (LWP 22128)] [New Thread 0x7fffe0c35700 (LWP 22129)] [New Thread 0x7fff8b5ec700 (LWP 22130)] Unknown cache/TLB descriptor 0xc3 UserReport written to /home/cuideigin/.config/0ad/logs/userreport_hwdetect.txt TIMER| RunHardwareDetection: 6.18554 ms [New Thread 0x7fff8adeb700 (LWP 22131)] [Thread 0x7fff8adeb700 (LWP 22131) exited] TIMER| write_sys_info: 18.8095 ms [New Thread 0x7fff8adeb700 (LWP 22132)] TIMER| InitRenderer: 1.76583 ms TIMER| ps_console: 1.70363 ms TIMER| ps_lang_hotkeys: 553.435 us TIMER| common/modern/setup.xml: 327.969 us TIMER| common/modern/styles.xml: 78.692 us TIMER| common/modern/sprites.xml: 790.363 us TIMER| common/setup.xml: 197.138 us TIMER| common/sprites.xml: 265.227 us TIMER| common/styles.xml: 45.866 us TIMER| pregame/backgrounds/: 326.339 us TIMER| pregame/sprites.xml: 81.43 us TIMER| pregame/styles.xml: 21.64 us TIMER| pregame/mainmenu.xml: 15.2294 ms TIMER| common/global.xml: 163.807 us TIMER| common/modern/setup.xml: 93.616 us TIMER| common/modern/styles.xml: 82.07 us TIMER| common/modern/sprites.xml: 733.826 us TIMER| splashscreen/setup.xml: 119.073 us TIMER| splashscreen/splashscreen.xml: 8.2213 ms TIMER| common/global.xml: 162.804 us tex_dds.cpp(418): Function call failed: return value was -120102 (Invalid/unsupported texture format) Function call failed: return value was -120102 (Invalid/unsupported texture format) Location: tex_dds.cpp:418 (decode_pf) Call stack: (0x555555b9146e) /media/cuideigin/Linux/sources/0ad/binaries/system/pyrogenesis(+0x63d46e) [0x555555b9146e] (0x555555b2f781) /media/cuideigin/Linux/sources/0ad/binaries/system/pyrogenesis(+0x5db781) [0x555555b2f781] (0x555555b317ab) /media/cuideigin/Linux/sources/0ad/binaries/system/pyrogenesis(+0x5dd7ab) [0x555555b317ab] (0x555555bafa78) /media/cuideigin/Linux/sources/0ad/binaries/system/pyrogenesis(+0x65ba78) [0x555555bafa78] (0x555555bae157) /media/cuideigin/Linux/sources/0ad/binaries/system/pyrogenesis(+0x65a157) [0x555555bae157] (0x555555b824af) /media/cuideigin/Linux/sources/0ad/binaries/system/pyrogenesis(+0x62e4af) [0x555555b824af] (0x555555b8518d) /media/cuideigin/Linux/sources/0ad/binaries/system/pyrogenesis(+0x63118d) [0x555555b8518d] (0x555555963d73) /media/cuideigin/Linux/sources/0ad/binaries/system/pyrogenesis(+0x40fd73) [0x555555963d73] (0x55555596d282) /media/cuideigin/Linux/sources/0ad/binaries/system/pyrogenesis(+0x419282) [0x55555596d282] (0x55555596157f) /media/cuideigin/Linux/sources/0ad/binaries/system/pyrogenesis(+0x40d57f) [0x55555596157f] (0x55555593db91) /media/cuideigin/Linux/sources/0ad/binaries/system/pyrogenesis(+0x3e9b91) [0x55555593db91] (0x55555595c92b) /media/cuideigin/Linux/sources/0ad/binaries/system/pyrogenesis(+0x40892b) [0x55555595c92b] (0x555555b22e58) /media/cuideigin/Linux/sources/0ad/binaries/system/pyrogenesis(+0x5cee58) [0x555555b22e58] (0x555555b17faa) /media/cuideigin/Linux/sources/0ad/binaries/system/pyrogenesis(+0x5c3faa) [0x555555b17faa] (0x555555ac9f7a) /media/cuideigin/Linux/sources/0ad/binaries/system/pyrogenesis(+0x575f7a) [0x555555ac9f7a] (0x555555ac9f45) /media/cuideigin/Linux/sources/0ad/binaries/system/pyrogenesis(+0x575f45) [0x555555ac9f45] errno = 0 (No error reported here) OS error = ?
Attachments (1)
Change History (17)
by , 4 years ago
Attachment: | 0ad-texture.png added |
---|
comment:2 by , 4 years ago
It was a fresh checkout.
I have now gone ahead and deleted ~/cache/0ad and run make again, but it still crashes.
BTW I am getting an additional segfault when exiting from the error message window. There's the stack trace in case it is useful:
Redirecting call to abort() to mozalloc_abort Thread 1 "main" received signal SIGSEGV, Segmentation fault. mozalloc_abort (msg=msg@entry=0x7ffff746f140 "Redirecting call to abort() to mozalloc_abort\n") at sources/0ad/libraries/source/spidermonkey/mozjs-45.0.2/memory/mozalloc/mozalloc_abort.cpp:33 33 MOZ_CRASH(); (gdb) backtrace #0 mozalloc_abort (msg=msg@entry=0x7ffff746f140 "Redirecting call to abort() to mozalloc_abort\n") at sources/0ad/libraries/source/spidermonkey/mozjs-45.0.2/memory/mozalloc/mozalloc_abort.cpp:33 #1 0x00007ffff7438ba0 in abort () at sources/0ad/libraries/source/spidermonkey/mozjs-45.0.2/memory/mozalloc/mozalloc_abort.cpp:80 #2 0x0000555555b952e3 in try_gui_display_error (no_continue=<optimized out>, allow_suppress=<optimized out>, manual_break=<optimized out>, text=<optimized out>, this=<optimized out>, this=<optimized out>, this=<optimized out>, this=<optimized out>) at ../../../source/lib/sysdep/os/unix/unix.cpp:197 #3 sys_display_error ( text=text@entry=0x7fffe0020000 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(0x555555b9146e) sources/0ad/binarie"..., flags=flags@entry=6) at ../../../source/lib/sysdep/os/unix/unix.cpp:216 #4 0x0000555555b319cf in CallDisplayError (flags=<optimized out>, text=0x7fffe0020000 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(0x555555b9146e) sources/0ad/binarie"...) at ../../../source/lib/debug.cpp:383 #5 debug_DisplayError (suppress=0x555555f885c8 <decode_pf(DDS_PIXELFORMAT const*, unsigned long&, unsigned long&)::suppress__>, func=0x555555ca3d38 <decode_pf(DDS_PIXELFORMAT const*, unsigned long&, unsigned long&)::__func__> "decode_pf", line=418, pathname=<optimized out>, lastFuncToSkip=0x555555c97548 L"debug_OnError", context=0x7fffffffbb40, flags=<optimized out>, description=<optimized out>) at ../../../source/lib/debug.cpp:474 #6 debug_OnError (err=err@entry=-120102, suppress=suppress@entry=0x555555f885c8 <decode_pf(DDS_PIXELFORMAT const*, unsigned long&, unsigned long&)::suppress__>, file=file@entry=0x555555ca39b8 L"../../../source/lib/tex/tex_dds.cpp", line=line@entry=418, func=func@entry=0x555555ca3d38 <decode_pf(DDS_PIXELFORMAT const*, unsigned long&, unsigned long&)::__func__> "decode_pf") at ../../../source/lib/debug.cpp:551 #7 0x0000555555bafa78 in decode_pf (flags=@0x7fffe5234750: 0, bpp=@0x7fffe5234748: 8, pf=0x55555907304c) at ../../../source/lib/tex/tex_dds.cpp:418 #8 decode_sd (flags=@0x7fffe5234750: 0, bpp=@0x7fffe5234748: 8, h=@0x7fffe5234740: 512, w=@0x7fffe5234738: 1024, sd=0x555559073004) at ../../../source/lib/tex/tex_dds.cpp:514 #9 TexCodecDds::decode (this=<optimized out>, data=0x555559073000 "DDS |", t=0x7fffe5234718) at ../../../source/lib/tex/tex_dds.cpp:610 #10 0x0000555555bae157 in Tex::decode (this=this@entry=0x7fffe5234718, Data=std::shared_ptr<unsigned char> (use count 2, weak count 0) = {...}, DataSize=524416) at ../../../source/lib/tex/tex.cpp:736 #11 0x0000555555b824af in OglTex_reload (ot=0x7fffe5234718, vfs=..., pathname=..., h=655370) at ../../../source/lib/res/graphics/ogl_tex.cpp:472 #12 0x0000555555b8518d in call_init_and_reload (type=0x555555f80d40 <V_OglTex>, type=0x555555f80d40 <V_OglTex>, init_args=0x7fffffffc5b8, pathname=..., vfs= std::shared_ptr<IVFS> (use count 4, weak count 0) = {...}, hd=0x7fffe52346c0, h=655370) at ../../../source/lib/res/h_mgr.cpp:438 #13 alloc_new_handle (init_args=0x7fffffffc5b8, flags=140737488342000, key=363785197, pathname=..., vfs=std::shared_ptr<IVFS> (use count 4, weak count 0) = {...}, type=0x555555f80d40 <V_OglTex>) at ../../../source/lib/res/h_mgr.cpp:481 #14 h_alloc (type=type@entry=0x555555f80d40 <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 #15 0x0000555555b80a71 in ogl_tex_load (vfs=std::shared_ptr<IVFS> (use count 4, weak count 0) = {...}, pathname=..., flags=flags@entry=17) at ../../../source/lib/res/graphics/ogl_tex.cpp:544 #16 0x0000555555963d73 in CTextureManagerImpl::LoadTexture (this=this@entry=0x55555616a880, texture=std::shared_ptr<CTexture> (use count 4, weak count 4) = {...}, path=...) at ../../../source/graphics/TextureManager.cpp:179 #17 0x000055555596d282 in CTextureManagerImpl::TryLoadingCached (this=0x55555616a880, texture=std::shared_ptr<CTexture> (use count 4, weak count 4) = {...}) at ../../../source/graphics/TextureManager.cpp:267 #18 0x000055555596157f in CTexture::TryLoad (this=0x555558ed6740) at ../../../source/graphics/TextureManager.cpp:566 #19 CTexture::GetHandle (this=0x555558ed6740) at ../../../source/graphics/TextureManager.cpp:553 #20 0x000055555593db91 in CShaderProgram::BindTexture (this=0x555558eb36d0, id=..., tex=...) at ../../../source/graphics/ShaderProgram.cpp:700 #21 0x000055555595c92b in CTextRenderer::Render (this=this@entry=0x7fffffffd0a0) at ../../../source/graphics/TextRenderer.cpp:251 #22 0x0000555555b22e58 in CGUIText::Draw (this=0x5555585d4250, pGUI=..., DefaultColor=..., pos=..., z=<optimized out>, clipping=...) at ../../../source/gui/CGUIText.cpp:462 #23 0x0000555555b17faa in CText::Draw (this=0x5555561875d0) at ../../../source/gui/ObjectTypes/CText.cpp:230 #24 0x0000555555ac9f7a in IGUIObject::RecurseObject<>(bool (IGUIObject::*)() const, void (IGUIObject::*)()) (this=0x5555561875d0, isRestricted=(bool (IGUIObject::*)(const IGUIObject * const)) 0x555555adbe00 <IGUIObject::IsHidden() const>, callbackFunction=<optimized out>) at ../../../source/gui/ObjectBases/IGUIObject.h:279 #25 0x0000555555ac9f45 in IGUIObject::RecurseObject<>(bool (IGUIObject::*)() const, void (IGUIObject::*)()) (this=<optimized out>, isRestricted=(bool (IGUIObject::*)(const IGUIObject * const)) 0x555555adbe00 <IGUIObject::IsHidden() const>, callbackFunction=<optimized out>) at ../../../source/gui/ObjectBases/IGUIObject.h:283 #26 0x0000555555ac9f45 in IGUIObject::RecurseObject<>(bool (IGUIObject::*)() const, void (IGUIObject::*)()) (this=<optimized out>, isRestricted=(bool (IGUIObject::*)(const IGUIObject * const)) 0x555555adbe00 <IGUIObject::IsHidden() const>, callbackFunction=<optimized out>) ---Type <return> to continue, or q <return> to quit--- at ../../../source/gui/ObjectBases/IGUIObject.h:283 #27 0x0000555555ac9f45 in IGUIObject::RecurseObject<>(bool (IGUIObject::*)() const, void (IGUIObject::*)()) (this=<optimized out>, isRestricted=(bool (IGUIObject::*)(const IGUIObject * const)) 0x555555adbe00 <IGUIObject::IsHidden() const>, callbackFunction=<optimized out>) at ../../../source/gui/ObjectBases/IGUIObject.h:283 #28 0x0000555555ac9f45 in IGUIObject::RecurseObject<>(bool (IGUIObject::*)() const, void (IGUIObject::*)()) (this=<optimized out>, isRestricted=(bool (IGUIObject::*)(const IGUIObject * const)) 0x555555adbe00 <IGUIObject::IsHidden() const>, callbackFunction=<optimized out>) at ../../../source/gui/ObjectBases/IGUIObject.h:283 #29 0x0000555555ac9f45 in IGUIObject::RecurseObject<>(bool (IGUIObject::*)() const, void (IGUIObject::*)()) (this=<optimized out>, isRestricted=(bool (IGUIObject::*)(const IGUIObject * const)) 0x555555adbe00 <IGUIObject::IsHidden() const>, callbackFunction=<optimized out>) at ../../../source/gui/ObjectBases/IGUIObject.h:283 #30 0x0000555555abdd36 in IGUIObject::RecurseObject<>(bool (IGUIObject::*)() const, void (IGUIObject::*)()) (callbackFunction=&virtual table offset 72, isRestricted=<optimized out>, this=<optimized out>) at ../../../source/gui/ObjectBases/IGUIObject.h:283 #31 CGUI::Draw (this=<optimized out>) at ../../../source/gui/CGUI.cpp:291 #32 0x0000555555a9e3f9 in CGUIManager::Draw (this=<optimized out>) at ../../../source/gui/GUIManager.cpp:371 #33 0x00005555557de867 in Render () at ../../../source/ps/GameSetup/GameSetup.cpp:254 #34 0x00005555555b33f4 in Frame () at ../../../source/main.cpp:416 #35 0x00005555555b5785 in RunGameOrAtlas (argc=<optimized out>, argv=<optimized out>) at ../../../source/main.cpp:640 #36 0x00005555555a2b27 in main (argc=1, argv=0x7fffffffdeb8) at ../../../source/main.cpp:686
comment:5 by , 4 years ago
I'm running into the same issue right now. I didn't use --system-nvtt. To be sure I also tried --without-nvtt, however this didn't help.
comment:6 by , 4 years ago
Never mind. I skipped the step for emptying the cache. The problem is gone now, after I deleted the cache.
comment:7 by , 4 years ago
Cc: | added |
---|---|
Component: | Core engine → Build & Packages |
Priority: | Release Blocker → Should Have |
Resolution: | → invalid |
Status: | new → closed |
Downgrading priority and I edited BuildInstructions to not suggest using the broken with-system-nvtt
option. For now we will not disable it, but we might decide to do so in the future.
comment:8 by , 4 years ago
Priority: | Should Have → Must Have |
---|---|
Resolution: | invalid |
Status: | closed → reopened |
I think it would be best to check the version of nvtt at compile time, like we do with SM.
Stan: Would you mind if I remove your change to BuildInstructions? It is incorrect (missing cmake and libnvtt-dev is out of place), and the flag is not actually broken.
When A24 is released, I assume a number of package maintainers will update the nvtt package (especially if we put a compile-time check). So don't worry about BuildInstructions, using system-nvtt will become more commonly possible over time.
follow-up: 10 comment:9 by , 4 years ago
Of course, you know best. I removed it because it's currently making the game not work for all the people who tried it (I actually didn't see anyone report the game worked with using --system-nvtt since your update) So I wanted to save people some time :) one of the poor fellow who tried lost a few hours because of it :/
(missing cmake and libnvtt-dev is out of place),
I didn't edit that.
When A24 is released, I assume a number of package maintainers will update the nvtt package (especially if we put a compile-time check). So don't worry about BuildInstructions, using system-nvtt will become more commonly possible over time.
None of the fixes we use are committed upstream, so I don't know if they will...
comment:10 by , 4 years ago
Replying to stanislas69:
So I wanted to save people some time :) one of the poor fellow who tried lost a few hours because of it :/
Yes that's why I think we should add a check, so that people don't waste their time.
I didn't edit that.
but you should have: I was just saying that your change made the instructions incorrect because your change was incomplete.
None of the fixes we use are committed upstream, so I don't know if they will...
The patches we have are completely unrelated with the pixelformat difference that causes the crash. We currently match upstream on the logic, the patches are only build fixes.
comment:12 by , 4 years ago
Patch: | → Phab:D2765 |
---|
GunChleoc, could you try applying this patch, and checking that when passing --with-system-nvtt
, the game now refuses to build? Thank you!
follow-up: 14 comment:13 by , 4 years ago
Link to the patch so I don't have to go digging for it again:
https://code.wildfiregames.com/D2765
And the game will still build. I ran clean_workspaces.sh
, then ./update-workspaces.sh --with-system-nvtt
I have version 2.0.8-1+dfsg-8.1
of libnvtt2
& libnvtt-dev
listed as installed in my package manager. There is also a libnvtt-bin
package available in the package manager that is not installed on my system.
comment:14 by , 4 years ago
Replying to GunChleoc:
Link to the patch so I don't have to go digging for it again:
Oh really sorry about that, the link I added in the Patch field will lead you directly to the patch! Writing Phab:D2765
creates short links like Phab:D2765 in Trac.
And the game will still build. I ran
clean_workspaces.sh
, then./update-workspaces.sh --with-system-nvtt
I have version
2.0.8-1+dfsg-8.1
oflibnvtt2
&libnvtt-dev
listed as installed in my package manager. There is also alibnvtt-bin
package available in the package manager that is not installed on my system.
That's a bummer, thanks for testing. I will setup a Mint VM and take a look at how to detect the version.
comment:15 by , 4 years ago
Hello GunChleoc, I am a bit surprised, I tested the patch on Ubuntu Focal, which has the same version of libnvtt-dev
(2.0.8-1+dfsg-8.1
), and it works: it correctly prevents building with the system library. Mint doesn't seem to propose a package so it falls back to the Ubuntu one.
Sorry to bother you, but could you try the patch again? If it still fails, could you tell me what is the value of NVTT_VERSION
which should be defined around line 50 of the system's /usr/include/nvtt/nvtt.h
? And maybe run locate nvtt.h
to see if you have another version of the lib laying around.
Thanks for your help!
Screenshot of texture-related crash