Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

Mythmusic 0.15 segfault

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


kbass at kenbass

May 28, 2004, 8:16 PM

Post #1 of 14 (1674 views)
Permalink
Mythmusic 0.15 segfault

I upgraded from 0.13 to 0.15. However, I wiped the mythconverg database
first and reran the mc.sql. My old database had problems being converted. I
think it may have been corrupted. I couldnt even back it up - something
about cannot find the recordedmarkup.myd file or something during a dump.

Anyhow, mythmusic crashes when it is updating the database. I've recompiled
with debug and the backtrace is below. For whatever reason, the FILE *input
pointer is NULL. The ptr is not range checked and the call to 'fstat()'
appears to be causing the segfault. At this point in the code, id3file is
NULL.

#0 0x41314449 in fileno_unlocked () from /lib/i686/libc.so.6
#1 0x42221436 in MadDecoder::getMetadata(QSqlDatabase*) (this=0x871c350,
db=0x821c9e0) at maddecoder.cpp:652
#2 0x422222db in CheckFile(QString const&) (filename=@0x8707d7c) at
main.cpp:73
#3 0x4222331f in SearchDir(QString&) (directory=@0xbfffeee4) at
main.cpp:219
#4 0x42223ba3 in MusicCallback(void*, QString&) (data=0xbfffeee0,
selection=@0x851a5cc) at main.cpp:306
#5 0x4083f5a0 in ThemedMenuPrivate::handleAction(QString const&)
(this=0x851a4d0, action=@0x42a026e4) at themedmenu.cpp:2108
#6 0x4083d9c6 in ThemedMenuPrivate::keyPressHandler(QKeyEvent*)
(this=0x851a4d0, e=0xbfffea70) at themedmenu.cpp:1923
#7 0x408409d3 in ThemedMenu::keyPressEvent(QKeyEvent*) (this=0x8279dd0,
e=0xbfffea70) at themedmenu.cpp:2294
#8 0x40da106c in QWidget::event(QEvent*) () from
/usr/lib/qt-3.1/lib/libqt-mt.so.3
#9 0x40d0ef24 in QApplication::internalNotify(QObject*, QEvent*) () from
/usr/lib/qt-3.1/lib/libqt-mt.so.3
#10 0x40d0eab7 in QApplication::notify(QObject*, QEvent*) () from
/usr/lib/qt-3.1/lib/libqt-mt.so.3
#11 0x40cb6abe in QETWidget::translateKeyEvent(_XEvent const*, bool) () from
/usr/lib/qt-3.1/lib/libqt-mt.so.3
#12 0x40cb2d14 in QApplication::x11ProcessEvent(_XEvent*) () from
/usr/lib/qt-3.1/lib/libqt-mt.so.3
#13 0x40cc7bda in QEventLoop::processEvents(unsigned) () from
/usr/lib/qt-3.1/lib/libqt-mt.so.3
#14 0x40d22cf6 in QEventLoop::enterLoop() () from
/usr/lib/qt-3.1/lib/libqt-mt.so.3
#15 0x40d0f1b1 in QApplication::enter_loop() () from
/usr/lib/qt-3.1/lib/libqt-mt.so.3
#16 0x4089d393 in MythDialog::exec() (this=0x8279dd0) at mythdialogs.cpp:787
#17 0x42223ff3 in runMenu(MusicData*, QString) (mdata=0xbfffeee0,
which_menu=
{static null = {static null = <same as static member of an already
seen type>, d = 0x81d8f30, static shared_null = 0x81d8f30}, d = 0x824fd68,
static shared_null = 0x81d8f30}) at main.cpp:340
#18 0x422269bd in mythplugin_run () at main.cpp:495
#19 0x40893354 in MythPlugin::run() (this=0x824a258) at mythplugin.cpp:41
#20 0x4089421b in MythPluginManager::run_plugin(QString const&)
(this=0x82488d8, plugname=@0xbffff070) at mythplugin.cpp:164
#21 0x4083f326 in ThemedMenuPrivate::handleAction(QString const&)
(this=0x8275aa0, action=@0x827f584) at themedmenu.cpp:2091
#22 0x4083d9c6 in ThemedMenuPrivate::keyPressHandler(QKeyEvent*)
(this=0x8275aa0, e=0xbffff450) at themedmenu.cpp:1923
#23 0x408409d3 in ThemedMenu::keyPressEvent(QKeyEvent*) (this=0x8276358,
e=0xbffff450) at themedmenu.cpp:2294
#24 0x40da106c in QWidget::event(QEvent*) () from
/usr/lib/qt-3.1/lib/libqt-mt.so.3
#25 0x40d0ef24 in QApplication::internalNotify(QObject*, QEvent*) () from
/usr/lib/qt-3.1/lib/libqt-mt.so.3
#26 0x40d0eab7 in QApplication::notify(QObject*, QEvent*) () from
/usr/lib/qt-3.1/lib/libqt-mt.so.3
#27 0x40cb6abe in QETWidget::translateKeyEvent(_XEvent const*, bool) () from
/usr/lib/qt-3.1/lib/libqt-mt.so.3
#28 0x40cb2d14 in QApplication::x11ProcessEvent(_XEvent*) () from
/usr/lib/qt-3.1/lib/libqt-mt.so.3
#29 0x40cc7bda in QEventLoop::processEvents(unsigned) () from
/usr/lib/qt-3.1/lib/libqt-mt.so.3
#30 0x40d22cf6 in QEventLoop::enterLoop() () from
/usr/lib/qt-3.1/lib/libqt-mt.so.3
#31 0x40d0f1b1 in QApplication::enter_loop() () from
/usr/lib/qt-3.1/lib/libqt-mt.so.3
#32 0x4089d393 in MythDialog::exec() (this=0x8276358) at mythdialogs.cpp:787
#33 0x0806dba8 in RunMenu(QString) (themedir=
{static null = {static null = <same as static member of an already
seen type>, d = 0x81d8f30, static shared_null = 0x81d8f30}, d = 0x8296938,
static shared_null = 0x81d8f30}) at main.cpp:529
#34 0x08072504 in main (argc=1, argv=0xbffffba4) at main.cpp:988
#35 0x412c0a07 in __libc_start_main () from /lib/i686/libc.so.6


