Coder Social home page Coder Social logo

Comments (25)

sv244 avatar sv244 commented on August 18, 2024

Ok, solved. I needed to update my AlertListener. Now the part where TorrentInfo is null.

from frostwire-jlibtorrent.

sv244 avatar sv244 commented on August 18, 2024

That didn't seem to be the whole problem. I'm still getting the error, but I updated all my code.

08-07 15:22:23.845 2398-2567/pct.droid.dev A/libcīš• Fatal signal 11 (SIGSEGV), code 1, fault addr 0xcaae3e20 in tid 2567 (Session-alertsL)

And I have no idea what I should search for. I don't even know if this isn't a problem in libtorrent itself.

from frostwire-jlibtorrent.

aldenml avatar aldenml commented on August 18, 2024

Can you paste a longer log output? I need to see more about the stack trace.

from frostwire-jlibtorrent.

sv244 avatar sv244 commented on August 18, 2024
08-07 16:09:16.843  22307-22307/pct.droid.dev A/libcīš• Fatal signal 11 (SIGSEGV), code 1, fault addr 0xcaae3e20 in tid 22307 (pct.droid.dev)
08-07 16:09:19.403  22307-22307/pct.droid.dev W/pct.droid.devīš• type=1701 audit(0.0:172): auid=4294967295 uid=10243 gid=10243 ses=4294967295 subj=u:r:untrusted_app:s0 reason="memory violation" sig=11

This is all I get. (Didn't notice the second line before)

from frostwire-jlibtorrent.

aldenml avatar aldenml commented on August 18, 2024

With version of jlibtorrent are you working with?

from frostwire-jlibtorrent.

sv244 avatar sv244 commented on August 18, 2024

1.1.0.2

from frostwire-jlibtorrent.

aldenml avatar aldenml commented on August 18, 2024

Yesterday I found another null pointer error in libtorrent, it's already merged (arvidn/libtorrent#72). In a few hours I will release another version, maybe this fix your issue. If not, I will need more info from you. Let's see.

from frostwire-jlibtorrent.

sv244 avatar sv244 commented on August 18, 2024

Hopefully! Thanks.

from frostwire-jlibtorrent.

aldenml avatar aldenml commented on August 18, 2024

@sv244 I released version 1.1.0.3, let me know if you are still getting the error.

from frostwire-jlibtorrent.

sv244 avatar sv244 commented on August 18, 2024

I'll try 👍

from frostwire-jlibtorrent.

gubatron avatar gubatron commented on August 18, 2024

sweet

from frostwire-jlibtorrent.

sv244 avatar sv244 commented on August 18, 2024

That I'm going to try it doesn't mean it is solved.

from frostwire-jlibtorrent.

gubatron avatar gubatron commented on August 18, 2024

gotcha

from frostwire-jlibtorrent.

sv244 avatar sv244 commented on August 18, 2024

Nope.

08-07 21:31:16.342 21220-21246/pct.droid.torrentstreamer.sample A/libcīš• Fatal signal 11 (SIGSEGV), code 1, fault addr 0x5e76f142 in tid 21246 (Session-alertsL)

from frostwire-jlibtorrent.

gubatron avatar gubatron commented on August 18, 2024

dang

from frostwire-jlibtorrent.

sv244 avatar sv244 commented on August 18, 2024

I'll push my code to a repo. Maybe I'm doing something completely wrong.

Although, it worked ok with previous versions.

from frostwire-jlibtorrent.

gubatron avatar gubatron commented on August 18, 2024

👍

from frostwire-jlibtorrent.

sv244 avatar sv244 commented on August 18, 2024

https://github.com/sv244/TorrentStream-Android

from frostwire-jlibtorrent.

gubatron avatar gubatron commented on August 18, 2024

link(s) to file(s)?

from frostwire-jlibtorrent.

sv244 avatar sv244 commented on August 18, 2024

Anything within https://github.com/sv244/TorrentStream-Android/tree/develop/library/src/main/java/pct/droid/torrentstream

TorrentStream.java to be more specific.

from frostwire-jlibtorrent.

aldenml avatar aldenml commented on August 18, 2024

Ok, no promise on timing, I will take a close look.

from frostwire-jlibtorrent.

sv244 avatar sv244 commented on August 18, 2024

No worries. That you will is good enough for me.

from frostwire-jlibtorrent.

sv244 avatar sv244 commented on August 18, 2024

I also noticed that TorrentInfo is null most of the times. Might be related?

https://github.com/sv244/TorrentStream-Android/blob/develop/library/src/main/java/pct/droid/torrentstream/Torrent.java#L137
https://github.com/sv244/TorrentStream-Android/blob/develop/library/src/main/java/pct/droid/torrentstream/Torrent.java#L239

from frostwire-jlibtorrent.

aldenml avatar aldenml commented on August 18, 2024

Ok @sv244 , in this line https://github.com/sv244/TorrentStream-Android/blob/develop/library/src/main/java/pct/droid/torrentstream/TorrentStream.java#L372

you are getting a reference to a torrent handle from an alert. This references are short lived inside libtorrent, then the "Fatal signal 11". Use the following instead:

TorrentHandle th = mTorrentSession.findTorrent(((TorrentAddedAlert) alert).getHandle().getInfoHash());
mCurrentTorrent = new Torrent(th, listener);

Now, when do you not get the NPE (I will write about it after this), you will get to the point of:

08-07 22:29:12.121    9544-9544/pct.droid.torrentstreamer.sample D/Torrentīš• onStreamProgress: 1
08-07 22:29:12.121    9544-9544/pct.droid.torrentstreamer.sample D/Torrentīš• onStreamProgress: 1
08-07 22:29:12.121    9544-9544/pct.droid.torrentstreamer.sample D/Torrentīš• onStreamProgress: 2

Now, about the NPE. The problem is that you are downloading a magnet, at the very beginning, the torrent info is null, since the metadata is not available. Check the class MetadataReceivedAlert.

Let us know.

from frostwire-jlibtorrent.

sv244 avatar sv244 commented on August 18, 2024

You're a hero! It completely works now.

from frostwire-jlibtorrent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.