Crash with big torrents [v2.0.x]

Bug #501058 reported by Stamm
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qBittorrent
Fix Released
Critical
Christophe Dumez
Fedora
New
Undecided
Unassigned
qbittorrent (Debian)
Fix Released
Unknown

Bug Description

I have Ubuntu 9.10 64-bit
$ qbittorrent --version
qBittorrent v2.0.3

I start
$ qbittorrent

Next all ok, until i click on program. Prints many this string:
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 64 (X_PolyPoint)
  Resource id: 0x46004c6
X Error: RenderBadPicture (invalid Picture parameter) 160
  Extension: 149 (RENDER)
  Minor opcode: 5 (RenderChangePicture)
  Resource id: 0x46004c7
X Error: BadGC (invalid GC parameter) 13
  Major opcode: 60 (X_FreeGC)
  Resource id: 0x46004c9
X Error: BadGC (invalid GC parameter) 13
  Major opcode: 60 (X_FreeGC)
  Resource id: 0x46004c8
X Error: RenderBadPicture (invalid Picture parameter) 160
  Extension: 149 (RENDER)
  Minor opcode: 5 (RenderChangePicture)
  Resource id: 0x46004c3
X Error: BadPixmap (invalid Pixmap parameter) 4
  Major opcode: 56 (X_ChangeGC)
  Resource id: 0x46004c2
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 73 (X_GetImage)
  Resource id: 0x46004c2

*************************************************************
Catching SIGSEGV, please report a bug at http://bug.qbittorrent.org
and provide the following backtrace:
stack trace:
  /lib/libc.so.6 [0x7f32d0cd1530]

Before this my torrents download to ext3 partition, i add torrent and download to ntfs. Next it qbittorrent crash...

Stamm (stamm)
description: updated
Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Could you please do the following?

$ sudo apt-get install libtorrent-rasterbar-dbg gdb
$ gdb qbittorrent
> run
... Make qBittorrent crash...
> bt 25
.. This will print out the backtrace that I need ..

Thanks in advance. This will help find the issue.

Changed in qbittorrent:
assignee: nobody → Christophe Dumez (hydr0g3n)
status: New → Incomplete
Revision history for this message
Stamm (stamm) wrote :
Download full text (6.9 KiB)

It return:
(gdb) run
Starting program: /usr/bin/qbittorrent
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffe9297910 (LWP 13357)]
[New Thread 0x7fffe8a96910 (LWP 13358)]
[New Thread 0x7fffe3fff910 (LWP 13359)]
[New Thread 0x7fffe37fe910 (LWP 13361)]
Warning: Local domain socket was not closed cleanly, deleting file...

I click on qbittorrent, not to torrent which save to ntfs - all ok.
I click to torrent which save to ntfs and many many:
Warning: Local domain socket was not closed cleanly, deleting file...
X Error: BadAlloc (insufficient resources for operation) 11
  Major opcode: 53 (X_CreatePixmap)
  Resource id: 0x76
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Extension: 149 (RENDER)
  Minor opcode: 4 (RenderCreatePicture)
  Resource id: 0x400091d
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 55 (X_CreateGC)
  Resource id: 0x400091d
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 55 (X_CreateGC)
  Resource id: 0x400091d
X Error: BadGC (invalid GC parameter) 13
  Major opcode: 56 (X_ChangeGC)
  Resource id: 0x400091f
X Error: RenderBadPicture (invalid Picture parameter) 160
  Extension: 149 (RENDER)
  Minor opcode: 5 (RenderChangePicture)
  Resource id: 0x400091e
X Error: BadGC (invalid GC parameter) 13
  Major opcode: 56 (X_ChangeGC)
  Resource id: 0x4000920
X Error: RenderBadPicture (invalid Picture parameter) 160
  Extension: 149 (RENDER)
  Minor opcode: 5 (RenderChangePicture)
  Resource id: 0x400091e
X Error: BadGC (invalid GC parameter) 13
  Major opcode: 56 (X_ChangeGC)
  Resource id: 0x400091f
X Error: BadGC (invalid GC parameter) 13
  Major opcode: 56 (X_ChangeGC)
  Resource id: 0x4000920
X Error: RenderBadPicture (invalid Picture parameter) 160
  Extension: 149 (RENDER)
  Minor opcode: 5 (RenderChangePicture)
  Resource id: 0x400091e
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 64 (X_PolyPoint)
  Resource id: 0x400091d
X Error: BadGC (invalid GC parameter) 13
  Major opcode: 56 (X_ChangeGC)
  Resource id: 0x400091f
X Error: RenderBadPicture (invalid Picture parameter) 160
  Extension: 149 (RENDER)
  Minor opcode: 5 (RenderChangePicture)
  Resource id: 0x400091e
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 64 (X_PolyPoint)
  Resource id: 0x400091d
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 64 (X_PolyPoint)
  Resource id: 0x400091d
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 64 (X_PolyPoint)
  Resource id: 0x400091d
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 64 (X_PolyPoint)
  Resource id: 0x400091d
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 64 (X_PolyPoint)
  Resource id: 0x400091d

