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

Offline stross

  • Newbie
  • *
  • Posts: 6
    • 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: 1372
    • 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: 6
    • 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: 1372
    • 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:

Costigan_Q2

November 11, 2024, 06:41:06 AM
"Stay cozy folks.

Everything is gonna be fine."

There'll be no excuses for having TDS after January 20th, there'll be no excuses AT ALL!!!
 

|iR|Focalor

November 06, 2024, 03:28:50 AM
 

RailWolf

November 05, 2024, 03:13:44 PM
Nice :)

Tom Servo

November 04, 2024, 05:05:24 PM
The Joe Rogan Experience episode 223 that dropped a couple hours ago with Musk, they're talking about Quake lol.

Costigan_Q2

November 04, 2024, 03:37:55 PM
Stay cozy folks.

Everything is gonna be fine.
 

|iR|Focalor

October 31, 2024, 08:56:37 PM

Costigan_Q2

October 17, 2024, 06:31:53 PM
Not activated your account yet?

Activate it now! join in the fun!

Tom Servo

October 11, 2024, 03:35:36 PM
HAHAHAHAHAHA
 

|iR|Focalor

October 10, 2024, 12:19:41 PM
I don't worship the devil. Jesus is Lord, friend. He died for your sins. He will forgive you if you just ask.
 

rikwad

October 09, 2024, 07:57:21 PM
Sorry, I couldn't resist my inner asshole.

Show 50 latest
Welcome, Guest. Please login or register.
November 22, 2024, 01:41:35 AM

Login with username, password and session length