BlitterStudio / amiberry

Optimized Amiga emulator for Linux/macOS
https://amiberry.com
GNU General Public License v3.0
660 stars 88 forks source link

Amiberry does not start #1392

Closed kec2 closed 2 months ago

kec2 commented 3 months ago

Describe the bug Amiberry does not start after update on retropie.

To Reproduce RetroPie v4.8.8 Amiberry v 5.7.1 Raspbarry pi 4

/dev/shm/runcommand.info

amiga
amiberry

bash "/home/pi/RetroPie/roms/amiga/+Start Amiberry.sh"

/dev/shm/runcommand.log

Parameters:
Executing: bash "/home/pi/RetroPie/roms/amiga/+Start Amiberry.sh"
Launching ...
./amiberry
malloc(): unsorted double linked list corrupted
/opt/retropie/emulators/amiberry/amiberry.sh: linje 107:  2636 Afbrudt (SIGABRT)       "$emulator" "${params[@]}"

Afbrudt == cancelled/aborted/stopped

giantclambake commented 3 months ago

This is a recurrence of #1295 ~ check at the bottom of that discussion.

Could you please try using your older amiberry.conf file, as described there? Does it fix the issue?

kec2 commented 3 months ago

Sure I can try but I need help with the path to amiberry.conf

If this is the correct path: "/opt/retropie/emulators/amiberry/conf/amiberry.conf" then I don't have it.

kec2 commented 3 months ago

I have created /opt/retropie/emulators/amiberry/conf/amiberry.conf with the contents of https://github.com/BlitterStudio/amiberry/blob/master/conf/amiberry.conf I have set owner to root and chmod 755. Amiberry does still not start.

giantclambake commented 3 months ago

No, you would've had to use your old v4.8.8 amiberry.conf file (going by that user's report in the discussion) ; that doesn't immediately make much sense to me though.

AFAICT the (SIGABRT) is being spawn by pushd in RetroPie-Setup/blob/master/scriptmodules/emulators/uae4arm/uae4arm.sh ...not by and of amiberry itself.

The only way to check that, would be to cd into the directory where the amiberry binary is installed, and issue the command ./amiberry ...if that works, the issue is in retro-pie ; if not, we'd need to dig further.

kec2 commented 3 months ago

If the amiberry.conf is supose to by in path: /opt/retropie/emulators/amiberry/conf when I don't have an old one.

That is why I created the file as described above.

Running

pi@retropie:/ $ cd /opt/retropie/emulators/amiberry/
pi@retropie:/opt/retropie/emulators/amiberry $ ./amiberry.sh
Launching ...
./amiberry
malloc(): unsorted double linked list corrupted
./amiberry.sh: linje 107:  1058 Afbrudt (SIGABRT)       "$emulator" "${params[@]}"
/opt/retropie/emulators/amiberry
giantclambake commented 3 months ago

You're still launching ./amiberry.sh from the cmdline, not launching directly with ./amiberry (no trailing .sh =)

kec2 commented 3 months ago

pi@retropie:/opt/retropie/emulators/amiberry $ ./amiberry malloc(): unsorted double linked list corrupted Afbrudt (SIGABRT)

giantclambake commented 3 months ago

Thanks for checking (I don't have a retro-pie setup here) ~ so it is amiberry spawning the fault, not the script ; mia culpa.

Or more succinctly put, the amiberry build as defined in the retro-pie setup scripts. As that build patches the amiberry source, and sets compiler optimization flags, one really has to eliminate that as a possible cause. The easiest way to do that, would be to download the appropriate binary tarball from https://github.com/BlitterStudio/amiberry/releases/tag/v5.7.1 and unpack it into a directory ..ie; mkdir amiberry-571 ...and cd into that directory, unpack the archive, and see if the cmd ./amiberry works or not with the binary build.

What I can say, is amiberry v5.7.1 worked on my RPi4 with debian bullseye & bookworm -- am I correct in saying you're using debian buster as the OS?

kec2 commented 3 months ago

Yes.

pi@retropie:/opt/retropie/emulators/amiberry $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

I'll check with the amiberry-v5.7.1-debian-buster-aarch64-rpi4.zip Result

pi@retropie:~/amyberry571 $ ./amiberry
-bash: ./amiberry: cannot execute binary file: Invalid format of executable file
giantclambake commented 3 months ago

Try the amiberry-v5.7.1-debian-buster-armhf-rpi4.zip package please ;)

kec2 commented 3 months ago

amiberry-v5.7.1-debian-buster-armhf-rpi4.zip start just fine.

giantclambake commented 3 months ago

Thanks for checking ~this has been driving me a little crazy for weeks now... this result infers, that there is 'something wrong' with the retro-pie build script for amiberry. As said, perhaps it has something to do with the patches they apply, or the compiler optimizations used... malloc errors are sometimes hard to call, glibc or gcc ..or both conspiring together ;)

We now know as fact, the binary release amiberry-v5.7.1-debian-buster-armhf-rpi4.zip works as expected.

Now that you've done all this triage here to help isolate the issue, you should head-on over to the retropie github page https://github.com/RetroPie/RetroPie-Setup/issues and create an issue ticket there regarding this problem....you can reference this ticket, to save you a bit of time.... umm... if the older amiberry.conf worked (v5.2.0), and the v5.7.1 amiberry.conf causes this crash, I know for fact the amiberry.conf file has grown considerably between those versions, and perhaps that's got something to do with it...just a thought..

Either way, RetroPie problem for sure ~ if amiberry 'As Released' works, big thumbs up =) I have no idea exactly how it would pan-out, using the working amiberry binary instead of what's there...probably ends badly, crashes and burns, as it hasn't been patched....then again it might work....(you won't break anything trying 8) You see, if you did copy the known working binary to replace the existing one, and it suddenly didn't work...that'd be a clue.

HTH

kec2 commented 3 months ago

For info. before I created this issue I have tried installing/updating both the binary and source version of Amiberry on RetroPie and none of them works.

I have tried the amiberry.conf from https://github.com/BlitterStudio/amiberry/releases/tag/v5.2 and it does not work.

I'll create an issue for RetroPie.

midwan commented 3 months ago

I've seen this one before also, it fails if it's compiled on RetroPie itself, but it works if the binary is compiled elsewhere. Not entirely sure what's wrong with it, but considering that Debian Buster that RetroPie is based on now EOL, I think it's not worth the time to try and dig into it more.

The pre-compiled binaries are built using Docker containers of the same Debian releases.

kec2 commented 3 months ago

I got Amiberry up and running.

This is what i did: ssh into retropie

cd /home/pi
# make a temp dir
mkdir amiberry_temp

# get the amiberry zip for RP4
wget https://github.com/BlitterStudio/amiberry/releases/download/v5.7.1/amiberry-v5.7.1-debian-buster-armhf-rpi4.zip
unzip amiberry-v5.7.1-debian-buster-armhf-rpi4.zip

# backup stuff
cd /opt/retropie/emulators/amiberry/

# Renamed the existing amiberry.conf to amiberry.conf.old
mv conf/amiberry.conf conf/amiberry.conf.old

# Renamed the existing amiberry to amiberry.old
mv amiberry amiberry.old

# Copied the 'amiberry' file to /opt/retropie/emulators/amiberry/
cp /home/pi/amiberry_temp/amiberry amiberry

:-)

giantclambake commented 3 months ago

Thanks for sharing a working solution! ;)