ijr at po

May 28, 2004, 8:30 PM

Post #2 of 14 (1657 views)
Permalink
Re: Mythmusic 0.15 segfault [In reply to]

On Friday 28 May 2004 11:16 pm, Ken Bass wrote:
> I upgraded from 0.13 to 0.15. However, I wiped the mythconverg database
> first and reran the mc.sql. My old database had problems being converted. I
> think it may have been corrupted. I couldnt even back it up - something
> about cannot find the recordedmarkup.myd file or something during a dump.
>
> Anyhow, mythmusic crashes when it is updating the database. I've recompiled
> with debug and the backtrace is below. For whatever reason, the FILE *input
> pointer is NULL. The ptr is not range checked and the call to 'fstat()'
> appears to be causing the segfault. At this point in the code, id3file is
> NULL.

Hmm. Ok, well, I can certainly make it bail if it can't open the file, there,
but, why can't it open the file? It shouldn't be getting that far with a
un-openable filename.. Can you take a look at the value of
filename.local8bit()? See if it exists or whatnot?

Isaac
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


kbass at kenbass

May 28, 2004, 8:57 PM

Post #3 of 14 (1665 views)
Permalink
Re: Mythmusic 0.15 segfault [In reply to]

On Fri, 28 May 2004, Isaac Richards wrote:

> On Friday 28 May 2004 11:16 pm, Ken Bass wrote:
> > Anyhow, mythmusic crashes when it is updating the database. I've recompiled
> > with debug and the backtrace is below. For whatever reason, the FILE *input
> > pointer is NULL. The ptr is not range checked and the call to 'fstat()'
> > appears to be causing the segfault. At this point in the code, id3file is
> > NULL.
>
> Hmm. Ok, well, I can certainly make it bail if it can't open the file, there,
> but, why can't it open the file? It shouldn't be getting that far with a
> un-openable filename.. Can you take a look at the value of
> filename.local8bit()? See if it exists or whatnot?
>

I must be doing something wrong. I ran under gdb and when it hit the
segfault, I went up a frame and tried to 'p filename.local8bit()'. I'm
getting 'Couldn't find method QString::local8bit' I'm use to C debugging,
not C++ so maybe I'm doing something stupid. Any tips?


kbass at kenbass

May 28, 2004, 9:16 PM

Post #4 of 14 (1649 views)
Permalink
Re: Mythmusic 0.15 segfault [In reply to]

On Fri, 28 May 2004, Ken Bass wrote:

> > filename.local8bit()? See if it exists or whatnot?
>
> I must be doing something wrong. I ran under gdb and when it hit the
> segfault, I went up a frame and tried to 'p filename.local8bit()'. I'm
> getting 'Couldn't find method QString::local8bit' I'm use to C debugging,
> not C++ so maybe I'm doing something stupid. Any tips?
>
>
If I print filename.latin1(), I get a filename that has a special
character. The filename contains the album name which has a 'grave' and a
backwards letter a.

Artist is Sigur Ros, album is ágætis byrjun (first letter grave over a,
third letter backwards a). The latin1() result says Ag\221tis

_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


ijr at po

May 28, 2004, 9:16 PM

Post #5 of 14 (1657 views)
Permalink
Re: Mythmusic 0.15 segfault [In reply to]

