zach-morris / plugin.program.iagl

The Internet Archive Game Launcher (IAGL) will launch Games from the Internet using Kodi
GNU General Public License v3.0
347 stars 49 forks source link

Retroplayer crashes for OpenGL based cores #170

Open BullShark opened 4 years ago

BullShark commented 4 years ago

Bug report

Describe the bug

Trying to launch any Nintendo 64 game from IAGL add-on in Kodi results in Kodi crashing.

Expected Behavior

Launch the game in mupen64 emulator after downloading the game.

Actual Behavior

Crashes Kodi with a seg fault

Possible Fix

I suspect that the addons work without crashing Kodi in older versions of Kodi.

To Reproduce

Steps to reproduce the behavior: Here's the steps I took.

Install all of these using yay.

Install kodi-x11 Install kodi-addon-game-libretro Install kodi-addon-game-libretro-mupen64plus

Download the IAGL zipfile

In Kodi:

Add the zipfile to get the repo. Install IAGL from the new repo. Install Nintendo 64 Controller Nintendo - Nintendo 64 (Muphen64Plus) Install IAGL - Internet Archive Game Launcher

In Kodi:

IAGL -> Browse All Lists -> Internet Archives Best Of N64 -> The Legend of Zelda - Ocarina of Time or 007

It seems to happen with every Nintendo 64 game.

Results: Crashes Kodi every time.

$ kodi --debug
/usr/bin/kodi: line 219: 349385 Segmentation fault      (core dumped) ${KODI_BINARY} $SAVED_ARGS
Crash report available at /home/bullshark/kodi_crashlog-20200615_004443.log

Is the save file being opened before checking if it exists? And a save file is expected the first time a game is ran when there has been no saves.

2020-06-15 00:44:38.748 T:140704015163264 ERROR: Failed to open savestate file /home/bullshark/.kodi/userdata/addon_data/plugin.program.iagl/temp_iagl/Legend of Zelda, The - Ocarina of Time (USA) (Rev B).sav kodi_crashlog-20200615_004443.log

Edit:

Here's another crash log after I installed gdb. kodi_crashlog-20200615_005007.log

http://odin.root.sx/kodi_crashlog-20200615_005007.log

Debuglog

The debuglog can be found here:

Screenshots

Here are some links or screenshots to help explain the problem:

Just before the crash:

Screenshot_20200615_072724

The crash happens immediately after the download for any N64 game.

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

Your Environment

Used Operating system: Manjaro Linux with KDE latest.

$ uname -a
Linux plasma 5.7.0-3-MANJARO #1 SMP PREEMPT Wed Jun 3 03:15:33 UTC 2020 x86_64 GNU/Linux
$ kodi --version
18.7 Git:20200603-nogitfound Media Center Kodi
Copyright (C) 2005-2020 Team Kodi - http://kodi.tv
$ pacman -Q | grep kodi
kodi 18.7.1-3
kodi-addon-game-libretro 1.1.1-5
kodi-addon-game-libretro-mupen64plus 2.5.0.6-14
kodi-addon-visualization-projectm 1:2.2.0-15
kodi-platform 20190726.809c5e9-10
kodi-x11 18.7.1-3
$ 

I created a .sav file and saved it where it was being looked for. That didn't prevent the crash.

I opened the same game in M64Py, a gui frontend to mupen64, and it opened the game without error.

yeahme49 commented 4 years ago

kodi doesn't support opengl and all the libretro n64 emus use opengl. use iagl to launch retroarch or a different emu and it should work

BullShark commented 4 years ago

kodi doesn't support opengl and all the libretro n64 emus use opengl. use iagl to launch retroarch or a different emu and it should work

I've been trying that. I haven't been able to get it to work. Can you help?

Screenshot_20200617_193135 Screenshot_20200617_193332

The game works in retroarch launched without kodi just fine.

Screenshot_20200617_193731

BullShark commented 4 years ago

Screenshot_20200617_215932 Is it possible that Kodi is calling retroarch without passing the -L flag?

This works. retroarch -f -L /usr/lib/libretro/parallel_n64_libretro.so Game.n64

This does not work. Retroarch will fail to launch. retroarch -f Game.n64

I cannot tell what arguments IAGL is passing to Retroarch when trying to launch the game. I tried creating a wrapper script in bash for IAGL to launch Retroarch with the -L /path/to/emulator_libretro.so and had no luck with it yet.

BullShark commented 4 years ago

bump

zach-morris commented 3 years ago

This is a Kodi issue, reference https://github.com/xbmc/xbmc/issues/15874.

Launching externally works. See here for troubleshooting tips on external launching.

zach-morris commented 3 years ago

I've updated the title of this issue just so people are aware of the state of this.

Kodi currently doesn't support OGL only cores, such as N64. I think the target is v20 Kodi for this. See here.

There's nothing IAGL can do to make Retroplayer work for these since it's Kodi functionality. For these game lists, you have to launch them externally (or hide them for now).