×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    10

    Bug in qabstractitemmodel?

    hi, im working on a simple maemo media application. its located here: https://garage.maemo.org/projects/womp/.
    untill now ive been programming mostly in qtcreator and only tested natively on linux. today i tested the app in scratchbox, it compiles without any trouble, but when i test it i get an error i havent seen when ive tested on linux.
    Code:
    ASSERT: "last >= first" in file kernel/qabstractitemmodel.cpp, line 2110
    /usr/bin/run-standalone.sh: line 11: 23645 Aborted                 (core dumped) "$@"
    this happens when i try to clear a subclass of qabstracttablemodel with an overrided method called removeRows (mostly taken from an qtexample). the class can be found here:
    https://garage.maemo.org/plugins/scm...mp&view=markup
    this is the overrided method:
    Code:
     bool TrackTableModel::removeRows(int position, int rows, const QModelIndex &index)
     {
         Q_UNUSED(index);
         beginRemoveRows(QModelIndex(), position, position+rows-1);
    
    //     trackList.clear();
    
         for (int row=0; row < rows; ++row) {
             trackList.removeAt(position);
         }
    
         endRemoveRows();
         return true;
     }
    i believe that its the beginRemowRows(..) method thats responsible, but im not sure. again, this works perfectly on linux.
    so im wondering if im doing something fundamentally wrong, or if this is in fact a bug.

    is phonon expected to work in scratchbox btw? i tried on both armel and x86 and it fails to play any tracks (different reason why it fails).

    another question. do you recommend that i use "standard" qt classes or should i use maemo specific qt classes. if so, are there any code examples on how these are used?

    sorry if this have been answered before, i tried to search but couldnt find much.

  2. #2
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Bug in qabstractitemmodel?

    It doesn't compile for me:
    Code:
    g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_PHONON_LIB -DQT_XMLPATTERNS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXmlPatterns -I/usr/include/qt4/phonon -I/usr/include/qt4 -I. -I../../gsoap-2.7.15-bin/include -I../bin/tmp -o ../bin/tmp/main.o main.cpp
    Assembler messages:
    Fatal error: can't create ../bin/tmp/main.o: No such file or directory
    In file included from ./ws/soapH.h:10,
                     from ./ws/soapMusicWSBindingProxy.h:10,
                     from ws/wsmanager.h:16,
                     from womp.h:7,
                     from main.cpp:4:
    ./ws/soapStub.h:17:22: error: stdsoap2.h: No such file or directory
    Because you included gsoap into source tree. I will try to fix it.
    Last edited by divanov; 2009-12-02 at 11:15.

  3. #3
    Registered User
    Join Date
    Nov 2009
    Posts
    10

    Re: Bug in qabstractitemmodel?

    hi, in the readme ive documented how its compiled with womp. we did it this way since we couldnt find any packages for gsoap in the maemo repos.

    though it wont be possible for you to test the actual program without an existing wimp account (which is only for norwegian citizens) unfortunately.

    i can probably create a testprogram to verify it if needed.

  4. #4
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Bug in qabstractitemmodel?

    Patch to fix packaging problem.
    Code:
    Index: src/src.pro
    ===================================================================
    --- src/src.pro	(revision 14)
    +++ src/src.pro	(working copy)
    @@ -78,8 +78,5 @@
         phonon \
         xmlpatterns
     DEPENDPATH += .
    -INCLUDEPATH += . \
    -    ../../gsoap-2.7.15-bin/include
    -LIBS += -L../../gsoap-2.7.15-bin/lib \
    -    -lgsoap++
    +LIBS += -L/usr/lib/ -lgsoap++
     DESTDIR = bin
    Also you need to build gsoap package and install it inside scratchbox.

  5. #5
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Bug in qabstractitemmodel?

    That was very really wrong. I was able to port gsoap to Maemo in 5 minutes.
    Quote Originally Posted by stalep View Post
    hi, in the readme ive documented how its compiled with womp. we did it this way since we couldnt find any packages for gsoap in the maemo repos.

  6. #6
    Registered User
    Join Date
    Nov 2009
    Posts
    10

    Re: Bug in qabstractitemmodel?

    Quote Originally Posted by divanov View Post
    That was very really wrong. I was able to port gsoap to Maemo in 5 minutes.
    can you explain how?

  7. #7
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Bug in qabstractitemmodel?

    Quote Originally Posted by stalep View Post
    can you explain how?
    Just build and install package in scratchbox:

    http://www.mediafire.com/file/unkqww...5l-0.1.diff.gz
    http://www.mediafire.com/file/nzorkh....7.15l-0.1.dsc
    http://www.mediafire.com/file/mynmjf...5l.orig.tar.gz

    P.S. I've never used this file sharing service before, let's hope it will work.

  8. #8
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Bug in qabstractitemmodel?

    What we have in QAbstractItemModel:
    Code:
    void QAbstractItemModel::beginRemoveRows(const QModelIndex &parent, int first, int last)
    {
        Q_ASSERT(first >= 0);
        Q_ASSERT(last >= first);
    In womp code:
    Code:
     bool TrackTableModel::removeRows(int position, int rows, const QModelIndex &index)
     {
         Q_UNUSED(index);
         beginRemoveRows(QModelIndex(), position, position+rows-1);
    And finally how it's called:
    Code:
         removeRows(0, trackList.size(), QModelIndex());
    Then think about the case when trackList.size() is 0?

  9. #9
    Registered User
    Join Date
    Nov 2009
    Posts
    10

    Re: Bug in qabstractitemmodel?

    Quote Originally Posted by divanov View Post
    Then think about the case when trackList.size() is 0?
    ah, thanks a lot. didnt see that one. since it worked on linux i thought it was a bug in the maemo port. ill test it tomorrow. again, thanks! :)

  10. #10
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Bug in qabstractitemmodel?

    Quote Originally Posted by stalep View Post
    ah, thanks a lot. didnt see that one. since it worked on linux i thought it was a bug in the maemo port. ill test it tomorrow. again, thanks!
    I guess the reason for that is currently on Maemo Qt is compiled with -debug option.

  11. #11
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Bug in qabstractitemmodel?

    gsoap is available in extras-devel repository:
    http://maemo.org/packages/view/gsoap/

Similar Threads

  1. RecordStore bug on Series 60
    By ncerezo2 in forum Mobile Java General
    Replies: 21
    Last Post: 2009-11-26, 10:12
  2. Serious BUG in Nokia phones!!!
    By bartekn in forum Mobile Java Media (Graphics & Sounds)
    Replies: 10
    Last Post: 2004-03-28, 22:09
  3. A bug: setColor with offscreen graphics - PLEASE, REPLY THIS TIME
    By palmcrust in forum Mobile Java General
    Replies: 11
    Last Post: 2003-12-04, 12:43
  4. Firmware bug or code bug displaying list on 3650
    By blackjack75 in forum Mobile Java General
    Replies: 2
    Last Post: 2003-09-24, 19:52
  5. ** Important ** Event bug in phone and emulator.
    By fnagaton in forum Symbian C++
    Replies: 8
    Last Post: 2003-07-11, 12:56

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •