This repository has been archived by the owner. It is now read-only.

Crash report #12006

avant1 opened this Issue Feb 25, 2014 · 1 comment


None yet
2 participants

avant1 commented Feb 25, 2014

Got message like

pure virtual method called
PhantomJS has crashed. Please file a bug report at...

so, i'm here.

I have converted crush dump file and seems like it contains stack trace. Hope this will be helpful:

P.S. Your product is awesome

catharsis added a commit to catharsis/phantomjs that referenced this issue Jan 9, 2015

Sleep until HTTP thread is running
This patch works around/ameliorates around a bug in QT 4
( which triggers the
infamous "pure virtual method called" crash. In summary, the problem is
that threads that are supposed to handle HTTP requests are not
necessarily fully constructed when time comes to do the handling.

This patch is only applicable for phantomjs 1.9, since later releases
to my understanding will use QT 5, in which the bug has been properly

This workaround does a very primitive usleep()-loop, continually
checking for thread->isRunning() to make sure that we actually are ready
to deal with the request.

NB. This is not a proper fix, since the race condition might in theory
still occur. However, after running this patch (with a sleep celiing of
0.1 seconds, as opposed to the full 1 second in this patch) internally
it has significantly reduced the occurence of the issue. It took me a
full day of re-building to trigger the error. Again, that was with the
0.1 seconds, this patch increases that number by a factor of 10.

It's worth noting that, unsuprisingly, the issue is easier to reproduce
with a system under heavy load, such as a build slave building a lot of
things in parallel.

Note also that the workaround suggested in the bug report to QT is not
    manager->httpThread->wait(20); // add this line

Partially, because this workaround applied verbatim only affects
asynchronous requests but moreso because:

"[the QThread::wait() function] also returns true if the thread has not been started yet."


This fixes issues #12325, #11651, #12006, #11687, #12816, #11857,
 #12054, #11577, #11597, #12284

This probably/possibly (but can't verify because of missing stack
traces) fixes issues #11047, #11347, #12026, #12309, #10666, #11696, #12133, #10823,
 #10717, #12348

And probably others that I couldn't find or that have already been

Signed-off-by: Anton Lofgren <>

This comment has been minimized.

Show comment
Hide comment

Vitallium Feb 9, 2016


Please upgrade to PhantomJS 2. 1.9.x is no longer supported, and known to have many crasher bugs that are fixed in 2.0.


Vitallium commented Feb 9, 2016

Please upgrade to PhantomJS 2. 1.9.x is no longer supported, and known to have many crasher bugs that are fixed in 2.0.

@Vitallium Vitallium closed this Feb 9, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.