Skip to content

Kodi Exit on Android : Elementum restart once and delay overall app exit #1155

@simpledork47

Description

@simpledork47

Seen on Kodi Android:

Select 'Exit' then on log

2025-10-15 14:35:45.071 T:8329     info <general>: XBMCApp: Finishing the activity
2025-10-15 14:35:45.316 T:8305     info <general>: CAndroidUtils: Current resolution: 3840x2160 1920x1080 @ 59.940060 - Full Screen
2025-10-15 14:35:46.165 T:8329     info <general>: CWinSystemAndroid::DestroyWindow
2025-10-15 14:35:46.201 T:8328     info <general>: XBMCApp: Stopping the application...
2025-10-15 14:35:46.434 T:8329     info <general>: Stopping the application...
2025-10-15 14:35:46.434 T:8329     info <general>: Stopping player
2025-10-15 14:35:46.436 T:8329     info <general>: Storing total System Uptime
2025-10-15 14:35:46.437 T:8329     info <general>: Saving settings
2025-10-15 14:35:46.464 T:8329     info <general>: Saving skin settings
2025-10-15 14:35:46.476 T:8329     info <general>: Stopping all
2025-10-15 14:35:46.863 T:8472  warning <general>: [plugin.video.elementum] DEBU  api          ▶ func10           Got notification from xbmc/System.OnQuit: {"exitcode":0}
2025-10-15 14:35:46.865 T:8472  warning <general>: [plugin.video.elementum] INFO  api          ▶ func10           Sending main closer to shutdown Elementum properly
2025-10-15 14:35:46.866 T:8472  warning <general>: [plugin.video.elementum] INFO  main         ▶ func2            Shutting down with code 0 ...
2025-10-15 14:35:46.867 T:8472  warning <general>: [plugin.video.elementum] INFO  library      ▶ CloseLibrary     Closing library...
2025-10-15 14:35:46.868 T:8472  warning <general>: [plugin.video.elementum] INFO  bittorrent   ▶ Close            Stopping Libtorrent Services...
2025-10-15 14:35:46.869 T:8472  warning <general>: [plugin.video.elementum] INFO  bittorrent   ▶ stopServices     Stopping DHT...
2025-10-15 14:35:46.870 T:8472  warning <general>: [plugin.video.elementum] INFO  bittorrent   ▶ Close            Stopping Libtorrent session...
2025-10-15 14:35:46.871 T:8472  warning <general>: [plugin.video.elementum] INFO  bittorrent   ▶ CloseSession     Waiting for completion of all goroutines
2025-10-15 14:35:46.872 T:8472  warning <general>: [plugin.video.elementum] INFO  bittorrent   ▶ onDownloadProgress  Closing download progress ...
2025-10-15 14:35:46.873 T:8472  warning <general>: [plugin.video.elementum] DEBU  bittorrent   ▶ logAlerts        Stopping service alerts
2025-10-15 14:35:46.874 T:8472  warning <general>: [plugin.video.elementum] INFO  bittorrent   ▶ onSaveResumeDataConsumer  Closing resume data consumer ...
2025-10-15 14:35:46.875 T:8472  warning <general>: [plugin.video.elementum] INFO  bittorrent   ▶ onSaveResumeDataWriter  Closing resume data loop...
2025-10-15 14:35:46.876 T:8472  warning <general>: [plugin.video.elementum] INFO  bittorrent   ▶ networkRefresh   Closing port refresh loop...
2025-10-15 14:35:46.879 T:8472  warning <general>: [plugin.video.elementum] INFO  bittorrent   ▶ onAlertsConsumer  Closing alert consumer ...
2025-10-15 14:35:46.880 T:8472  warning <general>: [plugin.video.elementum] INFO  bittorrent   ▶ CloseSession     Closing Session
2025-10-15 14:35:46.883 T:8472  warning <general>: [plugin.video.elementum] INFO  bittorrent   ▶ func1            Closed session in 279.583µs
2025-10-15 14:35:46.885 T:8472  warning <general>: [plugin.video.elementum] INFO  bittorrent   ▶ func1            Closed service in 99.369375ms
2025-10-15 14:35:46.886 T:8472  warning <general>: [plugin.video.elementum] INFO  database     ▶ Close            Closing Storm Database
2025-10-15 14:35:46.887 T:8472  warning <general>: [plugin.video.elementum] INFO  database     ▶ Close            Closing Bolt Database
2025-10-15 14:35:47.451 T:8472  warning <general>: [plugin.video.elementum] INFO  main         ▶ func2            Goodbye
2025-10-15 14:35:47.452 T:8472  warning <general>: [plugin.video.elementum] INFO  main         ▶ stopLogging      Stopping file logger
2025-10-15 14:35:47.453 T:8472  warning <general>: [plugin.video.elementum] INFO  main         ▶ func7            Initiating shutdown after receiving signal
2025-10-15 14:35:47.969 T:8483     info <general>: Skipped 1 duplicate messages..
2025-10-15 14:35:47.969 T:8483  warning <general>: [plugin.video.elementum] Shared library execution stopped with code 0
2025-10-15 14:35:47.972 T:8484  warning <general>: [plugin.video.elementum] elementumd: exiting elementumd daemon
2025-10-15 14:35:47.973 T:8484  warning <general>: [plugin.video.elementum] elementumd: elementumd daemon exited
2025-10-15 14:35:49.075 T:8472  warning <general>: [plugin.video.elementum] Joining library thread
2025-10-15 14:35:49.076 T:8472  warning <general>: [plugin.video.elementum] System information: android_arm 
2025-10-15 14:35:49.077 T:8472  warning <general>: [plugin.video.elementum] Kodi build version: 20.5 (20.5.0) Git:20240303-4b95737efa
2025-10-15 14:35:49.078 T:8472  warning <general>: [plugin.video.elementum] OS type: Linux
2025-10-15 14:35:49.078 T:8472  warning <general>: [plugin.video.elementum] uname: uname_result(system='Linux', node='localhost', release='4.9.269-ab4560', version='#1 SMP PREEMPT Tue Oct 10 21:34:40 CST 2023', machine='armv8l')
2025-10-15 14:35:49.079 T:8472  warning <general>: [plugin.video.elementum] Sleeping before next restart attempt
2025-10-15 14:35:54.118 T:8472  warning <general>: [plugin.video.elementum] elementumd: starting elementumd
2025-10-15 14:35:54.123 T:8472  warning <general>: [plugin.video.elementum] Kodi's JSON-RPC service is available, starting up...
2025-10-15 14:35:54.124 T:8397     info <general>: JSONRPC Server: New connection added
2025-10-15 14:35:54.125 T:8397     info <general>: JSONRPC Server: Disconnection detected
2025-10-15 14:35:54.125 T:8472  warning <general>: [plugin.video.elementum] Detected binary folder: /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.elementum/resources/bin/android_arm

