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

 

Admin

August 03, 2020, 11:49:52 PM
THIS SUNDAY !

9 AM PACIFIC / 12 PM EASTERN / 5 PM CET
WINNER IS FIRST TO 500 FRAGS
(GOTO TS500)
 

NoBugsOnMe

August 03, 2020, 11:10:39 PM

Punk_FAS

August 03, 2020, 11:58:12 AM
Nice. I didn't know there was such a thread. Thanks :)
 

quadz

August 03, 2020, 11:37:31 AM
Shoutbox isn't the place for rehashing this. Here's the thread about DM server spawn farthest from 2006/2007:

http://forum.tastyspleen.net/quake/index.php?topic=2932.0

Punk_FAS

August 03, 2020, 11:21:37 AM
but that's *NOT what the DM server is supposed to cater to

Punk_FAS

August 03, 2020, 11:21:09 AM
It's not ideal for 1v1 situations, but that's what the DM server is supposed to cater to. Also, there are 7 other maps besides DM4 (actually 8 for the automatic mymap map between dm8 and dm1). I think there are more positives than negatives.

Punk_FAS

August 03, 2020, 11:20:06 AM
It happens to better players too. I know I've been in first, or second place, only to die and spawn right next to the other leading player multiple times in a row, and having to dodge rockets in a narrow corridor without any weapons myself (other than blaster).

It's not the best for 1v1 situation

Punk_FAS

August 03, 2020, 11:17:56 AM
I saw a clearly-new player earlier, and it spawned him like 3 or 4 times in a row right next to a better player. Instant death each time they spawned. I imagine that can be discouraging and frustrating, particularly when someone is trying to get a handle on the game. Spawn farthest would avoid this.
 

quadz

August 03, 2020, 10:29:41 AM
Might be interesting to code a hybrid spawn function that doesn't focus on "farthest" so much as avoiding the few most congested spawn points?
 

quadz

August 03, 2020, 10:26:44 AM
We'd tried spawn farthest many moons ago, but it seemed a net negative overall. At least for larger maps like q2dm4, where one tends to get spawned furthest from all the action.

In any case, we have a 1-second spawn protect shield, and it has been suggested if THAT isn't good enough, one might consider transitioning to Minesweeper or Candy Crush. ;)

Show 50 latest
Welcome, Guest. Please login or register.
August 04, 2020, 04:15:36 AM

Login with username, password and session length