Author Topic: The [recursive error after: FreeLibrary failed for game library] problem  (Read 693 times)

Offline stross

  • Newbie
  • *
  • Posts: 4
    • View Profile
  • Rated:
While using Q2DOS Dedicated server, the first map always loads up fine. But when voting for a map or using the server console to change the map,
The server crashes and prompts an error. The result is as follows: "recursive error after: FreeLibrary failed for game library".
Does anyone know what is causing this to happen? Also, is there a fix to this error and what has to be done to fix it?

Thanks.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline QwazyWabbit

  • Carpal Tunnel Member
  • ******
  • Posts: 1278
    • View Profile
  • Rated:
Re: The [recursive error after: FreeLibrary failed for game library] problem
« Reply #1 on: January 09, 2020, 08:38:59 PM »
It sounds like your mod is using the “map” command on the vote or console command. This is an old and common error. You should be using “gamemap” instead. The map command should only be used in your startup script.

Which mod are you running?
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline stross

  • Newbie
  • *
  • Posts: 4
    • View Profile
  • Rated:
Re: The [recursive error after: FreeLibrary failed for game library] problem
« Reply #2 on: January 12, 2020, 05:19:10 AM »
I'm currently using Quake 2 Pro as the client and Quake 2 DOS as the dedicated server that running on the Maraakate's coop server mod with newly added maps. i don't believe that could be the problem due to changing the maps because of three occurrences the happen as to when this error appears. The first occurrence is when a player exits the map. The second occurrence is when the player votes for a different map. And the third occurrence is when changing the map to a different map though the Q2DOS console. Now, when you mentioned running the gamemap command, I will be sure to use that for running such commands in the Q2DOS console. I wanted to also mention that when I run the Maraakate's coop server on the alternative game servers listed: r1q2 dedicated, quake2 dedicated, yamagi dedicated, q2pro dedicated they also produce the wrong Game library is version 4 expected 3 and vice versa. I mention this because I presume there might be a possibility that I wouldn't get that FreeLibrary error message for those alternative game servers if they were to work without crashing and without producing the improper Game library version error.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline QwazyWabbit

  • Carpal Tunnel Member
  • ******
  • Posts: 1278
    • View Profile
  • Rated:
Re: The [recursive error after: FreeLibrary failed for game library] problem
« Reply #3 on: January 13, 2020, 12:05:09 PM »
I'm sipping my coffee waiting for the brain to kick in. :)

All good info here. Let's discuss.
I'm currently using Quake 2 Pro as the client and Quake 2 DOS as the dedicated server that running on the Maraakate's coop server mod with newly added maps. i don't believe that could be the problem due to changing the maps because of three occurrences the happen as to when this error appears.

I don't think the client matters. Mostly, the client can only ask the server to do something, it's up to the server game code to decide whether it will do it and how it will do it.

The first occurrence is when a player exits the map.
Exits as in taking an exit door, I presume. When that happens the next map opened is the one defined in the current map. All the original single-player maps had a next map, the SP game depended on this. Many DM maps don't. Failing to have a next map defined is supposed to cause the server to choose one, usually from a map list. The map list file (assuming there is one) is defined by the mod code. Some mods didn't always change maps gracefully when this happened. I don't know if this is one of those.

The second occurrence is when the player votes for a different map.
If the mod uses the "map" command to change maps on a vote then the engine will unload and reload the game DLL. This is why you use the "gamemap" command instead. R1q2 will refuse to use "map" in rcon and I assume it will also do so for a voted map but I have not tested this. (IIRC, mods are supposed to use the "gamemap" command in what amounts to a sending of a command string to the engine via the gi.AddCommandString function but I suppose one could put a new map name into the level.changemap string and call ExitLevel.)
From this source: https://bitbucket.org/neozeed/q2dos.git
… and looking at the coop code, I can see many different map votes:
restartmap causes a map command.
gamemode causes a map command.
coop difficulty causes a map command.
warp causes a gamemap command.
playerexit causes a gamemode command which causes a map command.
Lots of ways to force a DLL reload. Most of them would be necessary since they need to force GameInit. :)
If you are restricting your server to coop only mode I recommend disabling all but the vote warp commands or testing your server to see which are safe to use.

And the third occurrence is when changing the map to a different map though the Q2DOS console. Now, when you mentioned running the gamemap command, I will be sure to use that for running such commands in the Q2DOS console.

I used to use the rcon map command until I was enlightened by r1q2. :)

I wanted to also mention that when I run the Maraakate's coop server on the alternative game servers listed: r1q2 dedicated, quake2 dedicated, yamagi dedicated, q2pro dedicated they also produce the wrong Game library is version 4 expected 3 and vice versa. I mention this because I presume there might be a possibility that I wouldn't get that FreeLibrary error message for those alternative game servers if they were to work without crashing and without producing the improper Game library version error.

Wrong game library version is a very bad no no. All bets are off and the engine has every right to not run a game DLL of the wrong type.

The game version is a number that specifies the interface between the engine and the game. The interface is the imports and exports to/from the engine and the game DLL. They specify the contract between them and it affects what functions they can use between them. The version number is the first thing the engine checks when it loads the DLL. EVERY engine should reject a wrong version DLL unless it's going to go to some extreme measures to figure out how to accommodate a different version DLL. There is NO WAY to tell, from the version number alone, what the interface looks like.

The coop code in the neozeed repo I cited above is version 4. It will not work with any other engine but Q2dos which, it would appear, expects version 4 DLLs.
Looking at the coop code I see they added a function to the engine called cvar_setdescription in the game that is called numerous times in the game startup.
An engine that doesn't export this function will fail when the game calls it.

When an engine rejects a DLL for wrong API version number it must never call anything in that DLL and it must immediately unload that DLL and stop game service.

If you want a version 3 DLL of coop I suggest: https://github.com/basecq/q2dos.git but I don't know if it has the same features. There are a lot of differences in the code that I am not prepared to analyze.

All this is TMI and more than you wanted to know but that's what happens when my coffee kicks in and I have a day to spare.
I hope it guides you in your troubleshooting.

QW
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

 

El Box de Shoutamente

Last 10 Shouts:

 

Om3ga

July 10, 2020, 06:39:35 PM
I like trolling you guys.
 

Om3ga

July 10, 2020, 06:37:37 PM
Sup tastybitches, Om3ga 2020. Hope yall staying healthy  cuz i come back to hang around, im coming back harder than the coronavirus.
 

|iR|Focalor

July 10, 2020, 04:08:00 PM
It was cold. Damn.
 

ImperiusDamian

July 10, 2020, 08:56:39 AM
"I saw focalor's small one"? That's rather judgy isn't it?  ;D ;D
 

Admin

July 01, 2020, 10:18:02 AM
Indeed, thanks. Added a few more bans.

otg

July 01, 2020, 04:49:07 AM
ADMIN: the bot is back using player names. cheers.
 

|iR|Focalor

June 22, 2020, 03:58:10 AM
Nah. I used "img width=220" in the first tag. That's about max size for the box on my monitor, which is 1280x1024 old school non-widescreen square format.
 

haunted

June 21, 2020, 07:07:01 PM
Damn it. I saw focalor's small one and figured it auto resized it here. Haha
 

haunted

June 21, 2020, 07:06:04 PM
 

|iR|Focalor

June 21, 2020, 10:54:46 AM

Show 50 latest
Welcome, Guest. Please login or register.
July 13, 2020, 03:00:13 PM

Login with username, password and session length