#6586 closed defect (fixed)

0ad fails to start if broken symlink is in mods folder

Reported by: Andy Alt Owned by: phosit
Priority: Should Have Milestone: Alpha 27
Component: Core engine Keywords:
Cc: Patch: Phab:D4743

Description

This happens on the svn version (maybe on a25, but I haven't tested it).

0ad fails to start if a broken symlink is in the mods folder. The error message doesn't indicate the specific problem.

Steps to reproduce:

  • Close 0ad if it's open
  • In your mods folder, add a broken symlink
  • Start 0ad
TIMER| CONFIG_Init: 1.74907 ms
Function call failed: return value was -1 (Function failed (no details available))
Location: file_system.cpp:123 (GetDirectoryEntries)

Call stack:

(0x5613abf648ce) ./pyrogenesis(+0x6438ce) [0x5613abf648ce]
(0x5613abf0f2ef) ./pyrogenesis(+0x5ee2ef) [0x5613abf0f2ef]
(0x5613abf10ef4) ./pyrogenesis(+0x5efef4) [0x5613abf10ef4]
(0x5613abf0f503) ./pyrogenesis(+0x5ee503) [0x5613abf0f503]
(0x5613abf266a2) ./pyrogenesis(+0x6056a2) [0x5613abf266a2]
(0x5613abc1b2ed) ./pyrogenesis(+0x2fa2ed) [0x5613abc1b2ed]
(0x5613abbf71be) ./pyrogenesis(+0x2d61be) [0x5613abbf71be]
(0x5613ab9d9296) ./pyrogenesis(+0xb8296) [0x5613ab9d9296]
(0x5613ab9c4bc7) ./pyrogenesis(+0xa3bc7) [0x5613ab9c4bc7]
(0x7f4993a94290) /usr/lib/libc.so.6(+0x29290) [0x7f4993a94290]
(0x7f4993a9434a) /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7f4993a9434a]
(0x5613ab9d5bd5) ./pyrogenesis(+0xb4bd5) [0x5613ab9d5bd5]

errno = 40 (?)
OS error = ?

Change History (3)

comment:1 by phosit, 21 months ago

Owner: set to phosit
Patch: Phab:D4743
Status: newassigned

comment:2 by sternstaub, 15 months ago

Can reproduce. I use shiny and if i put broken symlink into mods folder, the game throws error, then starts, but does not find shiny mod anymore.

The log says:

<p>Loaded config string "lobby.terms_of_use" = "63fc892979decfc31760586349403fb7"</p>
<p>Loaded config string "mod.enabledmods" = "mod public shiny"</p>
<p>Loaded config string "multiplayerhosting.port" = "20595"</p>
<p>Loaded config string "playername.multiplayer" = "sternstaub"</p>
<p>Loaded config string "silhouettes" = "true"</p>
<p>Loaded config string "sound.musicgain" = "0"</p>
<p>Loaded config string "userreport.enabledversion" = "0"</p>
<p>Loaded config string "userreport.id"</p>
<p class="error">ERROR: CVFSFile: file maps/scenario.rng couldn't be opened (vfs_load: -110101)</p>
<p class="error">ERROR: CXeromyces: failed adding validator for 'maps/scenario.rng'</p>
<p>Shutting down profiler2 GPU mode</p>
<p>Engine exited successfully on 2023-02-13 at 05:01:39 with 508 message(s), 2 error(s) and 0 warning(s).</p>

comment:3 by Itms, 12 months ago

Resolution: fixed
Status: assignedclosed

In 27612:

Ignore broken symlinks instead of crashing on them, fixes #6586.

Print a warning in the debug output for now, as the logger is not available at this point.

Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4743

Note: See TracTickets for help on using tickets.