update moonlight-embedded to 2.4.3

  • 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.

  • Post by vpeter ().

    This post was deleted by the author themselves ().
  • Seems moonlight-embedded needs to use this patch

    Diff
    1. --- a/libgamestream/CMakeLists.txt 2017-09-07 20:15:39.000000000 +0200
    2. +++ b/libgamestream/CMakeLists.txt 2017-09-16 09:11:24.090887894 +0200
    3. @@ -27,7 +27,7 @@ set_target_properties(moonlight-common P
    4. target_include_directories(gamestream PRIVATE ../third_party/moonlight-common-c/src ../third_party/h264bitstream ${AVAHI_INCLUDE_DIRS} ${LIBUUID_INCLUDE_DIRS})
    5. target_include_directories(moonlight-common PRIVATE ../third_party/moonlight-common-c/reedsolomon ${ENET_INCLUDE_DIRS})
    6. target_link_libraries(gamestream ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES} ${EXPAT_LIBRARIES} ${AVAHI_LIBRARIES} ${LIBUUID_LIBRARIES})
    7. -target_link_libraries(moonlight-common ${ENET_LIBRARIES})
    8. +target_link_libraries(moonlight-common ${ENET_LIBRARIES} ${OPENSSL_LIBRARIES})
    9. target_link_libraries(gamestream ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})

    and PKG_DEPENDS_TARGET for openssl then libmoonlight-common.so has dependencies for required ssl and crypto library

    Code
    1. LibreELEC:~/.kodi/addons/script.moonlight # ldd lib/libmoonlight-common.so
    2. linux-vdso.so.1 (0x00007ffea8b3d000)
    3. libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0x00007f6e489e6000)
    4. libc.so.6 => /usr/lib/libc.so.6 (0x00007f6e4864e000)
    5. libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f6e4844a000)
    6. /usr/lib64/ld-linux-x86-64.so.2 (0x00007f6e48c5a000)

    and python is happy loading library

    Code
    1. Python 2.7.13 (default, Sep 15 2017, 21:26:44)
    2. [GCC 6.2.0] on linux2
    3. Type "help", "copyright", "credits" or "license" for more information.
    4. >>> import ctypes
    5. >>> ctypes.cdll.LoadLibrary("lib/libmoonlight-common.so")
    6. <CDLL 'lib/libmoonlight-common.so', handle 1eff390 at 7fc2fea65c50>
    7. >>>


    I bet addon will now work as expected. I assume one kodi thread crashed because of missing symbol(s).

    my lamp addon (unofficial/community) (limited no support)
    my touchscreen support and instructions by Grruhn (now touchscreen addon exists in repository)

  • 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

  • @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.