QtGStreamer: Segmentation fault when calling query function

bfederau benjamin.federau at basyskom.com
Mon Jun 17 06:03:51 PDT 2013


Mandeep Sandhu wrote
>> Hi,
>>
>> I have implemented the following Qt function
>>
>> QTime Player::getPosition()
>> {
>>     if (m_pipeline) {
>>         QGst::PositionQueryPtr query =
>> QGst::PositionQuery::create(QGst::FormatTime);
>>         m_pipeline->query(query);
>>         return QGst::ClockTime(query->position()).toTime();
>>     } else {
>>         return QTime();
>>     }
>> }
>>
>> When it comes to the m_pipeline->query(query) line the app crashes with a
>> Segmentation fault.
>>
>> The backtrace is:
>> #0  0x00000011 in ?? ()
>> #1  0xb335b41d in QGlib::RefPointer
> <QGst::PositionQuery>
> ::clear() () from
>> /home/meego/mediaplayer/libMediaPlayer.so
>> #2  0xb335a7c6 in QGlib::RefPointer
> <QGst::PositionQuery>
> ::~RefPointer() ()
>> from /home/meego/mediaplayer/libMediaPlayer.so
>> #3  0xb3359489 in Player::getPosition() () from
>> /home/meego/mediaplayer/libMediaPlayer.so
>> .....
>>
> 
> After the execution of  m_pipeline->query(query)  it seg faults inside the
> clear() function of RefPointer when the unref() function of m_class (type
> of QGst::PositionQuery) is called.
> 
> snip from  QGlib/refpointer.h:
> template 
> <class T>
> void RefPointer
> <T>
> ::clear()
> {
>     if (!isNull()) {
>         static_cast
> <
> RefCountedObject*
> >
> (m_class)->unref(); //this may delete m_class at this point
>         m_class = NULL;
>     }
> }
> 
> 
> Unfortunately I'm not that familiar with the QGlib implementation. On
> QtGStreamer for Qt4 the query functionality is working but on the
> QtGStreamer Qt5 implementation it is not working.
> 
> Does anyone have a glue what's going wrong here?
> 
> 
>>> And on console I get a:
>>> GLib-GObject-CRITICAL **: g_value_get_int64: assertion
>>> `G_VALUE_HOLDS_INT64
>>> (value)' failed
>>>
>>>
>>> Can somebody give me a hint whats going wrong here?
>>>
> 
>> Can you share a sample program that illustrates this issue. I can try it
>> locally here.
> 
> 
> Mandeep, could you test my sample app with Qt5?





--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/QtGStreamer-Segmentation-fault-when-calling-query-function-tp4659657p4660588.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list