.............................. many many something
X Error: RenderBadPicture (invalid Picture parameter) 160
  Extension: 149 (RENDER)
  Minor opcode: 5 (RenderChangePicture)
  Resource id: 0x400091e
X Error: BadGC (invalid GC parameter) 13
  Major opcode: 60 (X_FreeGC)
  Resource id: 0x4000920
X Error: BadGC (invalid GC parameter) 1...

Read more...

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

the "X Error: BadDrawable (invalid Pixmap or Window parameter)" are odd but I don't think they are related to the crash.

Could you please use the following gdb command instead of "bt 25":
"thread apply all bt 25"

It seems that the crash is not in the current thread.

Revision history for this message
Stamm (stamm) wrote :
Download full text (7.0 KiB)

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) thread apply all bt 25

Thread 5 (Thread 0x7fffe7a94910 (LWP 2856)):
#0 0x00007ffff49c05a9 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/libpthread.so.0
#1 0x00007ffff4d14763 in boost::asio::detail::task_io_service<boost::asio::detail::epoll_reactor<false> >::run(boost::system::error_code&) ()
   from /usr/lib/libtorrent-rasterbar.so.5
#2 0x00007ffff4d14dac in boost::asio::io_service::run (
    this=<value optimized out>)
    at /usr/include/boost/asio/impl/io_service.ipp:58
#3 boost::asio::detail::resolver_service<boost::asio::ip::tcp>::work_io_service_runner::operator() (this=<value optimized out>)
    at /usr/include/boost/asio/detail/resolver_service.hpp:324
#4 boost::asio::detail::posix_thread::func<boost::asio::detail::resolver_service<boost::asio::ip::tcp>::work_io_service_runner>::run (
    this=<value optimized out>)
    at /usr/include/boost/asio/detail/posix_thread.hpp:104
#5 0x00007ffff4cfe86f in asio_detail_posix_thread_function ()
   from /usr/lib/libtorrent-rasterbar.so.5
#6 0x00007ffff49bba04 in start_thread () from /lib/libpthread.so.0
#7 0x00007ffff2a2d7bd in clone () from /lib/libc.so.6
#8 0x0000000000000000 in ?? ()

---Type <return> to continue, or q <return> to quit---
Thread 4 (Thread 0x7fffe8295910 (LWP 2854)):
#0 0x00007ffff2a263c2 in select () from /lib/libc.so.6
#1 0x00007ffff358bf31 in ?? () from /usr/lib/libQtCore.so.4
#2 0x00007ffff34c6445 in ?? () from /usr/lib/libQtCore.so.4
#3 0x00007ffff49bba04 in start_thread () from /lib/libpthread.so.0
#4 0x00007ffff2a2d7bd in clone () from /lib/libc.so.6
#5 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fffe8a96910 (LWP 2853)):
#0 0x00007ffff2a2ddf8 in epoll_wait () from /lib/libc.so.6
#1 0x00007ffff4d12cfd in boost::asio::detail::epoll_reactor<false>::run(bool)
    () from /usr/lib/libtorrent-rasterbar.so.5
#2 0x00007ffff4d14650 in boost::asio::detail::task_io_service<boost::asio::detail::epoll_reactor<false> >::run(boost::system::error_code&) ()
   from /usr/lib/libtorrent-rasterbar.so.5

#3 0x00007ffff4d4d9a1 in boost::asio::io_service::run (this=0xc8a3d0)
    at /usr/include/boost/asio/impl/io_service.ipp:65
#4 libtorrent::aux::session_impl::operator() (this=0xc8a3d0)
    at session_impl.cpp:1666
#5 0x00007ffff232af93 in thread_proxy ()
   from /usr/lib/libboost_thread-mt.so.1.38.0
#6 0x00007ffff49bba04 in start_thread () from /lib/libpthread.so.0
#7 0x00007ffff2a2d7bd in clone () from /lib/libc.so.6
---Type <return> to continue, or q <return> to quit---
#8 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fffe9297910 (LWP 2852)):
#0 0x00007ffff200ad63 in sha1_block_data_order () from /lib/libcrypto.so.0.9.8
#1 0x00007ffff200bcf8 in SHA1_Update () from /lib/libcrypto.so.0.9.8
#2 0x00007ffff4d6512c in libtorrent::hasher::update (
    this=<value optimized out>, piece_data=..., current_slot=15518)
    at ../include/libtorrent/hasher.hpp:102
#3 libtorrent::piece_manager::identify_data (this=<value optimized out>,
    piece_data=..., current_slot=15518) at storage.cpp:1635
