Menu

#13 Begins scan of files and then crashes

V2
open-accepted
8
2007-11-17
2007-11-10
Anonymous
No

Application starts, draws main window ok.
Begins to process selected directory. After about 30 seconds of processing the application closes. It allowed preliminary setup, etc, it happened after the initial root directory of the media was selected.

File window at bottom climbs to higher percentage (35-55%) and then drops back to 1-2% on start after it has been restarted several times. So it appears to be building the listing, but I think it is running into a internal stack exhaustion or something. I had the same issue with Picard if I selected the root directory. I would have to select a few directories at a time.

And I also wish to note that it appears to freeze like the other report as soon as you try to make a selection in the primary window (I removed the configuration files and restarted it, then only selected a single directory. It would not "crash" at that point, but it would freeze.) This is on the same distribution OpenSuse 10.3 using v2.1.0

Discussion

  • S. Stadelmann

    S. Stadelmann - 2007-11-17
    • priority: 5 --> 8
    • assigned_to: nobody --> yakin
    • status: open --> open-accepted
     
  • S. Stadelmann

    S. Stadelmann - 2007-11-17

    Logged In: YES
    user_id=458713
    Originator: NO

    Do you use an 64 Bit system?

    Thx Sebastian

     
  • lornix

    lornix - 2008-03-06

    Logged In: YES
    user_id=1029671
    Originator: NO

    Stumbled on this program, nice system, a little awkward at first, but it grows on you, easier to use as I go used to it.

    The problem: Program hangs when performing almost ANY function in the center 'Files' window.

    The Solution: I found several places where the program is comparing a value incorrectly, causing infinite loops. A simple code change fixes this. Pinkytagger still crashes, presumably due to memory leaks, I'll look into that later, but I was able to use it to tag almost all of my 4000+ mp3's last night.

    The fix(es):

    The problem is due to a string search/comparison routine used, which looks for substrings for processing. Not trying to step on toes or point fingers... not blaming anyone, just wanting to point out a potential conceptual error and a solution. My apologies if I inadvertently seem like I'm blaming anyone.

    In the source file "src/scanner.cpp", lines 81-82, which read:

    unsigned int idx_start = expression.indexOf(QRegExp("%[abcgntyi]"), 0);
    while (idx_start!=std::string::npos) {

    The issue here is that .indexOf CAN and WILL return a negative value when the searched for item is NOT found. Basically, it returns an index into the source string of the position of the searched string. BUT it returns '-1' if it cannot find anything. Therefore the 'unsigned' modifier is incorrect.

    The second line (line 82), compares idx_start with something (I didn't look it up)... but idx_start only ever is >= 0 IF it finds its search string. Otherwise it returns '-1' meaning, "no more!".

    A fix is thusly:

    int idx_start = expression.indexOf(QRegExp("%[abcgntyi]"), 0);
    while (idx_start>=0) {

    We remove the 'unsigned' modifier, to allow idx_start to reflect the full range of possible return values. and we simply repeat the loop until it returns '-1', or being < 0.

    Of course, removing the 'unsigned' modifier affects some downstream comparisons too, so you have to remove the forced 'unsigned int' casts you find in lines 94 and 103:

    Line 94:
    && idx_start < static_cast<unsigned int> ( to_parse.length() ) ) {
    becomes
    && idx_start < to_parse.length() )

    Line 103:
    if(idx_start < static_cast<unsigned int> ( to_parse.length() ))
    becomes
    if(idx_start < to_parse.length() )

    Again, we just removed the forced 'unsigned int' casting.

    A diff/patch for src/scanner.cpp follows:

    81,82c81,82
    < int idx_start = expression.indexOf(QRegExp("%[abcgntyi]"), 0);
    < while(idx_start>=0) {
    ---
    > unsigned int idx_start = expression.indexOf(QRegExp("%[abcgntyi]"), 0);
    > while(idx_start!=std::string::npos) {
    94c94
    < && idx_start < to_parse.length() ) {
    ---
    > && idx_start < static_cast<unsigned int> ( to_parse.length() ) ) {
    103c103
    < if(idx_start < to_parse.length() )
    ---
    > if(idx_start < static_cast<unsigned int> ( to_parse.length() ))

    I hope this helps, I'm using the current (as of 3/5/08) version, 2.1-0, downloaded for the sourceforge.net repository as a tar.gz file (not cvs/svn, if any)

    System: OpenSuse 10.3, 64 Bit, Dual Core AMD64/2.2Ghz, 4G ram.

    I also adjusted the CFLAGS to compile with -Wall -Werror, and I resolved ALL the errors/warnings found. mostly just #warning pragmas which I commented out (// #warning ..). That was the ONLY modifications beyond the above patch which I performed.

    Hope This Helps

    Take Care,

    Loni Nix
    lornix@lornix.com

     
  • Maxi Schimmel

    Maxi Schimmel - 2009-07-11

    Hello, I don't know if this bug is same of that I have, but I leave pinkytagger scanning a 10 thousand collection last night and when I woke up has this:

    Error: signal 11:
    Sorry! Pinkytagger crashes.
    Please help to make Pinkytagger better.
    Send a Bugreport with the following strack trace.
    Please use the Bugtracker at https://sourceforge.net/tracker/?group_id=142583&atid=752832
    Always post the following lines!
    compile info (PT 2.2.3): Qt 4.4.3, ps=4, SVN=unknown, LANG=es_ES.UTF-8 ,LC_ALL= ,QLocale=es_ES; HAVE_MUSICBRAINZ_WS HAVE_TAG HAVE_OFA HAVE_FFMPEG HAVE_LIBAVCODEC_AUDIO2 HAVE_PHONON WITH_LIBAVCODEC_AUDIO2_OGGBUG
    pinkytagger(_Z10sighandleri+0x1f)[0x8084edf]
    [0xffffe400]
    /usr/lib/libQtGui.so.4[0xb7d5ddca]
    /usr/lib/libQtGui.so.4(_ZNK21QSortFilterProxyModel13mapFromSourceERK11QModelIndex+0x23)[0xb7d5dec3]
    /usr/lib/libQtGui.so.4(_ZNK21QSortFilterProxyModel6parentERK11QModelIndex+0xa2)[0xb7d57b22]
    /usr/lib/libQtGui.so.4(_ZNK9QTreeView16indexRowSizeHintERK11QModelIndex+0xa4)[0xb7d0e654]
    /usr/lib/libQtGui.so.4[0xb7d0ed82]
    /usr/lib/libQtGui.so.4(_ZNK9QTreeView14verticalOffsetEv+0x5a)[0xb7d13d9a]
    /usr/lib/libQtGui.so.4[0xb7cdcec0]
    /usr/lib/libQtGui.so.4(_ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainter+0x8b0)[0xb78635a0]
    /usr/lib/libQtGui.so.4(_ZN14QWidgetPrivate22paintSiblingsRecursiveEP12QPaintDeviceRK5QListIP7QObjectEiRK7QRegionRK6QPointiP8QPainter+0x2cd)[0xb78639cd]
    /usr/lib/libQtGui.so.4(_ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainter+0x1a8)[0xb7862e98]
    /usr/lib/libQtGui.so.4(_ZN14QWidgetPrivate22paintSiblingsRecursiveEP12QPaintDeviceRK5QListIP7QObjectEiRK7QRegionRK6QPointiP8QPainter+0x2cd)[0xb78639cd]
    /usr/lib/libQtGui.so.4(_ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainter+0x1a8)[0xb7862e98]
    /usr/lib/libQtGui.so.4(_ZN14QWidgetPrivate22paintSiblingsRecursiveEP12QPaintDeviceRK5QListIP7QObjectEiRK7QRegionRK6QPointiP8QPainter+0x2cd)[0xb78639cd]
    /usr/lib/libQtGui.so.4(_ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainter+0x1a8)[0xb7862e98]
    /usr/lib/libQtGui.so.4(_ZN14QWidgetPrivate22paintSiblingsRecursiveEP12QPaintDeviceRK5QListIP7QObjectEiRK7QRegionRK6QPointiP8QPainter+0x2cd)[0xb78639cd]
    /usr/lib/libQtGui.so.4(_ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainter+0x1a8)[0xb7862e98]
    /usr/lib/libQtGui.so.4(_ZN14QWidgetPrivate22paintSiblingsRecursiveEP12QPaintDeviceRK5QListIP7QObjectEiRK7QRegionRK6QPointiP8QPainter+0x2cd)[0xb78639cd]
    /usr/lib/libQtGui.so.4(_ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainter+0x1a8)[0xb7862e98]

    Thanks for your time and program!!

     

Log in to post a comment.