Menu

#640 Searching for WADs in the current directory can severely delay the game startup

Always occurs!
closed-fixed
None
5
2019-12-13
2017-04-07
No

Currently, the game would attempt to search for the WAD files in the current directory, which (e.g. if user has populated $HOME and runs it from there) might take up a lot of time and cause rather annoying startup delay. This design decision seems pretty controversial to me, and probably requires a rethink.

As a simple workaround, I disabled this behaviour in FreeBSD port, and attaching the patch for your consideration.

1 Attachments

Discussion

  • Wesley Johnson

    Wesley Johnson - 2018-07-07
    • status: open --> pending-fixed
    • assigned_to: Wesley Johnson
     
  • Wesley Johnson

    Wesley Johnson - 2018-07-07

    Check search directories for case where the default dir is
    the home directory, or if it contains "Desktop", "Pictures", or "Music"
    directories. If one of these is detected, the default dir
    will not be searched. This is to avoid long searches due
    to the depth of wad search, and to avoid searching the users
    home directory, or exposing it to wad loading searches.

    Please check if this is sufficient.
    DoomLegacy was not meant to be run directly in a heavily populated directory.
    If given the choice of taking away the search for other users, and altering your installation to stop it from searching the wrong directories, I would choose to move your DoomLegacy binary installation to a run-time sub-directory.

     
  • Wesley Johnson

    Wesley Johnson - 2019-10-01

    Search is Limited by fix in svn 1386.

     
  • Wesley Johnson

    Wesley Johnson - 2019-10-01
    • status: pending-fixed --> closed-fixed
     
  • Alexey Dokuchaev

    Now it segfaults if run not via absolute path, e.g., just as doomlegacy, because progdir and progdir_wads would be NULL in this case and they are dereferenced without a proper check inside owner_wad_search_order() function in those strcmp() calls.

     
  • Wesley Johnson

    Wesley Johnson - 2019-12-13
     
  • Wesley Johnson

    Wesley Johnson - 2019-12-13

    Fix of progdir==NULL problems in SVN 1485.
    There is now protection against NULL progdir, and progdir_wads.

    I have never seen such a problem on Linux, even when I have started doomlegacy without command line options. I suspect that this is operating system dependent as the progdir is returned by a SDL system dependent function.

    Thank you for the debugging.

     

Log in to post a comment.