Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 4

Qt-interest Archive, May 2008
#0 0xb7596131 in typeinfo for QPatternist::ResourceLoader ()


Message 1 in thread

Hi 
i'm getting a crash when using QPatternist with QtConcurrent.
platform is linux 2.6 and compiler gcc 4.3.0
qt is 4.4.1-snapshot-20080516
the problem ocures with 4.4.0 as well.

this is the gdb backtrace:

#0  0xb7596131 in typeinfo for QPatternist::ResourceLoader () 
from /usr/lib/libQtXmlPatterns.so.4
#1  0xb678bae9 in QNetworkAccessManager::get (this=0x86439f0, 
request=@0xb5dc0af8) at access/qnetworkaccessmanager.cpp:449
#2  0xb73ab03e in QPatternist::AccelTreeResourceLoader::load (uri=@0xb5dc0ca0, 
networkManager=0x86439f0, context=@0xb5dc0c98)
    at acceltree/qacceltreeresourceloader.cpp:112
#3  0xb73abd80 in QPatternist::AccelTreeResourceLoader::retrieveDocument 
(this=0x86412a8, uri=@0xb5dc0ca0, context=@0xb5dc0c98)
    at acceltree/qacceltreeresourceloader.cpp:81
#4  0xb73ac371 in QPatternist::AccelTreeResourceLoader::openDocument 
(this=0x86412a8, uri=@0xb5dc0ca0, context=@0xb5dc0c98)
    at acceltree/qacceltreeresourceloader.cpp:261
#5  0xb745ffce in QPatternist::DocFN::evaluateSingleton (this=0x86413d0, 
context=@0xb5dc0fc8)
    at functions/qsequencegeneratingfns.cpp:149
#6  0xb7404da3 in QPatternist::Expression::evaluateSequence (this=0x86413d0, 
context=@0xb5dc0fc8) at expr/qexpression.cpp:303
#7  0xb7422ab6 in QPatternist::Path::evaluateSequence (this=0x85ae6e8, 
context=@0xb5dc0fc8) at expr/qpath.cpp:80
#8  0xb74183a0 in QPatternist::NodeSortExpression::evaluateSequence 
(this=0x8630f80, context=@0xb5dc0fc8)
    at expr/qnodesortexpression.cpp:80
#9  0xb7422ab6 in QPatternist::Path::evaluateSequence (this=0x85ae678, 
context=@0xb5dc0fc8) at expr/qpath.cpp:80
#10 0xb74183a0 in QPatternist::NodeSortExpression::evaluateSequence 
(this=0x8677af8, context=@0xb5dc0fc8)
    at expr/qnodesortexpression.cpp:80
#11 0xb740dacd in QPatternist::ForClause::evaluateToSequenceReceiver 
(this=0x863aef8, context=@0xb5dc0fc8)
    at expr/qforclause.cpp:117
#12 0xb7409d81 in QPatternist::ExpressionSequence::evaluateToSequenceReceiver 
(this=0x86109b0, context=@0xb5dc0fc8)
    at expr/qexpressionsequence.cpp:81
#13 0xb7404032 in QPatternist::ElementConstructor::evaluateToSequenceReceiver 
(this=0x86585d8, context=@0xb5dc1004)
    at expr/qelementconstructor.cpp:95
#14 0xb73c1c7a in QXmlQuery::evaluateTo (this=0xb5dc10a4, callback=0xb5dc1048) 
at api/qxmlquery.cpp:551
#15 0x080503a9 in HtmlQuery::evaluateToDom (this=0xb5dc109c) at 
htmlpatternist/patternist.cpp:155
#16 0x0805a42f in OTR::Listing::getRecordings (this=0xb5dc1138) at 
otr/listing.cpp:73
#17 0x08060582 in otr_job (job=@0x860f908) at gui/otrmodel.cpp:76
#18 0x080614c1 in QtConcurrent::FunctionWrapper1<void, 
OTRModelJob*&>::operator() (this=0x85fa7d8, u=@0x860f908)
    at /usr/include/QtCore/qtconcurrentfunctionwrappers.h:88
#19 0x080614df in QtConcurrent::MapKernel<OTRModelJob**, 
QtConcurrent::FunctionWrapper1<void, OTRModelJob*&> >::runIteration (
    this=0x85fa7b0, it=0x860f908) 
at /usr/include/QtCore/qtconcurrentmapkernel.h:75
#20 0x080613e2 in QtConcurrent::MapKernel<OTRModelJob**, 
QtConcurrent::FunctionWrapper1<void, OTRModelJob*&> >::runIterations (
    this=0x85fa7b0, sequenceBeginIterator=0x860f908, beginIndex=0, endIndex=1) 
at /usr/include/QtCore/qtconcurrentmapkernel.h:83
#21 0x080631ed in QtConcurrent::IterateKernel<OTRModelJob**, 
void>::forThreadFunction (this=0x85fa7b0)
    at /usr/include/QtCore/qtconcurrentiteratekernel.h:234
#22 0x080634f4 in QtConcurrent::IterateKernel<OTRModelJob**, 
void>::threadFunction (this=0x85fa7b0)
    at /usr/include/QtCore/qtconcurrentiteratekernel.h:201
#23 0xb6563db8 in QtConcurrent::ThreadEngineBase::run (this=0x85fa7dc) at 
concurrent/qtconcurrentthreadengine.cpp:180
#24 0xb6566590 in QThreadPoolThread::run (this=0x8169f88) at 
concurrent/qthreadpool.cpp:145
#25 0xb6570162 in QThreadPrivate::start (arg=0x8169f88) at 
thread/qthread_unix.cpp:190
#26 0xb6406125 in start_thread () from /lib/libpthread.so.0
#27 0xb6267a0e in clone () from /lib/libc.so.6
	


my relevant code around #15

QDomDocument HtmlQuery::evaluateToDom() const
{
    QByteArray formatterOutput;
    QBuffer buffer(&formatterOutput);
    buffer.open(QIODevice::WriteOnly);

    QXmlFormatter formatter(*this, &buffer);
    evaluateTo(&formatter);
    buffer.close();
    QDomDocument dc;
    dc.setContent ( formatterOutput); 
    return dc;
}

All resources used  here are  produced by the same thread.
Yet the error ocures in random fashion, so it could be related to threads.
i'm using QtConcurrent::map on a struct containing a QString or QUrl
The string is later passed as query (setQuery) to patternist.

-- 
 [ signature omitted ] 

Message 2 in thread

Hi,

> i'm getting a crash when using QPatternist with QtConcurrent.
> platform is linux 2.6 and compiler gcc 4.3.0
> qt is 4.4.1-snapshot-20080516
> the problem ocures with 4.4.0 as well.

If you think it's a bug, I suggest you send a bug report to Trolltech, so that 
the problem is known and a fix is scheduled for an upcoming version of Qt.
	http://trolltech.com/bugreport-form

> this is the gdb backtrace:
> 
> #0  0xb7596131 in typeinfo for QPatternist::ResourceLoader () 
> from /usr/lib/libQtXmlPatterns.so.4

The crash involves 'typeinfo', but I'm wondering why it would be called in 
QPatternist::ResourceLoader().

-- 
 [ signature omitted ] 

Message 3 in thread

On Monday 19 May 2008 08:39:52 Dimitri wrote:
> Hi,
>
> > i'm getting a crash when using QPatternist with QtConcurrent.
> > platform is linux 2.6 and compiler gcc 4.3.0
> > qt is 4.4.1-snapshot-20080516
> > the problem ocures with 4.4.0 as well.
>
> If you think it's a bug, I suggest you send a bug report to Trolltech, so
> that the problem is known and a fix is scheduled for an upcoming version of
> Qt. http://trolltech.com/bugreport-form


yeah i did.

> > this is the gdb backtrace:
> >
> > #0  0xb7596131 in typeinfo for QPatternist::ResourceLoader ()
> > from /usr/lib/libQtXmlPatterns.so.4
>
> The crash involves 'typeinfo', but I'm wondering why it would be called in
> QPatternist::ResourceLoader().

thats the reason i posted it here. i never see anything crash in typeinfo and 
have no clue what that means.

-- 
 [ signature omitted ] 

Message 4 in thread

On Monday 19 May 2008 09:41:03 Arvid Ephraim Picciani wrote:
> > The crash involves 'typeinfo', but I'm wondering why it would be called
> > in QPatternist::ResourceLoader().
>
> thats the reason i posted it here. i never see anything crash in typeinfo
> and have no clue what that means.

Well, typeinfo is not code. It's just the implementation of a structure 
(struct typeinfo) from the C++ ABI.

So if you see typeinfo in the stack trace, it indicates a stack corruption. Or 
a call to a virtual function went completely bezerk.

-- 
 [ signature omitted ] 

Attachment: signature.asc
Description: This is a digitally signed message part.


Message 5 in thread

Hi,

>> The crash involves 'typeinfo', but I'm wondering why it would be called in
>> QPatternist::ResourceLoader().
> 
> thats the reason i posted it here. i never see anything crash in typeinfo and 
> have no clue what that means.

Have you tried Valgrind on your code?

-- 
 [ signature omitted ]