Opened 4 years ago

Last modified 4 years ago

#4119 new enhancement

Delete cache button

Reported by: Moul Owned by:
Priority: Nice to Have Milestone: Backlog
Component: Core engine Keywords:
Cc: Patch:

Description (last modified by elexis)

Edit: The following crashes occured after texture and XML cache files were corrupted:

TIMER| loading/loading.xml: 1.3218 ms
TIMER| common/global.xml: 778.51 us
TIMER| ParseTerrain: 11.6322 ms
TIMER| ParseEntities: 1.8676 s
tex_codec.cpp(81): Function call failed: return value was -120100 (Unknown error (-120100, 0xFFFFFFFFFFFE2ADC))
Function call failed: return value was -120100 (Unknown error (-120100, 0xFFFFFFFFFFFE2ADC))
Location: tex_codec.cpp:81 (tex_codec_for_header)

Call stack:

(0x91052b) ./0ad/binaries/system/pyrogenesis() [0x91052b]
(0x8c5819) ./0ad/binaries/system/pyrogenesis() [0x8c5819]
(0x8c5bc1) ./0ad/binaries/system/pyrogenesis() [0x8c5bc1]
(0x8c5f0d) ./0ad/binaries/system/pyrogenesis() [0x8c5f0d]
(0x92c49c) ./0ad/binaries/system/pyrogenesis() [0x92c49c]
(0x90a609) ./0ad/binaries/system/pyrogenesis() [0x90a609]
(0x8f43ac) ./0ad/binaries/system/pyrogenesis() [0x8f43ac]
(0x8efd4f) ./0ad/binaries/system/pyrogenesis() [0x8efd4f]
(0x73b83b) ./0ad/binaries/system/pyrogenesis() [0x73b83b]
(0x429c55) ./0ad/binaries/system/pyrogenesis() [0x429c55]
(0x41c5d7) ./0ad/binaries/system/pyrogenesis() [0x41c5d7]
(0x7fd900aa2731) /lib64/libc.so.6(__libc_start_main+0xf1) [0x7fd900aa2731]
(0x428019) ./0ad/binaries/system/pyrogenesis() [0x428019]

errno = 0 (No error reported here)
OS error = ?


(C)ontinue, (S)uppress, (B)reak, Launch (D)ebugger, or (E)xit?

Change History (8)

comment:1 by elexis, 4 years ago

Notice your client crashed also on Guadalic River and Amazon. Apparently a texture related issue. Perhaps too few video memory? Does it also crash when starting the same maps but with a lower mapsize or with less graphic settings enabled?

comment:2 by Moul, 4 years ago

Priority: Release BlockerMust Have
Summary: Game crash with red sea mapGame crash with USB connection to Internet

I tried to reduce to lower graphics, recompile after cleaning…etc Nothing changed.

Apparently, my game crash for every multiplayers games on the network. It do not crash for local games with bot.

I am using a connection to Internet via USB to my mobile phone Firefox OS which is connected to a good Wi-Fi hotspot via SIM authentication.

Some new logs which seems different:

TIMER| common/init.xml: 2.83747 ms TIMER| loading/styles.xml: 71.84 us TIMER| loading/sprites.xml: 240.907 us TIMER| loading/loading.xml: 1.17009 ms TIMER| common/global.xml: 475.071 us TIMER| ParseTerrain: 6.70258 ms XeroXMB.cpp(48): Assertion failed: "!strcmp(Header, HeaderMagicStr) && "Invalid XMB header!"" Assertion failed: "!strcmp(Header, HeaderMagicStr) && "Invalid XMB header!"" Location: XeroXMB.cpp:48 (Initialise)

Call stack:

