Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elementum is crushing too much times #968

Open
MichaelAharoni opened this issue Jan 11, 2024 · 11 comments
Open

Elementum is crushing too much times #968

MichaelAharoni opened this issue Jan 11, 2024 · 11 comments

Comments

@MichaelAharoni
Copy link

Hi Guys !

seems that some of the latest changes crushed the addon ?

used it yesterday yesterday without any issues and today its not working, tried re-install, upgrade kodi version, and everything else...
any suggestions ?

@elgatito
Copy link
Owner

There were no changes recent days.
Issue template was asking you to provide logs

@MichaelAharoni
Copy link
Author

MichaelAharoni commented Jan 11, 2024

kodi.log
My bad..

@Mdslino
Copy link

Mdslino commented Jan 15, 2024

@MichaelAharoni I had to remove everything, including the configuration, and installing again for it to work again

@elgatito
Copy link
Owner

@MichaelAharoni Make sure you have enabled remote connections in Kodi.

https://elementum.surge.sh/getting-started/installation/

@borsoslaszlo
Copy link

I had similar problem and I investigated a bit . Before the elementum crashed and was in panic there was a note in log :

2024-03-23 16:19:24.526 T:984 warning : [plugin.video.elementum] INFO bittorrent ... loadTorrentFiles ^[[0mLoading torrent file 77a211989b743471fa7c11c3c2e277e123a0e2b8.torre
2024-03-23 16:19:24.530 T:984 warning : [plugin.video.elementum] INFO bittorrent ... AddTorrent ^[[0mAdding torrent from /storage/.kodi/temp/elementum_torrents/77a211989
2024-03-23 16:19:24.531 T:984 warning : [plugin.video.elementum] panic: Success

This file had 0 length in :~/.kodi/temp/elementum_torrents directory.
I removed this file and I could restart the elementum successfully.

@antonsoroko
Copy link

@borsoslaszlo thanks! this is very helpful for debug! do you remember how this empty file was created (like what you did in elementum)? maybe there was some error during adding torrent file (before elementum started to always crash) or something like that.

@antonsoroko
Copy link

antonsoroko commented Mar 25, 2024

@elgatito i was able to reproduce this issue by creating empty file in elementum_torrents directory:

INFO  bittorrent   ▶ loadTorrentFiles  Loading torrents from: /home/user/.kodi/temp/elementum_torrents
INFO  bittorrent   ▶ loadTorrentFiles  Loading torrent file 77a211989b743471fa7c11c3c2e277e123a0e2b8.torrent
INFO  bittorrent   ▶ AddTorrent       Adding torrent from /home/user/.kodi/temp/elementum_torrents/77a211989b743471fa7c11c3c2e277e123a0e2b8.torrent
DEBU  bittorrent   ▶ AddTorrent       Adding torrent: "/home/user/.kodi/temp/elementum_torrents/77a211989b743471fa7c11c3c2e277e123a0e2b8.torrent"

panic: Success

goroutine 31 [running]:
github.com/ElementumOrg/libtorrent-go.cgo_panic__libtorrent_59a944e00f7f28f8(...)
        _libtorrent_swig.go:5279
github.com/ElementumOrg/libtorrent-go._Cfunc__wrap_new_TorrentInfo__SWIG_5_libtorrent_59a944e00f7f28f8({0xc0005d40c0, 0x5a})
        _cgo_gotypes.go:57572 +0x4c
github.com/ElementumOrg/libtorrent-go.NewTorrentInfo__SWIG_5({0xc0005d40c0, 0x5a})
        _libtorrent_swig.go:22440 +0x3e
github.com/ElementumOrg/libtorrent-go.NewTorrentInfo({0xc000709ca0, 0x1, 0xc0000502e0?})
        _libtorrent_swig.go:22547 +0x65
github.com/elgatito/elementum/bittorrent.(*Service).AddTorrent(0xc0001f6a08, 0xc0003ece70, {{0xc0005d40c0, 0x5a}, 0x1, 0x0, 0x0, {0x14f36803, 0xedd93484e, 0x1ee9520}})
        /home/user/work/elementum/bittorrent/service.go:736 +0x6d1
github.com/elgatito/elementum/bittorrent.(*Service).loadTorrentFiles(0xc0001f6a08)
        /home/user/work/elementum/bittorrent/service.go:1228 +0x891
github.com/elgatito/elementum/bittorrent.NewService.func2()
        /home/user/work/elementum/bittorrent/service.go:122 +0x26
created by github.com/elgatito/elementum/bittorrent.NewService in goroutine 1
        /home/user/work/elementum/bittorrent/service.go:120 +0x405

so i think something like ElementumOrg/libtorrent-go@3b1aa59 should be added for NewTorrentInfo function to catch exception.
but i am not really understand this SWIG part, unfortunately.

(i got intermediate generated files by using my old approach - #712 (comment))

@elgatito
Copy link
Owner

@antonsoroko @MichaelAharoni I will push a fix shortly. I can also reproduce this one.

@elgatito
Copy link
Owner

@antonsoroko You can test the latest version with a fix.

@antonsoroko
Copy link

@elgatito fix works for me:

▶ loadTorrentFiles  Loading torrent file 77a211989b743471fa7c11c3c2e277e123a0e2b8.torrent
▶ AddTorrent       Adding torrent from /home/user/.kodi/temp/elementum_torrents/77a211989b743471fa7c11c3c2e277e123a0e2b8.torrent
▶ AddTorrent       Adding torrent: "/home/user/.kodi/temp/elementum_torrents/77a211989b743471fa7c11c3c2e277e123a0e2b8.torrent"
▶ AddTorrent       Torrent file has 0 trackers
▶ AddTorrent       Setting save path to /home/user/.kodi/temp/elementum_downloads
▶ AddTorrent       Checking for fast resume data in 0000000000000000000000000000000000000000.fastresume
▶ loadTorrentFiles  Cannot add torrent from existing file /home/user/.kodi/temp/elementum_torrents/77a211989b743471fa7c11c3c2e277e123a0e2b8.torrent: torrent has no metadata

Although, maybe it also makes sense to delete such bogus torrent files?

@elgatito
Copy link
Owner

@antonsoroko I would leave them "as is" as they can come from different sources, not only Elementum.
Since they are not a problem anymore - we can ignore them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants