mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-03-02 22:57:32 -05:00
ASSERT: "first <= last" in file src/base/indexrange.h, line 45 #8658
Labels
No labels
Accessibility
AppImage
Bounty
Build system
CI
Can't reproduce
Code cleanup
Confirmed bug
Confirmed bug
Core
Crash
Data loss
Discussion
Docker
Documentation
Duplicate
Feature
Feature request
Feature request
Feature request
Filters
Flatpak
GUI
Has workaround
I2P
Invalid
Libtorrent
Look and feel
Meta
NSIS
Network
Not an issue
OS: *BSD
OS: Linux
OS: Windows
OS: macOS
PPA
Performance
Project management
Proxy/VPN
Qt bugs
Qt6 compat
RSS
Search engine
Security
Temp folder
Themes
Translations
Triggers
Waiting diagnosis
Waiting info
Waiting upstream
Waiting web implementation
Watched folders
WebAPI
WebUI
autoCloseOldIssue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/qBittorrent#8658
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Golutazem on GitHub (May 9, 2019).
Debug build compiled from Git Head checked out today.
GNU+Linux+Xorg with Qt 5.12.3 , libtorrent-rasterbar 1:1.1.12
Steps to reproduce
Add a torrent file from the file select dialogue.
Resulted in
ASSERT: "first <= last" in file src/base/indexrange.h, line 45
BackTrace:
#2 in QMessageLogger::fatal(char const*, ...) const () from /usr/lib/libQt5Core.so.5
#3 in qt_assert(char const*, char const*, int) () from /usr/lib/libQt5Core.so.5
#4 in IndexInterval::IndexInterval (last=3506, first=3507, this=) at /usr/include/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp:125
#5 makeInterval (last=3506, first=3507) at src/base/indexrange.h:66
#6 BitTorrent::TorrentInfo::filePieces (this=this@entry=0x7fffffffd1f0, fileIndex=fileIndex@entry=4682)
at src/base/bittorrent/torrentinfo.cpp:368
#7 in BitTorrent::TorrentHandle::setFirstLastPiecePriorityImpl (this=this@entry=0x5555607ca410, enabled=false, updatedFilePrio=...)
at src/base/bittorrent/torrenthandle.cpp:1394
#8 in BitTorrent::TorrentHandle::setFirstLastPiecePriority (this=this@entry=0x5555607ca410, enabled=) at /usr/include/qt/QtCore/qarraydata.h:257
#9 in BitTorrent::TorrentHandle::TorrentHandle (this=0x5555607ca410, session=, nativeHandle=..., params=...)
at src/base/bittorrent/torrenthandle.cpp:206
#10 in BitTorrent::Session::createTorrentHandle (this=0x5555561ae1e0, nativeHandle=...)
at src/base/bittorrent/session.cpp:3842
#11 in BitTorrent::Session::handleAddTorrentAlert (this=this@entry=0x5555561ae1e0, p=p@entry=0x7fff72e7d2e8)
at src/base/bittorrent/session.cpp:3899
#12 in BitTorrent::Session::handleAlert (this=this@entry=0x5555561ae1e0, a=0x7fff72e7d2e8)
at src/base/bittorrent/session.cpp:3786
#13 in BitTorrent::Session::readAlerts (this=0x5555561ae1e0) at src/base/bittorrent/session.cpp:3748
#14 in BitTorrent::Session::qt_static_metacall (_o=, _c=, _id=, _a=)
at Build/src/base/qbt_base_autogen/VKOXE6AELE/moc_session.cpp:393
#15 in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5
#16 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#17 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#18 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#19 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQt5Core.so.5
#20 in ?? () from /usr/lib/libQt5Core.so.5
#21 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#22 in ?? () from /usr/lib/libglib-2.0.so.0
#23 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#24 in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/libQt5Core.so.5
#25 in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/libQt5Core.so.5
#26 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#27 in Application::exec (this=0x5555560c7340, params=...) at src/app/application.cpp:572
#28 in main (argc=, argv=) at src/app/main.cpp:252
@Chocobo1 commented on GitHub (May 9, 2019):
This line looks weird to me:
https://github.com/qbittorrent/qBittorrent/blob/master/src/base/bittorrent/torrentinfo.cpp#L368
Can you try removing
- 1in that line and retest again?@Golutazem commented on GitHub (May 10, 2019):
I made that change and retried. I see no sign of error, though I do not understand from the change what I should look for.
@Chocobo1 commented on GitHub (May 10, 2019):
Whether qbt still dump the back trace when you add the same torrent as in your opening post. If none then it is good.
I'm afraid I'll need more info before making a good fix, could you modify the code segment as below:
Insert the 3
printflines and compile again, then add the same torrent file as you did in the opening post, the console will print some text & values, please post them here.Or if possible, you can share the torrent hash.
@Golutazem commented on GitHub (May 10, 2019):
Adding the torrent file again did not cause an error. All appears to run normally afterwards. I continue to run in GDB. If I encounter an error that appears related, I will re-open the issue.
@Chocobo1 commented on GitHub (May 10, 2019):
@Golutazem
Do you mind follow the instructions in https://github.com/qbittorrent/qBittorrent/issues/10611#issuecomment-491236061? I don't think it is properly fixed.
@Golutazem commented on GitHub (May 10, 2019):
Sorry. I no longer have the file or the hash and could not identify it again. I have added the diagnostic output to the build so that if it occurs again I can give more output.