...

2025-10-15 14:36:06.757 T:8472  warning <general>: [plugin.video.elementum] INFO  main         ▶ stopLogging      Stopping file logger
2025-10-15 14:36:07.220 T:8735  warning <general>: [plugin.video.elementum] Shared library execution stopped with code 0
...

2025-10-15 14:36:17.791 T:8329     info <general>: CWinSystemAndroid::DestroyWindowSystem
2025-10-15 14:36:17.873 T:8329     info <general>: Exiting the application...

Elementum first stop at

2025-10-15 14:35:35.983 T:8472  warning <general>: [plugin.video.elementum] INFO  bittorrent   ▶ stopServices     Stopping internal proxy
2025-10-15 14:35:35.985 T:8472  warning <general>: [plugin.video.elementum] INFO  bittorrent   ▶ stopServices     Stopping DHT...

then it launch again by itself

2025-10-15 14:35:49.079 T:8472  warning <general>: [plugin.video.elementum] Sleeping before next restart attempt
2025-10-15 14:35:54.118 T:8472  warning <general>: [plugin.video.elementum] elementumd: starting elementumd

for finally exiting

2025-10-15 14:36:06.757 T:8472  warning <general>: [plugin.video.elementum] INFO  main         ▶ stopLogging      Stopping file logger
2025-10-15 14:36:07.220 T:8735  warning <general>: [plugin.video.elementum] Shared library execution stopped with code 0

that's very slow : more than 30 seconds impacted by this spurious "start" on exit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions