Recent

Author Topic: [solved]my slackware sdl2 fpc game not running in ubuntu  (Read 3751 times)

billyb123

  • New Member
  • *
  • Posts: 26
[solved]my slackware sdl2 fpc game not running in ubuntu
« on: November 21, 2017, 06:21:53 pm »
i compiled it in slackware => works like a charm
i compiled it in windows => works like a charm

then i installed sdl2 libs in ubuntu, tried running the game, no go, tried recompiling in ubuntu, still no go
Code: [Select]
An unhandled exception occurred at $00007FD811367634:
EDivByZero: Division by zero
  $00007FD811367634

of course, there is no divison by zero in my code, must be some lib or something
backtrace from gdb says
Code: [Select]
Program received signal SIGFPE, Arithmetic exception.
0x00007ffff7b7f634 in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
(gdb) bt
#0  0x00007ffff7b7f634 in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#1  0x00007ffff7b8021a in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#2  0x00007ffff7b837c6 in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#3  0x00007ffff7b75d09 in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#4  0x00007ffff7add397 in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#5  0x000000000040203a in ?? ()
#6  0x00007fffffff0030 in ?? ()
#7  0x000000000041c159 in ?? ()
#8  0x00007fffffffdd30 in ?? ()
#9  0x0000000000402689 in ?? ()
#10 0x00007fffffffdd40 in ?? ()
#11 0x0000000000405a2e in main ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

any ideas on what to do?
« Last Edit: November 24, 2017, 01:23:32 pm by billyb123 »

Handoko

  • Hero Member
  • *****
  • Posts: 5130
  • My goal: build my own game engine using Lazarus
Re: my slackware sdl2 fpc game not running in ubuntu
« Reply #1 on: November 21, 2017, 06:46:45 pm »
Can you share the Linux binary? I'm using Ubuntu Mate 17.10 64-bit, I would like to test it to find out what goes wrong.

billyb123

  • New Member
  • *
  • Posts: 26
Re: my slackware sdl2 fpc game not running in ubuntu
« Reply #2 on: November 22, 2017, 12:31:13 am »
sure thing, i've sent you the binary, check your messages

Handoko

  • Hero Member
  • *****
  • Posts: 5130
  • My goal: build my own game engine using Lazarus
Re: my slackware sdl2 fpc game not running in ubuntu
« Reply #3 on: November 22, 2017, 03:33:43 am »
I managed to make it works on my Ubuntu Mate 17.10.

I just updated my Ubuntu a month ago, so technically it didn't have SDL installed. I checked the binary of your game, I saw 2 libraries were missing:
- libSDL2-2.0.so.0
- libSDL2_image-2.0.so.0

So, using Synaptic Package Manager I installed both libsdl-2.0-0 and libsdl2-image-2.0-0. Problem solved.

billyb123

  • New Member
  • *
  • Posts: 26
Re: my slackware sdl2 fpc game not running in ubuntu
« Reply #4 on: November 22, 2017, 03:49:33 am »
thanks, but i did install those exact libs on ubuntu before starting it.. maybe its something to do with ubuntu version.. 16.04 in my case..

Handoko

  • Hero Member
  • *****
  • Posts: 5130
  • My goal: build my own game engine using Lazarus
Re: my slackware sdl2 fpc game not running in ubuntu
« Reply #5 on: November 22, 2017, 03:58:47 am »
Is your Ubuntu 32-bit or 64-bit? Mine is 64-bit.

Have you checked missing libraries by using ldd command in your terminal?
Code: Pascal  [Select][+][-]
  1. ldd dagoban

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: my slackware sdl2 fpc game not running in ubuntu
« Reply #6 on: November 22, 2017, 03:25:12 pm »
Try putting this somewhere near the top of you main program:

Code: Pascal  [Select][+][-]
  1. var
  2.   FPUExceptionMask: TFPUExceptionMask;
  3. ..
  4. begin
  5.   FPUExceptionMask := GetExceptionMask;
  6.   SetExceptionMask(FPUExceptionMask + [exZeroDivide]);
  7. ...
  8.  

billyb123

  • New Member
  • *
  • Posts: 26
Re: my slackware sdl2 fpc game not running in ubuntu
« Reply #7 on: November 24, 2017, 01:23:20 pm »
@marcov - still crashed..
but i reinstalled ubuntu on another machine for giggles.. it now works..
ill mark it solved.. thanks for the replies

 

TinyPortal © 2005-2018