Giter Club home page Giter Club logo

Comments (8)

bradharding avatar bradharding commented on June 8, 2024

Thanks for the report. I'm not familiar with Linux in any meaningful way, so I generally can't offer support, but I suspect the bug I just fixed (d7206d4) is the cause of this. Can you please try to compile again and confirm?

from doomretro.

poleve540 avatar poleve540 commented on June 8, 2024

It still gives me the same error unfortunately.

from doomretro.

ismagilli avatar ismagilli commented on June 8, 2024

Could you please provide a call stack. To do this, you will need to build the program in debug mode and run it under the debugger. You do not need to install the program. I note that you will also need a gdb debugger (in most linux distros, the package is called gdb).

  1. Cloning git repo: git clone https://github.com/bradharding/doomretro;
  2. Enter doomretro dir: cd doomretro;
  3. Compile with debug info: cmake -B build_debug -S . -DCMAKE_BUILD_TYPE=Debug; cmake --build build_debug -- -j4;
    Now executable file can be found here: build_debug/doomretro;
  4. Run with debugger: gdb -- build_debug/doomretro ARGS where ARGS is doomretro arguments, for example, -iwad DOOM.WAD;
  5. Type run or r command in gdb to run program;
  6. When a problem occurs, type backtrace or bt command in gdb to display the call stack.

from doomretro.

poleve540 avatar poleve540 commented on June 8, 2024

Sorry that I'm late. Here's the output I got from your instruction. I had to use gdb --args build_debug/doomretro ARGS

(gdb) run
Starting program: /home/salahou/doomretro/build_debug/doomretro -iwad DOOM.WAD
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff63fd640 (LWP 18364)]
[Thread 0x7ffff63fd640 (LWP 18364) exited]

Thread 1 "doomretro" received signal SIGFPE, Arithmetic exception.
0x00005555555f4f9f in I_GetScreenDimensions () at /home/salahou/doomretro/src/i_video.c:1679
1679	        WIDESCREENWIDTH = BETWEEN(NONWIDEWIDTH, ((width * ACTUALHEIGHT / height + 1) & ~3), MAXWIDTH);
(gdb) bt
#0  0x00005555555f4f9f in I_GetScreenDimensions ()
    at /home/salahou/doomretro/src/i_video.c:1679
#1  0x00005555555f5793 in I_InitGraphics ()
    at /home/salahou/doomretro/src/i_video.c:1846
#2  0x00005555555dc71f in D_DoomMainSetup ()
    at /home/salahou/doomretro/src/d_main.c:2336
#3  0x00005555555ddb81 in D_DoomMain ()
    at /home/salahou/doomretro/src/d_main.c:2678
#4  0x00005555555ddc32 in main (argc=3, argv=0x7fffffffe078)
    at /home/salahou/doomretro/src/doomretro.c:215

from doomretro.

bradharding avatar bradharding commented on June 8, 2024

Ah! Thank you for this. So, height is 0 in this instance, causing a divide by zero error. I'll look into it.

from doomretro.

bradharding avatar bradharding commented on June 8, 2024

Can you please tell me what the SDL_VIDEODRIVER environment variable is set to on your system?

from doomretro.

poleve540 avatar poleve540 commented on June 8, 2024

So if I try printenv SDL_VIDEODRIVER it gives me nothing. The default should be x11?

from doomretro.

bradharding avatar bradharding commented on June 8, 2024

It seems that a previous call to an SDL function that it meant to find your display's width and height in pixels failed, leaving height to be 0 causing the crash. After a bit of googling, it could be due to SDL_VIDEODRIVER being set incorrectly. x11 is the default. Does changing that work?

from doomretro.

poleve540 avatar poleve540 commented on June 8, 2024

Sorry for the very late reply. Finally, I give up. And anyway, I won't have access to my computer for a while.
As you said I'm pretty sure the problem is SDL_VIDEODRIVER but I don't know how to change it. I'll switch to Arch, so it doesn't matter.
I still love doomretro :)

from doomretro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.