[mythtv] Re: compiling mythtv frontend for cygwin

Buechler, Mark R Mark_R_Buechler at bausch.com
Thu Oct 14 19:21:16 UTC 2004


Agreed. Looks to me like the problem is with QStringList::split(). As you
said, if you create a QStringList and fill it by hand everything works. If
you attempt to split a string it fails even if you put a static value in to
be split. The only thing I can think is that QStringList::split() is
returning a null value which obviously will break the iterator.

- Mark.

-----Original Message-----
From: Mario L [mailto:superm1 at gmail.com] 
Sent: Thursday, October 14, 2004 2:48 PM
To: Buechler, Mark R; MythTV-Developer List
Subject: Re: [mythtv] Re: compiling mythtv frontend for cygwin

whoops that code should for the small app should have been


int main()
{
    QStringList theLIST;
     theLIST << "Hello";
     theLIST << "World";
    for (QStringList::Iterator it = theLIST.begin();it != theLIST.end();
++it )
    {
         cout<<*it<<endl;
    }
    return 0;
}


On Thu, 14 Oct 2004 13:46:36 -0500, Mario L <superm1 at gmail.com> wrote:
> Well i have broken it down to for sure that it is iterator problems.
> There are only so many things that you can comment out in there that 
> use iterators before you have a non functioning program however :).
> Launching from a command shell with the log "-l logfile.txt" will 
> maintain all paths, ex share/mythtv/mysql.txt etc... and log right to 
> a file.  I have pinpointed the first place it segfaults to main.cpp in 
> mythfrontend, meaningly
> 
>                     for (QStringList::Iterator it = verboseOpts.begin();
>                          it != verboseOpts.end(); ++it )
> 
> Of course that line is only reached if you try to use a switch for "-v 
> ______", but this is almost the 15th line of the app, there are only 
> so many things that could cause it!  That verboseOpts.begin() line 
> seems to seg fault it.  The funny thing is that QT uses that same sort 
> of syntax all over with .begin() and .end() in alot of files, with no 
> problem.  If you try to make a short app using iterators like:
> 
> #include <qapplication.h>
> #include <iostream>
> using namespace std;
> 
> int main()
> {
>      QStringList theLIST;
>       theLIST << "Hello";
>       theLIST << "World";
>      for (QStringList::Iterator it = verboseOpts.begin();it != 
> verboseOpts.end(); ++it )
>      {
>           cout<<*it<<endl;
>      }
>      return 0;
> }
> 
> There are no issues whatsoever with the above code, so perhaps its not 
> even the fact of the using the iterators, but perhaps the text being 
> put into the QStringList.
> 
> The next instance for myth is in globalsettings.cpp
> 
>         addSelection(QObject::tr("Desktop Style"), "");
>         QStyleFactory factory;
>         QStringList list = factory.keys();
>         QStringList::iterator iter = list.begin();
>         for (; iter != list.end(); iter++ )
>             addSelection(*iter);
> 
> Again it will segfault at the list.begin() line which makes me think 
> that maybe its not actually the text being put in wrong.
> 
> Whichever the case, I made a post to the kde-cygwin list in hopes that 
> some of the QT experts out there can lend an ear.
>




Bausch & Lomb
150 Years of Perfecting Vision, Enhancing Life (TM)






EMAIL DISCLAIMER 

Please Note: The information contained in this message may be privileged and
confidential, protected from disclosure, and/or intended only for the use of
the individual or entity named above. If the reader of this message is not
the intended recipient, or an employee or agent responsible for delivering
this message to the intended recipient, you are hereby notified that any
disclosure, distribution, copying or other dissemination of this
communication is strictly prohibited. If you received this communication in
error, please immediately reply to the sender, delete the message and
destroy all copies of it.

Thank You



More information about the mythtv-dev mailing list