Comments (11)
Is this always happening to you? could you provide a minimal program to reproduce it?
from frostwire-jlibtorrent.
also, what version of libtorrent are you running?
from frostwire-jlibtorrent.
I test with jlibtorrent-linux-1.1.0.19.jar.
I saw this crash only 1 time so far.
Sorry, I don't know how to reproduce it.
Where does the problem occur? com.frostwire.jlibtorrent.swig.libtorrent_jni.torrent_handle_info_hash?
I don't know much about JNI :(
from frostwire-jlibtorrent.
JNI is very sensitive to memory management issues. I will keep this open in case we start to get this errors
from frostwire-jlibtorrent.
Unfortunately I see a lot of crashes. Older versions might be more stable?
In my test code I get a list of torrents with getSwig().get_torrents() and request several fields from every torrent.
I frequently get a new list of torrents and iterate through it.
from frostwire-jlibtorrent.
Older version if anything are more unstable and with more bugs from libtorrent itself. Can't give you an estimate, but I'm reviewing this (and the others).
from frostwire-jlibtorrent.
I think I saw many more crashes when I worked on the session concurrently with several threads. I tried to reduce the concurrency which made things better.
You tried to make anything thread-safe?
Probably the safest way is to always use only listeners, or?
from frostwire-jlibtorrent.
I wouldn't treat anything thread-safe unless stated otherwise, specially Session
since it holds a lot of states (mutable data). Listeners and alerts are the way to interact with the session. A TorrentHandle
coming from an alert is a very delicate object and should be used for the smaller amount of time and never shared to other threads.
from frostwire-jlibtorrent.
What about removing and adding a torrent? I think at least removing can cause a lot of troubles if the AlertLoop-Thread works on a handle of a torrent which was just deleted.
Is it necessary to start alertsLoop() in the session constructor? I think I would start it once the first listener was added.
Currently I am thinking about modifying the Session-alertsLoop so I can run also my own code on this thread. Do you think this is a good idea?
from frostwire-jlibtorrent.
I need to think a little more about concurrency issues while removing a torrent.
AlertsLoop and Session are there to provide an out-of-the-box solution. I personally don't see an advantage of no starting it in the constructor (you will need it pretty soon anyway).
Can say without knowing what's your modification. If you don't mind sharing it.
from frostwire-jlibtorrent.
@WhiteTrashLord reopening for more review.
from frostwire-jlibtorrent.
Related Issues (20)
- No implementation found for void com.frostwire.jlibtorrent.swig.libtorrent_jni.swig_module_init() HOT 1
- Adding a download with changed priorities doesn't recognize the new priorities if download was finished earlier. HOT 9
- Downloads are not compatible HOT 4
- Download issues in Samsung Galaxy devices HOT 9
- How to Compile in embedded system, the platform is arm32. HOT 1
- [desktop] Calling SessionManager stop() takes forever after torrent is finished HOT 8
- dhtNodes Always 0 HOT 26
- Docker script Q&A HOT 5
- Error in Vectors.byte_vector2string
- sessionManager.stats().dhtNodes() always 0 HOT 4
- How to merge libraries into one? HOT 2
- Pure virtual function called! On Android 10+ [Using version 1.2.16.0] HOT 1
- Upgrading to libtorrent 2.0, it's time. HOT 1
- Low memory bug HOT 3
- Is it possible use your libtorrent.i wrap a c# version? HOT 11
- native crash HOT 1
- Debugging libtorrent crash on Android HOT 3
- iOS compatibility? HOT 8
- Cannot build 2.0 binaries HOT 7
- Question: Whatβs the best way to limit resource usage or decrease the priority of the torrent download thread? HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frostwire-jlibtorrent.