#4 0x00007ffff4d65bbf in libtorrent::piece_manager::check_one_piece (
    this=0...

Read more...

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

I have tried to reproduce but I couldn't.

It does not crash here on my Ubuntu v9.10 when saving a torrent to a NTFS partition... As a matter of fact, I don't have your X warnings either. This is strange, I'll try to investigate further the backtrace and warnings.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Your X errors could be Qt-related. Could you please try installing libqt4-dbg and get the all thread backtrace again?

Revision history for this message
leftoflexo (beerpoweredhooligan) wrote :

it does the exact same thing with the same errors on my fedora 12 X86. it happened directly after an update. it was working fine before the update.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Does the crash only happen when the main properties panel is displayed (the one with the downloaded pieces bar)?

Please try hiding the lower information panel (by clicking on the button that is currently highlighted and corresponding to the shown tab).

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

leftoflexo > Are you also downloading to NTFS?

Changed in qbittorrent (Debian):
status: Unknown → New
Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Could anybody try this patch and tell me if it fixes the issue (I cannot reproduce myself but I may have found a possible cause for this)?

Revision history for this message
Dmitry-Kogura (dmitry-kogura) wrote :

Today, after update of libtorrent-rasterbar5, can't run qbittorrent 2.0.3
Message in terminal (Ubuntu 9.10):
qbittorrent: error while loading shared libraries: libtorrent-rasterbar.so.5: cannot open shared object file: No such file or directory

Revision history for this message
Stamm (stamm) wrote :

Sorry.
I have 2 not "100%" torrent, one of those save to ntfs, and I have 1 torrent, which allready downloaded, but check files (on ext3). Torrent which save to ntfs I was deleting, but qbittorrent still crash.
So, this situation about of cheching torrent, my sorry.

Now, I delete all torrent from qbittorrent and try to add this torrent - but qbittorrent again crash, but on start immediately.

"bad" torrent-file in attachment.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Dmitry-Kogura> qBittorrent v2.0.4 with the patch atatched to this report is being uploaded to my PPA. Please try apt-get update until you get the qBittorrent update.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Stamm > You torrent makes my qBittorrent crash too. This is good news, I can reproduce now: Thanks!

Revision history for this message
Stamm (stamm) wrote :

Christophe Dumez, by the way: I made this torrent with qbittorrent, but until i download from other torrent's site - everything was ok. I can attach this file if you need.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

The problem is merely that the torrent is too big and qBittorrent cannot create a pixmap big enough to display the torrent pieces (hence the X errors). I'm currently addressing the issue, you should have a fix soon. Are you able to test patches if I attach one?

Revision history for this message
Dmitry-Kogura (dmitry-kogura) wrote :

Christophe Dumez: Thank you. Update to 2.0.4 has solved the problem.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

The fix is committed to SVN. I'll attach the patch here so that you can test. I will release v2.0.5 with this patch as soon as someone confirms it fixes the issue.

Changed in qbittorrent:
importance: Undecided → High
milestone: none → 2.0.5
status: Incomplete → Fix Committed
importance: High → Critical
Revision history for this message
Christophe Dumez (hydr0g3n) wrote :
Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Well, I have just released v2.0.5 with the patch. I hope it works for everybody. I chose to release fast because of New year's eve party :)

Changed in qbittorrent:
status: Fix Committed → Fix Released
Revision history for this message
Stamm (stamm) wrote :

O, you are very quickly. This is a force of OpenSource!
I'm waiting for .deb for Ubuntu, I don't like make from source.
I try some GUI torrent programs(transmission, deluge, flush), but they have a problems
Transmission - very slow
Deluge try about year-two ago - don't like
Flush - don't correctly work with 2 and more trackers
You program - the best for me now ;)
Nearest to the future I want to create search plugin for qbittorrent for my tracker and I will recommend for use qbittorrent to linux-user.
Christophe, happy new year and big thanks for you program from Russia =)

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Well, My PPA is up-to-date already for the .deb packages :)

summary: - crash on start
+ Crash with big torrents [v2.0.x]
Revision history for this message
leigh123linux (leigh123linux-deactivatedaccount) wrote :

Well I'm struggling trying to keep up with the new releases as Bodhi (fedora package release system) takes up to three days to process new builds :-(

Revision history for this message
leigh123linux (leigh123linux-deactivatedaccount) wrote :
Revision history for this message
leftoflexo (beerpoweredhooligan) wrote :

yeah i have mine set to save downloads to my downloads folder in my home which is a symlink to another ntfs drive. i went to download a rather large torrent, about 4.3 gigs. now after that i get the error above. i removed version 2.0.1 and installed 2.0.3 and it started with that error automatically which makes me think that there is some settings file left behind during the removal that the new installation picks up to continue the same error.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

leftoflexo > The bug was fixed in v2.0.5 (not v2.0.3).

Changed in qbittorrent (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.