This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Crash when trying to use web interface.

Tags: None
(comma "," separated)
madberry
Registered Member
Posts
32
Karma
0
Just tried to use my webinterface to add some torrents but Ktorrent crashed.

It goes to the redirect.html and then crashes KTorrent.

It worked fine before but after adding more torrents it started doing this.

Downloads: 11
Uploads: 13

[edit]
ok I did some testing and put a break in the php (using an If else statement) when i get to 21 KTorrent crashes when i put it back to 20 it works fine. So as long as i'm only displaying 20 torrents it works fine...

I'm working on redesigning the webinterface a little bit so it looks better for my needs as soon as I've cleaned up the code I'll post it online.

I didn't make any big changes to the code to make it stop working. All I've done so far is change the layout and put an SubStr() in for the torrent name so the table doesn't get so messy any more.
[/edit]

I'm using 2.1beta1 on a Ubuntu 6.10 edgy eft distro.

Thanx,
[mad]Berry
dierbro
Registered Member
Posts
36
Karma
0

Mon Dec 11, 2006 6:39 pm
i can't reproduce the crash. Could you post the backtrace that appears in Kde crash dialog?
madberry
Registered Member
Posts
32
Karma
0

Tue Dec 12, 2006 6:45 am
Where can i find that?

[mad]Berry
dierbro wrote:i can't reproduce the crash. Could you post the backtrace that appears in Kde crash dialog?
dierbro
Registered Member
Posts
36
Karma
0

Tue Dec 12, 2006 9:12 am
If kde crash dialog doesn't appears run ktorrent in gdb with --nofork option and then when crash copy the backtrace.
madberry
Registered Member
Posts
32
Karma
0

Tue Dec 12, 2006 6:16 pm
Here's what ktorrent --nofork returns:

Code: Select all
~$ ktorrent --nofork
Qt: Warning: X Error: BadDevice, invalid or uninitialized input device 169
  Major opcode:  147
  Minor opcode:  3
  Resource id:  0x0
Qt: Warning: Failed to open device
Qt: Warning: X Error: BadDevice, invalid or uninitialized input device 169
  Major opcode:  147
  Minor opcode:  3
  Resource id:  0x0
Qt: Warning: Failed to open device
Qt: Warning: QObject::disconnect: Unexpected null parameter
Qt: Warning: QObject::disconnect: Unexpected null parameter
/usr/share/apps/ktorrent/www//default//redirect.html
/usr/share/apps/ktorrent/www//default//interface.php
dierbro
Registered Member
Posts
36
Karma
0

Wed Dec 13, 2006 7:49 am
$ gdb ktorrent
GNU gdb 6.4
....
(gdb) r --nofork
Starting program: /usr/kde/3.5/bin/ktorrent --nofork
......
<after crash>
(gdb)bt


then copy bt output and paste here.

I didn't make any big changes to the code to make it stop working. All I've done so far is change the layout and put an SubStr() in for the torrent name so the table doesn't get so messy any more.

if you have modified c++ code get source from svn (see FAQ) and try if the crash persists.


unzip;strip;touch;finger;mount;fsck;more;yes;umount;sleep
madberry
Registered Member
Posts
32
Karma
0

Wed Dec 13, 2006 10:18 am
I didn't modify the c++ just the PHP.

dierbro wrote:$ gdb ktorrent
if you have modified c++ code get source from svn (see FAQ) and try if the crash persists.


Sorry didn't understand what you meant hang in there while i get the information you need....

Last edited by madberry on Wed Dec 13, 2006 10:37 am, edited 1 time in total.
madberry
Registered Member
Posts
32
Karma
0

Wed Dec 13, 2006 10:20 am
Code: Select all
Starting program: /usr/bin/ktorrent --nofork
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1234094416 (LWP 18320)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Qt: Warning: X Error: BadDevice, invalid or uninitialized input device 169
  Major opcode:  147
  Minor opcode:  3
  Resource id:  0x0
Qt: Warning: Failed to open device
Qt: Warning: X Error: BadDevice, invalid or uninitialized input device 169
  Major opcode:  147
  Minor opcode:  3
  Resource id:  0x0
Qt: Warning: Failed to open device
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Qt: Warning: QObject::disconnect: Unexpected null parameter
(no debugging symbols found)
[New Thread -1245258848 (LWP 18456)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Qt: Warning: QObject::disconnect: Unexpected null parameter
[New Thread -1255101536 (LWP 18488)]
/usr/share/apps/ktorrent/www//default//interface.php
/usr/share/apps/ktorrent/www//default//ktorrentwebinterfacelogo.png
/usr/share/apps/ktorrent/www//default//redirect.html
/usr/share/apps/ktorrent/www//default//interface.php
Couldn't get registers: No such process.
madberry
Registered Member
Posts
32
Karma
0

Thu Dec 14, 2006 2:15 am
ok here is what i think i know:

currently I have 21 torrents that are in ktorrent.

I think it must be a memory problem that has to do with the size of the array $stats (which is deprived from downloadStatus() )

If i do a print_r() on $stats ktorrent freezes.
If i try to load everything with the original PHP script ktorrent freezes.
If I adapt the script and put in:
Code: Select all
$stats = array_slice($stats, 0, ceil(count($stats)/2));

which chops the array $stats in two then it loads.
I tired the changing the memory_limit in /etc/php5/cli/php.ini from 8MB to 20MB to 50MB to 100MB that didn't help.

I'm out of idea's as how to solve this problem.

The temporary solution I'm using now is that I made an interfacep2.php in which I changed the line:
Code: Select all
$stats = array_slice($stats, 0, ceil(count($stats)/2));
//to
$stats = array_slice($stats, ceil(count($stats)/2),count($stats) );

That way i can at least see all my torrents.

But i would like them in one big list...

Does anybody have an idea on how I couls solve this?

thanx[mad]Berry


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]