Posts by hdkiller

    @seo and vpeter found the solution on IRC.


    Moonlight.py had to be updated to reflect the changes made in moonlight:

    The SSL patch still needed.

    I will update the addon.py in the next following days to include the new parameters and remove the controller mapping section and check pairing too.

    Thank you all the help you guys provided.

    Thanks guys!

    I was trying v3 and well, it way much better than was. I was able to open the app list serveral times before it's crashes. I tought this will solve the crash too but it's seems like it's still happens but much rearly. I tired loading the lib with python and now it's successfuly loads. So that OpenSSL problem is gone.

    Here is a gdb output as vpeter suggested yesterday when the crash happens: WCYF

    Hello!

    I was debuging addon.py and it's seems like the kodi crash happens when the code reach xbmcplugin.endOfDirectory(addon_handle)

    script.moonlight/addon.py at master · dead/script.moonlight · GitHub (line 69)

    I don't really understand what's going on, i have debuged and it's connect to moonlight, fetch the apps, posters, etc So maybe that EVP_CIPHER_CTX_new not relevant at all, since when kodi calls addon.py it doesn't throw that error.

    Anyway, if the gs.connect_server() called, it works, but at the end, kodi crashes. So I removed from the addon all references to LibGameStream and manually added just one item, that way it works. So maybe it's really some compiling issue.. At this point i am going to give up and live with this workaround.


    Could you please check this out? Maybe the addon isn't build properly?

    I have tested the new .zip it's works!

    It's crashes like the previous one when I stop a stream and enter again to the game listing, but that problem was existed and it's not a new one.

    Thank you very much!

    Any idea how to troubleshoot the crash when I launch the addon again after a stream stopped?

    I can't test today but tomorrow I will.

    Also there is some issue with the listing Kodi still randomly crashes when I launch the moonlight addon to list the games. I will provide logs too by tomorrow.

    Plus I believe I should spend some time to understand the current parameters for moonlight and review the launcher addon and that moonlight.sh, because as far as I see it doesn't respect everything I set in the UI.

    Unrelated but some games doesn't have proper xinput implementation, but I figured out it's possible to set some controller emulation in Steam Big Picture, when those set those games works properly as well.

    Actually this moonlight-streaming on a Pi3 with Ethernet works surprisingly well. I can't tell I am not playing on localhost honestly I am a bit shocked.

    Could you please help me out where I can find the addon log file set in the moonligh.sh ${ADDON_LOG_FILE} ? I had to hardcode it to have logs, but I belive there is an easier way to enable logging.

    Thanks

    Laszlo

    Thanks guys, now everything works!

    I had to edit ~/.kodi/addons/script.moonlight/moonlight.sh and do the following changes:


    (Remove forcehw param and change the -fps params)

    So with all these modification your zip works:

    - change library links in ~/.kodi/addons/script.moonlight/lib/moonlight.py

    - wget the latest gamecontrollerdb.txt to ~/.config/moonlight/gamecontrollerdb.txt

    - comment out forcehw and change the fps in the launch script ~/.kodi/addons/script.moonlight/bin/moonlight.sh

    - systemctl restart script.moonlight.service

    Now everything works so far as I expected, controller, streaming etc.


    I have also found the reason for the kodi crash when the addon tries to list the games on the host, but I don't know how to fix it, but it's reproducable. If there is no name resolving (no working DNS set) then kodi crash when I launch the moonlight addon on the GUI. If I set a DNS then the listing works properly.

    How should I process to make these changes avaiable for others in the upcoming updates?

    Thank you,

    Laszlo

    moonlight runs in console but the current plugin throws this:

    Code
    09:54:13.265 T:1858073504   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!                                            Error Type: <type 'exceptions.OSError'>                                            Error Contents: /storage/.kodi/addons/script.moonlight/lib/libmoonlight-common.so.0: cannot open shared object file: No such file or directory

    so i edited ~/.kodi/addons/script.moonlight/lib/moonlight.py and changed:

    Code
    LibreELEC:~/.kodi/addons/script.moonlight/lib # cat moonlight.py |grep so        self.commonlib = ctypes.cdll.LoadLibrary(os.path.join(libpath, "libmoonlight-common.so"))        self.gslib = ctypes.cdll.LoadLibrary(os.path.join(libpath, "libgamestream.so"))


    but still no luck, it's possible to list apps "sometimes" from kodi, but i can't stream, i will try it from console since i didn't found any logs.. but kodi propably crashes when i try to stream

    I had to download gamecontrollerdb.txt to ~/.config/moonlight

    then systemctl stop kodi

    and after that i can start from console and works as expected including the controller now mapped properly

    so i belive the problem is somewhere within the launcher but atleast the streaming and the controller works properly

    How should I progress to find the reason why kodi crashes when I try to start the stream from the UI?