[PyQt] Segmentation Fault working with QTextDocument/QTextEdit

Nahuel Defossé nahueldefosse at yahoo.com.ar
Tue Jan 13 19:11:48 GMT 2009

I'm working on a text editor (still in very early development state).
First, I tried to set my custom QTextDocument class (CodeDocument) each time a 
new file was opened but I always got a segementation fault. So I googled a 
bit and got a qcodeedit project at srourceforge, where I saw they don't mess 
with QTextDocument at all, even I didn't like the idea of leaving a MVC 
scheme (QTextEdit/QTextDocument) and hoping to get rid of the unexplainable 
segfault, I decided to just leave a CodeDocument instance and load files into 
it via a factory (all of these code is in editor.py). What I've got was taht 
creating an empty document (there's a QAction, Ctrl+N) works fine, but if you 
try to load any file, it just segfaults. I've tested it on Kubuntu Hardy and 
Ubuntu Intrepid. Though it fails in both, in intrepid I get a trace which 
I've attached. 

On windows, the code works, so I'm not sure if I'm doning something wrong or 
it's a PyQt bug. 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: dump_intrepid.txt
Type: text/x-diff
Size: 4643 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090113/cedbee2c/dump_intrepid-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CrossMates.tar.bz2
Type: application/x-tbz
Size: 120052 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090113/cedbee2c/CrossMates.tar-0001.bin

More information about the PyQt mailing list