Author Topic: <no bug> 32bit linux binary illegal instruction (sse2) crash  (Read 2951 times)

petevine

  • Initiate
  • Posts: 6
    • View Profile
The latest linux release 3.11.1 32bit binary starts fine on my slackware but the moment you try to start a scenario or tutorial the game crashes with illegal instruction error.

The only useful line from gdb is probably this:

Program received signal SIGILL, Illegal instruction.
0x0884b298 in jsimd_idct_islow_sse2

My athlon processor supports sse but not sse2. Shouldn't there be some sort of runtime detection?

Thx
« Last Edit: 18 September 2015, 08:53:33 by titi »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: 32bit linux binary illegal instruction (sse2) crash
« Reply #1 on: 16 April 2015, 14:00:26 »
People still use processors that don't support SSE2? How old is this computer?

There's no runtime detection because that would partially offset the performance benefits of SSE2 support. SSE2 is toggled by the compiler, anyway.

You'd have to recompile the binary without SSE2 instructions. I think cmake will automatically configure for SSE support, so you wouldn't have to change anything, just build it yourself (see the wiki).
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

petevine

  • Initiate
  • Posts: 6
    • View Profile
Re: 32bit linux binary illegal instruction (sse2) crash
« Reply #2 on: 16 April 2015, 15:50:08 »
You're probably compiling for 64bit processors running in 32bit mode (if I remember correctly no AMD 32bit processors ever had these instructions and only the last generation from intel), fine - just make sure this info is included on the download page or in the filename itself.
Thx

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: 32bit linux binary illegal instruction (sse2) crash
« Reply #3 on: 17 April 2015, 13:02:19 »
I  think we should really update the hardware requirements as the game is no longer meant to run on such a low spec system.
It may start up on systems of this kind, but to play it somehow confident you need 2 cores and a medium gfx card.
In fact only newer onboard/onchip gfx can handle the game in a good way and in genral I still recommend an extra gfx card.

My hardware specs are AMD Phenom 2 x4 and a geforce 650ti. With this low end gaming hardware the game runs really good.
It's a 3d game so you need 3d gaming hardware to play it.
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

filux

  • MegaGlest Team
  • Draco Rider
  • ********
  • Posts: 310
  • was OpenSuse x64, is Debian testing x64
    • View Profile
Re: 32bit linux binary illegal instruction (sse2) crash
« Reply #4 on: 18 April 2015, 09:13:39 »
"2 cores"

Description should tell a bit more than just "2 cores" because since few years computer's evolution doesn't go always forward ::) (but the price always :P).

On the market exist some NEW odd computers with "atom inside" even with @1,3GHz.
^ New PC? = yes, 2 cores? = yes, can handle MG? = no, was this PC enough cheap in relation to the performance? = definitely no :-X


Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: 32bit linux binary illegal instruction (sse2) crash
« Reply #5 on: 20 April 2015, 11:28:02 »
The simplest approach would be to use a specific CPU and GPU combo as a minimum supported spec. This can be some combination that you know works or ideally one that you have access to (so that you can ensure that it actually does work). Then we just leave it to the user to determine if their CPU + GPU is better than the reference hardware. This is mostly by necessity because there's no longer a single number (or even series of numbers) that can be used to determine the performance of a CPU or GPU. Users would usually just consult benchmarks to determine if their hardware meets the minimum specs.

It's not perfect, but the intent is really just to provide an approximation.

I think most game devs do something like this. Eg, the Witcher 3's min hardware is a i5-2500K and GTX 660. This is really quite conservative and it will likely work at lower specs. But the lower you go, the more work you'll need to get it to run well (and technically, 10 FPS is still "working" even though it's not very playable).
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

petevine

  • Initiate
  • Posts: 6
    • View Profile
Re: 32bit linux binary illegal instruction (sse2) crash
« Reply #6 on: 5 September 2015, 17:32:13 »
BTW, I managed to eventually build and run megaglest on that hardware but it was completely unusable even after all possible tweaks. (Athlon 2.2 GHz + Geforce FX5200)

I was rather surprised as the exact same box is able to run the original glest beautifully.
« Last Edit: 6 September 2015, 00:30:02 by petevine »

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: 32bit linux binary illegal instruction (sse2) crash
« Reply #7 on: 17 September 2015, 09:53:09 »
No wonder MG is "slower" than glest as it has a lot more things in it.

To compare MG to glest, do this:
- set original tileset ( forest )
- use small map like  "conflict" or "forest4Four"

in Options:
- set same screen resolution!
- disable unit particles in option
- set shadow size to 128
- switch the selection method to selectbuffer
- lower number of lights to 1

don't use Mega-CPU

Is it still slow ?
Athlon 2.2 GHz + Geforce FX5200 is not enough to play this game, but it shoudl work a bit with very low settings ( shadows off too! ) in single player.
I had this hardware too many years ago and even glest itself was not fun to play with this. 100 unit in the field and it ended up with less than 1 fps!
Both CPU and gfx are too slow. CPU will get into serious trouble with path calculation later in game and the GPU was always too slow to render a bit more detailed.

Settings for bad GPUs:
https://docs.megaglest.org/MG/FAQ#My_video_performance_is_bad.2C_what_can_I_do.3F
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

petevine

  • Initiate
  • Posts: 6
    • View Profile
Re: 32bit linux binary illegal instruction (sse2) crash
« Reply #8 on: 17 September 2015, 14:41:59 »

Is it still slow ?


I remember reading some settings wiki and editing ini files not just gui options.
So if you're really interested in my testing this please attach a set of config files that could work.

I've switched to an arm SBC for my desktop so I'm not really very motivated to try it on my own .

Thx

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: 32bit linux binary illegal instruction (sse2) crash
« Reply #9 on: 18 September 2015, 08:53:05 »
No need to test, it was just in case you wanted to try it so much. I am closing this "bug" now.
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

 

anything