(0x91072b) ./0ad/binaries/system/pyrogenesis() [0x91072b] (0x8c5a19) ./0ad/binaries/system/pyrogenesis() [0x8c5a19] (0x8c6d10) ./0ad/binaries/system/pyrogenesis() [0x8c6d10] (0x657ecf) ./0ad/binaries/system/pyrogenesis() [0x657ecf] (0x65fe96) ./0ad/binaries/system/pyrogenesis() [0x65fe96] (0x7c2ea9) ./0ad/binaries/system/pyrogenesis() [0x7c2ea9] (0x717db7) ./0ad/binaries/system/pyrogenesis() [0x717db7] (0x6ef4a4) ./0ad/binaries/system/pyrogenesis() [0x6ef4a4] (0x6dbe51) ./0ad/binaries/system/pyrogenesis() [0x6dbe51] (0x502cae) ./0ad/binaries/system/pyrogenesis() [0x502cae] (0x507c5c) ./0ad/binaries/system/pyrogenesis() [0x507c5c] (0x49af43) ./0ad/binaries/system/pyrogenesis() [0x49af43] (0x49b084) ./0ad/binaries/system/pyrogenesis() [0x49b084] (0x6ed2ec) ./0ad/binaries/system/pyrogenesis() [0x6ed2ec] (0x6e2524) ./0ad/binaries/system/pyrogenesis() [0x6e2524] (0x5d4109) ./0ad/binaries/system/pyrogenesis() [0x5d4109]

errno = 0 (No error reported here) OS error = ?

b (C)ontinue, (S)uppress, (B)reak, Launch (D)ebugger, or (E)xit? b ./0ad.sh : ligne 13 : 6539 Trace/breakpoint trap (core dumped)./0ad/binaries/system/pyrogenesis

comment:3 by elexis, 4 years ago

Since you play alpha 20 without problems, likely via the same connection, it's likely not about the network connection. It doesn't crash in the lobby nor gamesetup.

Looking at the error it seems more there is something wrong with the XML system. It encounters a broken file (one that doesn't start with the hardcoded header).

ENSURE(!strcmp(Header, HeaderMagicStr) && "Invalid XMB header!"); 

in XMBFile::Initialise of source/ps/XML/XeroXMB.cpp.

Can you add a debug_printf("Loading file %s\n", filename.string8().c_str()); to the begin of CXeromyces::ReadXMBFile in source/ps/XML/Xeromyces.cpp, compile again and check the last file before the breakpoint?

You did try reverting everything?

comment:4 by elexis, 4 years ago

Notice that writes it to the command line output. use

LOGWARNING("Loading file %s", filename.string8().c_str());

to have it in the logfiles.

That thing reads the cached files. I'm not familiar with the exact code behavior, but I could identify 2 places where those XMB files are saved to on my ubuntu system: 0ad/binaries/data/cache/ and ~/.cache/0ad/. You should likely be able to get away with just deleting all *.xmb files in those directories, if not the entire cache.

comment:5 by Moul, 4 years ago

Summary: Game crash with USB connection to InternetGame crash due to XMB file

Loading file cache/public/art/actors/fauna/rabbit1.xml.d28ef83790a2d68b.xmb TIMER| ParseEntities: 555.01 ms Loading file cache/public/art/textures/skins/gaia/textures.xml.6cf0f6093665db5b.xmb tex_codec.cpp(81): Function call failed: return value was -120100 (Unknown error (-120100, 0xFFFFFFFFFFFE2ADC)) Function call failed: return value was -120100 (Unknown error (-120100, 0xFFFFFFFFFFFE2ADC)) Location: tex_codec.cpp:81 (tex_codec_for_header)

Call stack:

(0x91072b) ./0ad/binaries/system/pyrogenesis() [0x91072b]

I removed cache/public/art/textures/skins/gaia/textures.xml.6cf0f6093665db5b.xmb and the game didn't crashed \o/

comment:6 by elexis, 4 years ago

Component: MapsCore engine
Keywords: simple added
Milestone: Alpha 21Backlog
Priority: Must HaveNice to Have
Type: defectenhancement

There should be an explicit message stating which filename is broken, perhaps giving a hint that the user might just delete that file.

comment:7 by Itms, 4 years ago

I think a proper fix for this situation would be adding a way to purge the cache. Maybe we could add a "purge cache" button in the options screen.

comment:8 by elexis, 4 years ago

Description: modified (diff)
Keywords: simple removed
Summary: Game crash due to XMB fileDelete cache button
Note: See TracTickets for help on using tickets.