On Friday 28 May 2004 11:57 pm, Ken Bass wrote:
> On Fri, 28 May 2004, Isaac Richards wrote:
> > On Friday 28 May 2004 11:16 pm, Ken Bass wrote:
> > > Anyhow, mythmusic crashes when it is updating the database. I've
> > > recompiled with debug and the backtrace is below. For whatever reason,
> > > the FILE *input pointer is NULL. The ptr is not range checked and the
> > > call to 'fstat()' appears to be causing the segfault. At this point in
> > > the code, id3file is NULL.
> >
> > Hmm. Ok, well, I can certainly make it bail if it can't open the file,
> > there, but, why can't it open the file? It shouldn't be getting that far
> > with a un-openable filename.. Can you take a look at the value of
> > filename.local8bit()? See if it exists or whatnot?
>
> I must be doing something wrong. I ran under gdb and when it hit the
> segfault, I went up a frame and tried to 'p filename.local8bit()'. I'm
> getting 'Couldn't find method QString::local8bit' I'm use to C debugging,
> not C++ so maybe I'm doing something stupid. Any tips?

I'd just stick a:
cout << filename.local8bit() << endl;
before the call to fopen or whatnot. Easier than trying to convince gdb to
run the QString bits.

Isaac
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


kbass at kenbass

May 28, 2004, 9:36 PM

Post #6 of 14 (1627 views)
Permalink
Re: Mythmusic 0.15 segfault [In reply to]

On Sat, 29 May 2004, Isaac Richards wrote:
>
> I'd just stick a:
> cout << filename.local8bit() << endl;
> before the call to fopen or whatnot. Easier than trying to convince gdb to
> run the QString bits.
>
If I print 'filename.local8Bit' - (note capital B!), I get 'incomplete
type'. Maybe I need Qt build with debug turned on to get that to work?

Ok, cout prints a filename. However, the filename printed does not
include the special character in the filename--thus the fopen / fstat
fails. The file is on a Samba share and the filename actually contains
special characters. If I view it with windows network neighborhood the
filename appears correctly, but the local8Bit() maps it to something
without the special characters.


ijr at po

May 28, 2004, 9:50 PM

Post #7 of 14 (1649 views)
Permalink
Re: Mythmusic 0.15 segfault [In reply to]

On Saturday 29 May 2004 12:36 am, Ken Bass wrote:
> On Sat, 29 May 2004, Isaac Richards wrote:
> > I'd just stick a:
> > cout << filename.local8bit() << endl;
> > before the call to fopen or whatnot. Easier than trying to convince gdb
> > to run the QString bits.
>
> If I print 'filename.local8Bit' - (note capital B!), I get 'incomplete
> type'. Maybe I need Qt build with debug turned on to get that to work?
>
> Ok, cout prints a filename. However, the filename printed does not
> include the special character in the filename--thus the fopen / fstat
> fails. The file is on a Samba share and the filename actually contains
> special characters. If I view it with windows network neighborhood the
> filename appears correctly, but the local8Bit() maps it to something
> without the special characters.

Ok, here's what to do next:

In maddecoder.cpp, add to the top:
#include "qtextcodec.h"

and
cout << QTextCodec::codecForLocale()->name() << endl;

somewhere in the function before it crashes.

What's it print out?

Isaac
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


kbass at kenbass

May 28, 2004, 9:52 PM

Post #8 of 14 (1640 views)
Permalink
Re: Mythmusic 0.15 segfault [In reply to]

On Sat, 29 May 2004, Ken Bass wrote:

> If I print 'filename.local8Bit' - (note capital B!), I get 'incomplete
> type'. Maybe I need Qt build with debug turned on to get that to work?
>
> Ok, cout prints a filename. However, the filename printed does not
> include the special character in the filename--thus the fopen / fstat
> fails. The file is on a Samba share and the filename actually contains
> special characters. If I view it with windows network neighborhood the
> filename appears correctly, but the local8Bit() maps it to something
> without the special characters.

In maddecoder.cpp, line 632, I added 'if (id3file == NULL) return NULL'.
That at least skips the file without processing it.


ijr at po

May 28, 2004, 9:58 PM

Post #9 of 14 (1662 views)
Permalink
Re: Mythmusic 0.15 segfault [In reply to]

On Saturday 29 May 2004 12:50 am, Isaac Richards wrote:
> Ok, here's what to do next:
>
> In maddecoder.cpp, add to the top:
> #include "qtextcodec.h"
>
> and
> cout << QTextCodec::codecForLocale()->name() << endl;
>
> somewhere in the function before it crashes.
>
> What's it print out?

Also, I'd like the contents of a few env variables: LC_ALL, LC_CTYPE, and
LANG, if you don't mind. And, what version of Qt is this, what distro?

Isaac
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


kbass at kenbass

