jeanphix / Ghost.py

Webkit based scriptable web browser for python.
http://ghost-py.readthedocs.org/en/latest/
2.77k stars 380 forks source link

Ghost will just randomly freeze #164

Open ChrisTruncer opened 10 years ago

ChrisTruncer commented 10 years ago

I'm instantiating a ghost object, and then looping through a list of URLs to gather the server header information, and take a screenshot of each URL. However, Ghost will just randomly freeze on a random URL (can change each time). It will completely stop, and you won't even be able to Ctrl+C out of the script, you have to kill -9 it.

Way to re-create, use EyeWitness (based on ghost) at https://github.com/ChrisTruncer/EyeWitness. Then for the file input, just give it like the a top 2000 list or websites from Alexa. It'll work, and then just randomly freezing, without throwing an exception or anything.

Vaskivo commented 9 years ago

I'm having the same problem. I suspected something iffy going on in PySide's or QT's internals. I ran my program throught gdb until it hanged and here's the backtrace:

0 0x00007ffff0dcc0ac in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

1 0x00007ffff0dca32b in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

2 0x00007ffff0f62a3c in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

3 0x00007ffff0f948b0 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

4 0x00007ffff0f22b46 in QPainter::fillRect(QRectF const&, QBrush const&) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

5 0x00007fffed1b412f in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4

6 0x00007fffed10552a in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4

7 0x00007fffed0f059b in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4

8 0x00007fffed0f080e in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4

9 0x00007fffed0f0a0d in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4

10 0x00007fffed0d76e9 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4

11 0x00007fffed0c0cb3 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4

12 0x00007fffed132b3f in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4

13 0x00007fffed133aaa in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4

14 0x00007fffed1324df in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4

15 0x00007fffed133bb4 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4

16 0x00007fffed01db99 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4

17 0x00007fffecc2df22 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4

18 0x00007fffecc2e0c3 in QWebFrame::render(QPainter*) () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4

19 0x00007fffeded5ea7 in Sbk_QWebFrameFunc_render () from /usr/local/lib/python3.2/dist-packages/PySide/QtWebKit.so

20 0x00000000004b666f in PyEval_EvalFrameEx ()

21 0x00000000004cdee7 in PyEval_EvalCodeEx ()

22 0x00000000004ba764 in PyEval_EvalFrameEx ()

23 0x00000000004ba36e in PyEval_EvalFrameEx ()

24 0x00000000004ba36e in PyEval_EvalFrameEx ()

25 0x00000000004ba36e in PyEval_EvalFrameEx ()

26 0x00000000004cdee7 in PyEval_EvalCodeEx ()

27 0x00000000005464bf in ?? ()

28 0x000000000045420c in PyRun_FileExFlags ()

29 0x000000000045452c in PyRun_SimpleFileExFlags ()

30 0x00000000005587b5 in Py_Main ()

31 0x00000000004616eb in main ()

As you can see, it hangs in QPainter::fillRect().

I think this is a Pyside or QT problem. But I'm open to suggestions on how Ghost or programs using Ghost can go around this problem.