Author Topic: The [recursive error after: FreeLibrary failed for game library] problem  (Read 1978 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: 1357
    • 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: 1357
    • 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:

Sgt. Dick

Today at 08:44:00 PM
This place is not what it used to be, but It can still be amusing at times  :D
 

Costigan_Q2

April 02, 2024, 07:49:21 AM
Quake 2 needs a public square.
 

|iR|Focalor

April 02, 2024, 06:38:09 AM
Deflection.
 

-Unh0ly-

April 02, 2024, 04:32:51 AM
 

Costigan_Q2

April 02, 2024, 03:22:32 AM
And now, as usual, we finally get to this pathetic buffoon, once again, pettily grasping at straws for any desperate tiny false 'victory' it genuinely believes it can win.
 

|iR|Focalor

April 02, 2024, 02:18:27 AM
"I freely admit to my faults but this degenerate can't even recognise his nevermind admit them."

I asked you why, and you only responded with "everyone's a sinner." That's less "freely admitting your faults" and more of a minimization of them. Just saying.
 

Costigan_Q2

April 02, 2024, 01:51:31 AM
I freely admit to my faults but this degenerate can't even recognise his nevermind admit them. :)

He'll never learn, just like Beaver...
 

Costigan_Q2

April 02, 2024, 01:30:11 AM
Yes, everyone's a sinner.

Didn't you know?

They've only banned my Costigan identity accounts. :)
 

|iR|Focalor

April 02, 2024, 01:24:14 AM
"Trolls get banned, that's universal"

I forget, maybe you can help me out... Which one of us is banned from Tastyspleen discord again? And why?
 

Costigan_Q2

April 02, 2024, 01:20:15 AM
That's what you look like is it? lol.

Trolls get banned, that's universal, i won't even let you in to begin with, go away. :)

Show 50 latest
Welcome, Guest. Please login or register.
April 17, 2024, 11:02:41 PM

Login with username, password and session length