X³: TC and AP - Linux support thread

Ask here if you experience technical problems with X³: Terran Conflict, X³: Albion Prelude or X³: Farnham's Legacy.

Moderators: timon37, Moderators for English X Forum

AramDol
Posts: 25
Joined: Tue, 23. Jul 13, 18:47
x4

[X3:AP Linux] Graphic corruption with iminent crash w/ huge (147) complex

Post by AramDol »

I'm 99% certain I can tell you exactly what causes this, but to be sure, here's the requested info...

Steam version of X3:AP 3.1, "Verify Integrity of Game Cache" confirms nothing out of order. According to Steam, it's the latest version (no pending updates).

No mods at all.

Humble Merchant start.

Debian Jessie, completely updated as of now. Nvidia driver version 337.25

Intel i7-3770k
32Gb of RAM @ 1600Mhz, dual-channel
ASUS P8Z77-M Pro
Inno3D Nvidia GTX680 w/ 2Gb


Saved game as close as I can get to a reliable crash case.

https://drive.google.com/file/d/0B9NHyK ... sp=sharing

X04.sav is before the graphic corruption, X05.sav is after the corruption event, although it doesn't appear to affect the save game. X05 is included *just in case*.



Ok, exact nature of problem. My educated guess, it's an out of memory error.

I'm in Tkr's Delusion, with my OmniComplex, it has one of each Commonwealth ship component factory, and everything required to support those factories running at 100%. Problems started when I added some Terran food factories. If I add one more factory (that Boron Orca has a PSP Forge and an SSC Forge waiting to be placed), then 9/10 it will crash instead of playing the spinning camera animation. If it does manage to survive placing one more factory, it always crashes when I try to link it up with a Complex Construction Kit. Pressing [Shift]-[J] to bring up the Jumpdrive menu *usually* crashes, in this sector.

Here's a screenshot just before the glitch...

http://i.imgur.com/Lz15dXQ.png