May 28, 2004, 10:06 PM

Post #10 of 14 (1657 views)
Permalink
Re: Mythmusic 0.15 segfault [In reply to]

On Sat, 29 May 2004, Isaac Richards wrote:

> Ok, here's what to do next:
>
> In maddecoder.cpp, add to the top:
> #include "qtextcodec.h"
>
> and
> cout << QTextCodec::codecForLocale()->name() << endl;
>
> somewhere in the function before it crashes.
>
> What's it print out?
>

ISO 8859-1

Maybe this is a SAMBA problem also. I cant play the file via mplayer even
though it shows up in a directory listing. Samba doesn't seem to be
mapping it correctly, it shows a '?' for the ae character. Maybe samba
isn't using the UTF-8 routines or something.


kbass at kenbass

May 28, 2004, 10:17 PM

Post #11 of 14 (1632 views)
Permalink
Re: Mythmusic 0.15 segfault [In reply to]

On Sat, 29 May 2004, Isaac Richards wrote:
> Also, I'd like the contents of a few env variables: LC_ALL, LC_CTYPE, and
> LANG, if you don't mind. And, what version of Qt is this, what distro?
>

Redhat 9, with a 2.4.22 kernel from kernel.org

LANG=en_US
SUPPORTED=en_US.UTF-8:en_US:en

env |grep LC yields nothing (those are optional overrides, right?).

Qt is 3.1


ijr at po

May 28, 2004, 10:46 PM

Post #12 of 14 (1655 views)
Permalink
Re: Mythmusic 0.15 segfault [In reply to]

On Saturday 29 May 2004 01:17 am, Ken Bass wrote:
> On Sat, 29 May 2004, Isaac Richards wrote:
> > Also, I'd like the contents of a few env variables: LC_ALL, LC_CTYPE,
> > and LANG, if you don't mind. And, what version of Qt is this, what
> > distro?
>
> Redhat 9, with a 2.4.22 kernel from kernel.org
>
> LANG=en_US
> SUPPORTED=en_US.UTF-8:en_US:en
>
> env |grep LC yields nothing (those are optional overrides, right?).
>
> Qt is 3.1

Allright. It _may_ be a samba problem, like you said. Can you grab mythmusic
from CVS and give that a try? It won't die anymore of course, but, I'd like
to know if the file in question shows up in the database or not.

Isaac
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


aburden at onegeeksopinion

May 29, 2004, 8:05 AM

Post #13 of 14 (1656 views)
Permalink
Re: Mythmusic 0.15 segfault [In reply to]

I just want to throw out my experience with sharing mp3's over a samba
share.
I had similar results and I was not even using mythmusic. The mp3's I
shared started to corrupt. I thought I had a drive problem or something,
but after trial and error found that the files were just getting corrupt
when shared over a samba share. A buddy also had this happen, one by one
his mp3's would just corrupt, very frustrating.
I use unix tools for windows now, and I have not had a problem since.

Isaac Richards wrote:

>On Saturday 29 May 2004 01:17 am, Ken Bass wrote:
>
>
>>On Sat, 29 May 2004, Isaac Richards wrote:
>>
>>
>>>Also, I'd like the contents of a few env variables: LC_ALL, LC_CTYPE,
>>>and LANG, if you don't mind. And, what version of Qt is this, what
>>>distro?
>>>
>>>
>> Redhat 9, with a 2.4.22 kernel from kernel.org
>>
>>LANG=en_US
>>SUPPORTED=en_US.UTF-8:en_US:en
>>
>>env |grep LC yields nothing (those are optional overrides, right?).
>>
>>Qt is 3.1
>>
>>
>
>Allright. It _may_ be a samba problem, like you said. Can you grab mythmusic
>from CVS and give that a try? It won't die anymore of course, but, I'd like
>to know if the file in question shows up in the database or not.
>
>Isaac
>_______________________________________________
>mythtv-dev mailing list
>mythtv-dev[at]mythtv.org
>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
>
>


mdz at debian

May 31, 2004, 3:38 PM

Post #14 of 14 (1616 views)
Permalink
Re: Mythmusic 0.15 segfault [In reply to]

On Sat, May 29, 2004 at 01:17:49AM -0400, Ken Bass wrote:

> On Sat, 29 May 2004, Isaac Richards wrote:
> > Also, I'd like the contents of a few env variables: LC_ALL, LC_CTYPE, and
> > LANG, if you don't mind. And, what version of Qt is this, what distro?
> >
>
> Redhat 9, with a 2.4.22 kernel from kernel.org
>
> LANG=en_US
> SUPPORTED=en_US.UTF-8:en_US:en
>
> env |grep LC yields nothing (those are optional overrides, right?).
>
> Qt is 3.1

You can run the "locale" command to get all of the relevant information.

--
- mdz

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.