amiberry on CachyOS (Arch Linux) buffer overflow #1516
-
I haven't put this in issues because I think this is something i'm getting wrong and not a problem with the code. When I first installed CachyOS, I installed Amikit, and used the amiberry compiled for Debian Bookworm. It worked fine. Then I rebooted and now everytime I try to launch amiberry is says buffer overflow detected and core dumps. I then compiled it myself and and it would do the same thing on the one I compiled. However, if I run amiberry as root, it works fine. That makes me think that somehow amiberry is trying to write to a directory my user doesn't have permissions too? Has anyone seen this behavior or know what I might be doing wrong? I think maybe it's wayland related? I just ran it with SDL_VIDEODRIVER=x11 amiberry and it works |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 5 replies
-
Which version of Amiberry are we talking about? Wayland works fine normally, but there is an SDL2 issue that can be bypassed with a certain setting. Check the wiki here: https://github.com/BlitterStudio/amiberry/wiki/FAQ#q-on-debian-bookworm-the-performance-when-running-in-full-window-is-terrible-but-its-much-faster-in-windowed-mode-what-is-going-on |
Beta Was this translation helpful? Give feedback.
-
@midwan ~ ...just now looking at that FAQ entry, it brought back memories of a discussion had in the LFS camp about 20years ago. The polemical argument was about providing 'instruction', versus the use of 'instructions' ... *That FAQ entry uses instructions ~ how to open the nano editor in root mode ; having to provide passwd if prompted ; the respective lines of text to enter into the editor window (can be c&p) ; how to command nano into 'operations' mode ; how to actually save the file & exit nano.... There is nothing 'wrong' with that approach ~ in fact from a learning/teaching perspective, it is likely the 'right' way to go about it, however in practice such can very much 'fall on its face', due to one facet --- human fallibility ; it is far to easy to introduce typos. What we found was folks can copy-to-buffer/paste far more accurately than manually entering text in a console/xterm ;) In as much as learning/teaching stands to lose it's purchase here, for the sake of 'correct' results, the resolve was to put all 'critical' text entry into the copy-to-buffer field, and provide instruction to folks of 'what to do next'....ie; for the example here... *Open a console/xterm and paste the following command and hit Enter (then providing your password if required)
*Log out and log back in, for the changes to take effect. If one can for a moment put themselves into the shoes of a user, who just wants to use amiberry, faces this problem, and just wants an easy cut&paste fix (and never wants to nor will ever use nano in the future)....which approach best appeals here, and will most likely result in a positive outcome (for the user).... instructions? Or instruction? ....my money is on the latter 8) /2cents Note: that FAQ entry is 'dangling' somewhere between mentioning debian at the outset, but closing with reference to raspi-config, which makes me question if this is an RPi specific thing....it might make some question if it applies to debian desktop on other platforms... |
Beta Was this translation helpful? Give feedback.
-
This is what happens: ~/amikit/Amiberry ~/amikit/Amiberry Not much in the log: ❯ tail amiberry.log Compiled against SDL2 v2.26.5, Linked against SDL2 v2.30.9 Now the odd part: ~/amikit/Amiberry ~/amikit/Amiberry It works if I set SDL_VIDEODRIVER to just x11 What made me try this to begin with is I compiled it with Debug Mode, and then I threw the coredump in gdb. First I cloned the preview build and built it with Debug like the instructions said: ~/git/amiberry/build preview ~/git/amiberry/build preview Still same problem with SDL_VIDEODRIVER set So I threw it in gdb: ~/git/amiberry/build preview GNU gdb (GDB) 15.2 For help, type "help". This GDB supports auto-downloading debuginfo from the following URLs: I'm not really a programmer though so this could be just digging into stuff I don't fully understand. I think I narrowed it down to the specific problem though: ~/git/amiberry/build preview 3m 25s ~/git/amiberry/build preview So what is causing the buffer overflow for me is the kmsdrm part. I have an AMD Radeon RX 5700 XT, i'm wondering if that kmsdrm part is nvidia specific? |
Beta Was this translation helpful? Give feedback.
-
@ut316ab -- cannot recreate this issue here .... steps taken; *Fresh installation of CacheyOS current, in XFCE4 flavor, onto x86-64 platform (HP Elitedesk 800 G1) //note: git & ninja should perhaps be part of that commandline...definitely git..? * //note: seems there's a need to issue Now I can just issue Note: the env_var SDL_VIDEODRIVER is unset/unused I've listed the steps, hopeful you might spot something that I'm doing (which works), versus what you're doing there... I don't have AmiKit installed, but I treat that like I would say ClassicWB.... it's just using the 'stock' amiberry build, so I find it easier to move it's .hdf/directories under ~/Amiberry/harddrives/amikit12/ , and just change it's config.uae file accordingly... ...also, things like which window manager is being used can be participle...maybe you can provide some more details, that might help me recreate this with CacheyOS...but right the now, it's working as expected here 8) |
Beta Was this translation helpful? Give feedback.
-
..I was able to recreate this here, simply by providing the sdl2_fix.sh script, to the stock CacheyOS environment...ergo, fix is..
For mine, the problem starts with - https://github.com/BlitterStudio/amiberry/wiki/FAQ#q-on-debian-bookworm-the-performance-when-running-in-full-window-is-terrible-but-its-much-faster-in-windowed-mode-what-is-going-on ...specifically the words ... (Bookworm is using Wayland by default) ....that, is a generalistic misnomer. The actual situation wrt wayland support in debian, is summarized here -> https://wiki.debian.org/Wayland ....the cliff notes... -anything listed there as 'unsupported' will very likely get x11/Xorg, not wayland -For games, applications, or other software that uses SDL2 as a toolkit, set the SDL_VIDEODRIVER environment variable to "wayland". Note that doing this on a system-wide basis isn't recommended, as many proprietary applications use statically-linked versions of SDL2 that are older and may break when forcing the usage of Wayland. It should be noted the sdl2_fix.sh script, is applying the change system-wide, which as we read is not recommended. -GDM (GNOME Display Manager) will automatically use Wayland when supported, except when using the proprietary NVIDIA driver, in which case it will fall back to X11 due to instability. ...I could go on, but the point is debian does not use wayland by default -- it depends on platform, and which window manager you select.... and obviously things like video driver. ...I sent an email to Jan (of AmiKit) pointing this out....it likely does apply to RPi/Raspbian, but definitely does not apply to something like CacheyOS on x86-64....he'll likely sort it out in due course ;) HTH |
Beta Was this translation helpful? Give feedback.
-
I've fixed the FAQ. |
Beta Was this translation helpful? Give feedback.
..I was able to recreate this here, simply by providing the sdl2_fix.sh script, to the stock CacheyOS environment...ergo, fix is..
sudo rm /etc/profile.d/sdl2_fix.sh
//you likely need to log out, and log in again for changes to take effectFor mine, the problem starts with - https://github.com/BlitterStudio/amiberry/wiki/FAQ#q-on-debian-bookworm-the-performance-when-running-in-full-window-is-terrible-but-its-much-faster-in-windowed-mode-what-is-going-on
...specifically the words ... (Bookworm is using Wayland by default) ....that, is a generalistic misnomer. The actual situation wrt wayland support in debian, is summarized here -> https://wiki.debian.org/Wayland ....the cliff notes...
-an…