And here it is after the glitch, just before it has crashed (most actions now will result in a crash, it's a dead man walking from this point)...

http://i.imgur.com/pbbe5Rz.png

I was scratching my head at the source of this until just now, when I was SETA'ing the construction of an Aran in the background. I happened to look at task manager, and noticed that RAM usage for X3:AP was over 3Gb. I was thinking, "Hmm, for a 32bit app, that's pushing it".

So I loaded a saved game, while watching the RAM usage... it dropped down to 2Gb at the loading screen, and slowly climbed up to 3.4Gb at which point the game was loaded, and play resumed as usual.

3.4Gb of RAM is *asking for it* I think to myself. Surely all I have to do now is open a menu or something and *bang*, it crashed. The Jumpdrive menu is the best at producing a crash.

So, my money is that DirectX has some clever resource mapping feature that hasn't been reworked for linux (which is quite fair enough), and for some reason or another, the magic 4Gb point is much easier to hit on Linux.

There's a simple fix for this... a 64bit build, but that's asking a bit much for a game as old as this is, and probably has its own difficulties.

Hope I've provided enough information, if there's anything else I can provide, please don't hesitate.
timon37
EGOSOFT
EGOSOFT
Posts: 508
Joined: Fri, 14. Dec 12, 11:02
x4

Post by timon37 »

@sumners

Yeah and that's my fault, will fix.

@rmazurek
Hmm strange, I guess it might be mod related? Normal savegames should be compatible.

@AramDol

Unfortunately 64bit won't happen, I did briefly look into it in the beginnig but there's just too many assumptions in the code. But I'll think how I can reduce memory usage. Can you confirm that the memory consumption is better on windows? AFAIK TC/AP was pretty close to the limit.
rmazurek
Posts: 87
Joined: Tue, 13. Aug 13, 04:04
x3tc

Post by rmazurek »

It could be mod. Stations that were switched was mainly from Advanced Equipment Dock. However connections were broken from every complex.

There was so many mods and scripts installed that I don't remember them all. For sure it was cockpit mod, MARS, RFF, mentioned advanced equipment dock, advanced patrol, BSD, ADS real wings edition and jump to me.

Game crashed at save in Unknown Sector under Paranid sectors - almost in line with Priest Refuge. Other in Paranid sectors too (all saves was only in Paranid Sectors and this Unknown Sector) was loading but was messed as I described.

If it helps, I could provide this save files and the whole installation from backup.
AramDol
Posts: 25
Joined: Tue, 23. Jul 13, 18:47
x4

Post by AramDol »

@timon37

I can imagine. Heck, back then we all thought sizeof(ptr) == sizeof(int). It's not really something you can blame anyone for.

I'll be able to test it out on windows on thursday.
AramDol
Posts: 25
Joined: Tue, 23. Jul 13, 18:47
x4

Post by AramDol »

@timon37

I've found that reducing the detail to low has mitigated the problem for the moment, and complex construction has resumed.

On Windows, at max detail, RAM usage spiked at 3.3Gb in my saved game. There was no instability. Test was conducted on Windows 7 SP1 x64, with the latest version of X3AP according to Steam, after running "Verify Integrity of Game Cache", on a fresh install of Windows that was finished minutes prior. Nothing was installed other than a complete sweep of Windows Update, Steam, X3AP, Intel Inf & the latest Nvidia drivers, on an I7-3770K w/ 8Gb RAM and an Nvidia 560 with unknown quantities of VRAM (sorry, I didn't check). Hope that helps.
timon37
EGOSOFT
EGOSOFT
Posts: 508
Joined: Fri, 14. Dec 12, 11:02
x4

Post by timon37 »

Ok thanks AramDol.
Hyde911
Posts: 90
Joined: Sun, 29. Aug 10, 14:17
x3tc

Post by Hyde911 »

One more question:
Is performance of Linux version is any better (or worse) than win??
misioooo
Posts: 115
Joined: Sun, 17. Jun 07, 14:17
x3tc

Post by misioooo »

For me X3TC works a tad smoother on Linux (debian jessie). ALthough i have quiet a rig (overkill for linux): Core i5 3570K, 16GB of ram, nVidia GF GTX560 1gb...

Anyway, to the point... How i can make no-steam version from my steam version? (under linux). ANd which file is used to actualy run the game (downloaded from steam)?
I copied whole X3TC dir from steam library to some other place (so i can safely use some mods - XRM in particullar), but... How to run the game without steam?
AramDol
Posts: 25
Joined: Tue, 23. Jul 13, 18:47
x4

Post by AramDol »

hehe... I just tested to make sure... the Linux Steam version of X3 doesn't need Steam.

Code: Select all

sudo apt-get install libglu1-mesa:i386 libxmu6:i386 libxi6:i386 libopenal1:i386 libgtk2.0-0:i386
cd ~/.local/share/Steam/SteamApps/common/X3\ Terran\ Conflict
./X3TC_config
jug007
Posts: 39
Joined: Sat, 12. Jun 10, 21:37
x4

Post by jug007 »

Just noticed that the achivements aren't working for me. Will that be fixed?

Also is it normal for the game to have a lag spike whenever I look at something with many unloaded objects? (mainly when entering a sector) Never played X3 TC with this pc on windows so i can't really compare it. I am using Ubuntu 10.04 with GT 640 grafics card and nvidia proprietary driver version 343.22

Please just ask if there is something I could help with or something missing.

One of the best linux version of a game i have seen so far. Good work guys.
Greetings jug
timon37
EGOSOFT
EGOSOFT
Posts: 508
Joined: Fri, 14. Dec 12, 11:02
x4

Post by timon37 »

jug007 wrote:Just noticed that the achivements aren't working for me. Will that be fixed?
Yes, though I've been a bit too busy and stumbled into some annoying problems with my office setup.
jug007 wrote:Also is it normal for the game to have a lag spike whenever I look at something with many unloaded objects? (mainly when entering a sector) Never played X3 TC with this pc on windows so i can't really compare it. I am using Ubuntu 10.04 with GT 640 grafics card and nvidia proprietary driver version 343.22
That's a tricky one and you're definitely not alone.
There's at least two parts to it, one would be shaders but if you play for a few moments they'll all be loaded and shouldn't be a problem.
The more troublesome part was meshes, iirc this mostly happened with a beta amd catalyst driver (which probably isn't beta by now), where I would submit a buffer and then on the first draw it would stutter (probably a deferred upload by the driver), I tried all kinds of things like doing a fake draw to force it being loaded but I couldn't figure anything out.
However I may have been wrong and hope to get some more work time on it soon, though it won't be much so I might only have enough time to fix achievements:(
jug007
Posts: 39
Joined: Sat, 12. Jun 10, 21:37
x4

Post by jug007 »

Will the achievements you should already have be updated?

Greetings jug
timon37
EGOSOFT
EGOSOFT
Posts: 508
Joined: Fri, 14. Dec 12, 11:02
x4

Post by timon37 »

jug007 wrote:Will the achievements you should already have be updated?

Greetings jug
Unfortunately most likely not. Though if you have a savegame right before getting the achievement and load it you'll get the achievement.
Also any counted achievements you'll probably get on any change of the value in question.
User avatar
Authorised
Posts: 38
Joined: Fri, 4. Nov 05, 01:47
x3ap

Post by Authorised »

Hi all, I posted over in the X3: Reunion Linux thread, but this is probably relevant here:

I have managed to get the my CH Products Pro Throttle and Microsoft Sidewinder Force Feedback 2 to work together perfectly in X3: Terran conflict. It was a pain in the backside to do, but here's how:

First I grabbed the source code to joy-map, the linux userspace joystick mapping program. This allows you to remap axes and buttons on existing devices and assign them to a new virtual device. By default, joy-map sets all the evdev abs_max values to 32767 and all the evdev abs_min values to -32767 for all axes. When I was running it out of the box, this caused the virtual stick to barely register movement, as the raw output from the USB devices was in the region of -256 to 256 for the throttle and -512 to 512 for the sidewinder.... and then the stick twist was -32 to 32, and the hats were -1 to 1. As X3 doesn't let you recalibrate in game, and any joydev calibration with jscal is ignored, this was not much use.

So I used evtest to find out what the maximum and minimum reported raw values were for each and every axis I was remapping. I then edited devices.c, one of the joy-map source files. Line 127 is the start of the loop which sets up the abs_max and abs_min values for all of the axes, so I commented out the loop and hard-coded the values for each axis in. After that was done, I compiled the mapper, and wrote a map file which combined all of the axes and buttons I needed.

finally, I copied the compiled loadmap executable and my joystick map config to my X3:TC directory and modified the last line of testandlaunch to read

Code: Select all

./loadmap CH--sidewinder.map & ./$1
killall loadmap
It's not as straighforward as the CH Products Control Manager software in Windows, and if I change my stick setup (as I plan on doing next payday when I intend to get a CH Fighter Stick and CH Pro Pedals) then I'll have to edit the joy-map source and recompile, but it works, and I can play X3:TC in Linux with mt HOTAS setup.

If anyone is interested in the hacked joy-map source or the config map file, I can provide them. There's probably a way to get joy-map to set abs_max and abs_min values based on the values supplied by the devices themselves, but that's something I'll work on when I have more time.

This may be of use to people whose joysticks do not work without calibration, as well as anyone looking to combine multiple stick setups to play X3:TC
"It's too bad she won't live. But then again, who does?" - Gaff
timon37
EGOSOFT
EGOSOFT
Posts: 508
Joined: Fri, 14. Dec 12, 11:02
x4

Post by timon37 »

Hi everyone,

I'm doing a relatively small update, but it fixes steam integration for TC, includes some updated libraries and it's the first real build from the office.
So I'm making a small public_beta, anyone who can please try it and tell me if it did or didn't break horribly.
The password is "OohVeryShiny".
User avatar
ezra-r
Posts: 3423
Joined: Fri, 14. Oct 05, 21:04
x4

Post by ezra-r »

timon37 wrote:Hi everyone,

I'm doing a relatively small update, but it fixes steam integration for TC, includes some updated libraries and it's the first real build from the office.
So I'm making a small public_beta, anyone who can please try it and tell me if it did or didn't break horribly.
The password is "OohVeryShiny".
Glad to see you back in business around here (and hopefully preparing for rebirth port too soon(tm))

Im redownlading it all again since start menu already looked wonky but i had a modded game.

With the beta Start menu where you set graphics configuration etc, looks a bit wanky but everything else seems to work alright.
timon37
EGOSOFT
EGOSOFT
Posts: 508
Joined: Fri, 14. Dec 12, 11:02
x4

Post by timon37 »

ezra-r wrote: With the beta Start menu where you set graphics configuration etc, looks a bit wanky but everything else seems to work alright.
Gimme a screenshot.
g04tn4d0
Posts: 2044
Joined: Mon, 26. Apr 04, 12:58
x4

Post by g04tn4d0 »

Will there be an executable released for Ubuntu that doesn't require the Steam DRM? Thanks! :D
User avatar
ezra-r
Posts: 3423
Joined: Fri, 14. Oct 05, 21:04
x4

Post by ezra-r »

here it is:

https://drive.google.com/file/d/0B7Mv-H ... sp=sharing

graphic settings seems to be missing borders or separaators:
https://drive.google.com/file/d/0B7Mv-H ... sp=sharing

I'm using Linux Mint 17 (based on ubuntu 14.04).

The issue is not big deal since I can start the game and play it just fine, so if it is just me I'm ok with it.

my config:

Processor Information:
Vendor: GenuineIntel
CPU Family: 0x6
CPU Model: 0x3e
CPU Stepping: 0x4
CPU Type: 0x0
Speed: 3400 Mhz
12 logical processors
6 physical processors
HyperThreading: Supported
FCMOV: Supported
SSE2: Supported
SSE3: Supported
SSSE3: Supported
SSE4a: Unsupported
SSE41: Supported
SSE42: Supported

Network Information:
Network Speed:

Operating System Version:
Linux Mint 17 Qiana (64 bit)
Kernel Name: Linux
Kernel Version: 3.13.0-24-generic
X Server Vendor: The X.Org Foundation
X Server Release: 11501000
X Window Manager: Marco
Steam Runtime Version: steam-runtime-release_2014-08-20

Video Card:
Driver: NVIDIA Corporation GeForce GTX 780/PCIe/SSE2

Driver Version: 4.4.0 NVIDIA 340.32
OpenGL Version: 4.4
Desktop Color Depth: 24 bits per pixel
Monitor Refresh Rate: 60 Hz
VendorID: 0x10de
DeviceID: 0x1004
Number of Monitors: 1
Number of Logical Video Cards: 1
Primary Display Resolution: 1920 x 1080
Desktop Resolution: 1920 x 1080
Primary Display Size: 20.91" x 11.77" (23.98" diag)
53.1cm x 29.9cm (60.9cm diag)
Primary Bus: PCI Express 16x
Primary VRAM: 3072 MB
Supported MSAA Modes: 2x 4x 8x 16x

Sound card:
Audio device: Realtek ALC898

Memory:
RAM: 15999 Mb

Miscellaneous:
UI Language: English
LANG: en_US.UTF-8
Microphone: Not set
Total Hard Disk Space Available: 466558 Mb
Largest Free Hard Disk Block: 154516 Mb

Installed software:

Recent Failure Reports:
timon37
EGOSOFT
EGOSOFT
Posts: 508
Joined: Fri, 14. Dec 12, 11:02
x4

Post by timon37 »

@ezra-r

Ahh that's an issue with gtk themes, originally I did nothing but then there were issues when steam introduced their runtime, so I randomly fiddled and adding a config.gtkrc file made it better iirc;p You can try removing it from the main game folder, it might help.

Return to “X³: Terran Conflict / Albion Prelude / Farnham's Legacy - Technical Support”