Jump to content

Double loading of mods


Recommended Posts

I run a server on Ubuntu Linux 20.04.

I use a custom UserDataFolder location to keep all mods, prefabs and other configs out of the 7DaysToDie installation folder.

This should mean that I have a single Mods folder and when I do everything starts and runs fine.

However I use a mod that has a bug, it recreates a Mods folder in the game installation folder on occasion.  So I end up with a Mods folder in UserDataFolder and an erroneous Mods folder in the game installation folder.  So that's two Mods folders.

It seems that when the two Mods folders exist 7DaysToDie is searching both locations for mods to add, good idea.  However it seems to duplicate mods in the list to be loaded.

This is evidenced by the the attached log.

It is more evident with mods such as allocs webserver and CPM which open ports for a web api.  With the mods being loaded twice they attempt to open ports twice and that obviously fails.

The snippet of log that is of interest is this piece (full log below):


[CSMM_Patrons] Error in Web.ctor: System.Net.HttpListenerException (0x80004005): Prefix already in use.
  at System.Net.EndPointListener.AddSpecial (System.Collections.ArrayList coll, System.Net.ListenerPrefix prefix) [0x00039] in <6fcfdd162b5d4836bef3c96f53194db6>:0
  at System.Net.EndPointListener.AddPrefix (System.Net.ListenerPrefix prefix, System.Net.HttpListener listener) [0x00036] in <6fcfdd162b5d4836bef3c96f53194db6>:0
  at System.Net.EndPointManager.AddPrefixInternal (System.String p, System.Net.HttpListener listener) [0x00063] in <6fcfdd162b5d4836bef3c96f53194db6>:0
  at System.Net.EndPointManager.AddListener (System.Net.HttpListener listener) [0x0009c] in <6fcfdd162b5d4836bef3c96f53194db6>:0
  at System.Net.HttpListener.Start () [0x0000f] in <6fcfdd162b5d4836bef3c96f53194db6>:0
  at CSMM_Patrons.Web.Web.‌‬‭‭‪‏‭‍‭‪‏‏‍‏‬‬‏‬‫‌‍‪‭‮ (System.Net.HttpListener ) [0x00000] in <7e330f67f9d74778a7998c9c13ea60ea>:0
  at CSMM_Patrons.Web.Web..ctor () [0x00209] in <7e330f67f9d74778a7998c9c13ea60ea>:0


where you can see the 'Prefix already in use' error message. This bug may only effect mods with DLLs, not 100% sure as I don't have enough information to verify.

I have also verified this by having only CPM mod loaded, with all default settings, so it should open a port which is controlpanel port +3 (8083 by default).

With an empty Mods folder in the game installation location the error occurs.

With only the Mods folder in the UserDataFolder location it works fine.

The pastebin of my log is here: https://pastebin.com/vcLxww18

Link to comment
Share on other sites

I must be missing something…..


You said a mod creates a new mod location….Why does it do that?  Should the mods only be in the location you installed them in?


Also if it is a bug in the mod,  should you be reaching out to the mod creator about the bug and not use the mod in the meantime?


This area of the forum is really about solving issues with the vanilla game, not fixing bugs in people’s mods

Link to comment
Share on other sites

As to why the mod does that, it's a confirmed bug which I have reported to the mod developer.  Admittedly it shouldn't create that and the developer agrees.

The bug in the mod tho surfaced a bug in the way 7Days loads mods. 

The point here is that during testing I have a Mods folder in the UserDataFolder location and when only that exists everything is fine. 

To test all of the above I removed all mods apart from CPM (which does not have a bug, well not one that affects this). 

I then added a completely empty Mods folder into the installation folder so now I'd have 2 Mods folders, the one in UserDataFolder which contains CPM  and the empty one in the installation folder. 

This causes the double loading of the CPM mod whereby  it tries to open the port twice, even tho the mod is only installed in the UserDataFolder location. 

I've also tested with other mods so it's not mod specific.  Any mod that opens a port is gonna have an issue since any port it opens can only be opened once.

And this is not a problem in any specific mod, the issue is that having 2 Mods folders causes 7Days to attempt double loading of mods, even when the mod in question is only instanced once.

This might also only be an issue on Linux Servers, but it is an issue with 7Days and not with any particular mod.

Link to comment
Share on other sites

Given the type of bug discussed here, is this forum the best place for this report?

This is a bug in the server code (possibly) and this forum seems more client focused.

Is there a more direct or more correct place to report this?

Link to comment
Share on other sites

You could submit an official bug report by clicking the red banner above. With clear, concise description and step by step instructions, it will be looked at by the team assigned to confirm bugs that are then passed to the developers to fix.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...