Results 1 to 3 of 3

Thread: Linux and Wine for KeeperFX (+ Troubleshooting)

  
  1. #1
    Imp Yani's Avatar
    Join Date
    Mar 2019
    Location
    Belgium
    Posts
    39

    Default Linux and Wine for KeeperFX (+ Troubleshooting)

    In this thread we can combine some of the info for Linux and Wine users, as well as any problems that might arise and what fixed those issues.

    I am using Ubuntu, so most of this will be tailored towards Ubuntu users.

    Setting it up with wine requires no custom wine prefixes. You should just be able to run wine keeperfx and get going.

    I also made ImpLauncher so we have a Cross-Platform launcher. Be sure to give it a try as it also fixes some of the errors.


    .
    Error: LbBullfrogMain, and a gray background for the official launcher

    You are most likely running the launcher and keeperfx with the wrong "current working directory" set.

    This often happens when executing from a different path or when using a misconfigured keeperfx.desktop file.

    The solution is to first navigate the the keeperfx directory and then run wine launcher.exe. When you get the correct launcher background you are executing from the correct working directory.

    If you are using a .desktop file, you should make sure it executes while being in the correct directory too. I currently do not have an example file for you, but will do so later. I think the correct "Dir=" variable needs to be set.


    .
    Error: Ubuntu: X BadWindow error (KeeperFX shows a small window and closes instantly)

    X Error of failed request: BadWindow (invalid Window parameter)
    Major opcode of failed request: 10 (X_UnmapWindow)
    Resource id in failed request: 0x5200003
    Serial number of failed request: 190
    Current serial number in output stream: 193
    If you get an error that looks like this, it most likely means your Wine setup is wrong.

    This happened to me personally when I updated Ubuntu 22.04 to 22.10 to 23.04 and eventually to 23.10 where it broke.
    The fix was to remove my wine-jammy.sources file in /etc/apt/sources.list.d/ folder and download the wine-mantic.sources file.
    Both sources provide a Wine 8.0.2 release file, but the one for the older Ubuntu release was wrong.

    You can figure out your Ubuntu codename by running lsb_release -a

    Try reinstalling Wine but make sure your apt sources are correct.

    If this does not fix it, your Wine or X/Wayland setup could be wrong. Feel free to let me know so I can update this issue


    .
    I manually moved the DK data files to /data but it still doesn't work

    This is actually an error that doesn't exist yet. I'll add this because this might become an issue when KeeperFX gets a native Linux build.

    For now, KeeperFX requires the data files to have lowercase names. Manually moving the files does not rename them to be lowercase.

    Wine does some magic to simulate a Windows filesystem and their filename conventions, so when using Wine this should not be an issue.

    When installing using the official launcher, these files get renamed to be lowercase. (When using ImpLauncher, manually copied uppercase files are automatically renamed as an extra fix)
    Last edited by Yani; November 14th, 2023 at 11:58.

  2. #2

    Default Re: Linux and Wine for KeeperFX (+ Troubleshooting)

    Quote Originally Posted by Yani View Post
    In this thread we can combine some of the info for Linux and Wine users, as well as any problems that might arise and what fixed those issues.
    I have KeeperFX working well on Ubuntu 22.04 with Wine 9.0 but only in single-player. Trying to launch an offline LAN game on either UDP or TCP causes it to crash and close out of Wine. This happens pretty much instantly when a player presses Join Game.

    Is KeeperFX's netcode imported from (in my case) the CD, or has it been re-implemented with more modern software? My install has a readme saying it is limited to 2 players with no option for IPX (which used to support 4) but this might be an artefact of what CD I used. 4 players using if necessary ipxemu might be preferable. I also have a peculiar issue at the moment that I've run out of capacity on my router for port forwarding rules, so I want to resolve the crashing before starting on that. To be able to set a different port in a config file would be nice. Ah, I suppose it might be that Join Game has been selected when no Host can be visible on Port 5555 or 5556. But I would think it should give an error for that not crash.

    Looking at the log it has

    ====

    Sync: Initializing 4-players type 1 network
    Net: Selecting UDP
    Sync: Frontend state change from 4 into 5
    Sync: Created menu ID 21 at slot 0, pos (120,0) size (1200,900)
    === Crash ===Error: Attempt to read from inaccessible memory address.
    in msvcrt.dll at 0023:7bb282c5, base 7bad0000
    in keeperfx.exe at 0023:00436034, base 00400000
    in keeperfx.exe at 0023:00443aad, base 00400000
    in keeperfx.exe at 0023:005686a5, base 00400000
    in keeperfx.exe at 0023:0051a6ab, base 00400000
    in keeperfx.exe at 0023:00508026, base 00400000
    in keeperfx.exe at 0023:00527fb4, base 00400000
    in keeperfx.exe at 0023:004f663d, base 00400000
    in keeperfx.exe at 0023:0050a04c, base 00400000
    in keeperfx.exe at 0023:00600227, base 00400000
    in keeperfx.exe at 0023:006010ea, base 00400000
    in keeperfx.exe at 0023:006013bf, base 00400000
    in keeperfx.exe at 0023:00607b94, base 00400000

    ====

    So it seems to expect 4 players on TCP/IP and the readme file is outdated.

    For msvcrt.dll can perhaps be installed through winetricks msvcrt40 or msvcirt
    But installing them doesn't stop the crashes or change what error in the log

    The Launcher has a Run Option for Multiplayer Peers. The format is non-standard and its tooltip brings up information about Packet Files (the next item along from it).
    Whether what's to be entered here is the local machine's IP address, the other machine's IP address, or the host machine's IP address, it doesn't affect the crashing.

    The online readme doesn't explain, the Laucher UI only seems to set one hostname, and what about UDP?

    ==========
    -sessions <hostname1: port;hostname2: port;etc>
    Adds sessions to the TCP/IP session list. hostname is either a DNS name or an IPv4 address (the latter ought to be far more common).
    ==========

    "sessions" entered into this Command Line Option then appear in the Game Menu but with sessions for 2 PCs neither PC can Join a game Created on the other.
    The sessions appear in the Game Menu for both TCP/IP and UDP so the online readme is incomplete.
    In the Game Menu there is "Add Computer" but this doesn't work (brings up a blank dialog with options for Join or Cancel).

    Having both PCs entered here means the Join Game button (the first one, not the one in Add Computer) no longer crashes but instead hangs and then gives an error "Cannot Join Game."
    The error is now


    Net: Failed to initialize TCP client socket to host 192.168.1.116 and port 6112

    It looks as if the online readme at https://github.com/dkfans/keeperfx/b...yer_readme.txt might not have been updated with the launcher's ability to set a custom port.
    Also why are some readmes local and others online.

    There is also no option on the Host to select a map and an error:-
    Warning: Couldn't load Map Pack "legacy.cfg", no .LIF files could be found.
    Warning: Couldn't load Map Pack "personal.cfg", no .LIF files could be found.

    Which probably is a problem with the import of game assets from the CD. Overall it looks to have been built more for GOG but perhaps I can copy-and-paste.
    But perhaps it is a red herring because I have no personal or legacy maps anyway only Classic ones (which do have LIF files) in which case why is this a Warning and in the Game Menu should a list of maps appear at this stage at all

    The error "Failed to initialize TCP client socket to host" isn't documented in the Troubleshooting page. It seems to be unusual parlance: usually one "creates" a socket and (big iirc) sockets aren't directed "to" the host but "listen" to anything they are sent on that socket by the host or any other peer. And isn't a common reason for this that some other application is already bound to that port. Nothing else is running apart from the browser and restarting didn't work.

    There seems to be a bug in Heroic. The launcher works from in the "Launch .exe from Prefix" button but not as the prefix's main .exe file. There it gives an error Unexpected Parameter "
    Last edited by evild4ve; April 18th, 2024 at 19:33.

  3. #3
    Spider Necror's Avatar
    Join Date
    Feb 2010
    Location
    qqluqq
    Posts
    200
    Gamer IDs

    Steam ID: qqluqq

    Default Re: Linux and Wine for KeeperFX (+ Troubleshooting)

    hmm I see if you try to join without first selecting a session there's indeed a crash,
    keeperfx doesn't use any of the original games code anymore, netcode had been replaced, used to be modem, ipx or serial, none of those 3 still supported, now only enet/udp or tcp/ip with enet being the recommended one
    and the netcode would need a big overhaul first to get more then 2 human players working

    the "Warning: Couldn't load Map Pack "legacy.cfg", no .LIF files could be found." warnings can be safely ignored

    the Add Computer button should be ignored, that's just not a leftover from something not fully implemented
    Last edited by Necror; April 18th, 2024 at 19:58.

Similar Threads

  1. Problem with music playback on Wine (Linux)
    By marqsman in forum DK1 Troubleshooting
    Replies: 2
    Last Post: June 17th, 2019, 13:06
  2. Linux Crash Fix & Patch 2.0.4 Release Notes
    By Mentor in forum War for the Overworld
    Replies: 0
    Last Post: August 1st, 2018, 16:53
  3. Troubleshooting
    By Sijtze Roar in forum OpenKeeper
    Replies: 5
    Last Post: June 21st, 2018, 17:05
  4. running dk1 with wine in gentoo
    By shorty in forum KeeperFX
    Replies: 4
    Last Post: August 8th, 2011, 13:04
  5. Sick of Crashes? -> Dungeon Keeper 2 Multiplayer on Linux
    By darkbytes in forum DK2 Multiplayer
    Replies: 2
    Last Post: May 26th, 2010, 11:41

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •