[Qt-interest] QTextCursor insertHtml going into a loop

AngelWarrior srikanth.bemineni at gmail.com
Fri Apr 3 22:09:21 CEST 2009


Is anything  wrong in the below code snippet.

func()
{
  QTextDocument tdoc;
  QTextCursor  tcur(&tdoc);
   // I know its empty but tried
  tcur.movePosition( QTextCursor::Start);

  QString string="<p>Hi how are you<\p>";
  tcur.insertHtml(string); *//loops here*
}

> LogView.exe!QBasicAtomicPointer<QMutex>::operator!()  Line 125 + 0x1
bytes C++
  LogView.exe!applicationFontMutex()  Line 395 + 0x2f bytes C++
  LogView.exe!QApplication::font()  Line 1699 + 0x5 bytes C++
  LogView.exe!QFont::QFont()  Line 735 + 0x12 bytes C++
  LogView.exe!QTextFormatCollection::QTextFormatCollection()  Line 45 + 0x5e
bytes C++
  LogView.exe!QTextDocumentPrivate::QTextDocumentPrivate()  Line 159 + 0x7a
bytes C++
  LogView.exe!QTextDocument::QTextDocument(QObject * parent=0x00000000)
Line 290 + 0x4d bytes C++
  LogView.exe!QTextDocumentFragmentPrivate::QTextDocumentFragmentPrivate(const
QTextCursor & _cursor={...})  Line 197 + 0x56 bytes C++
  LogView.exe!QTextDocumentFragment::fromHtml(const QString &
html="<p>03-10-2009 18:55:20Server: sbemineni
Current Directory: C:/Users/bemineni/Desktop/hpsumtest/psp8.25</p>", const
QTextDocument * resourceProvider=0x0012bb5c)  Line 1167 + 0x41 bytes C++
  LogView.exe!QTextCursor::insertHtml(const QString & html="<p>03-10-2009
18:55:20Server: sbemineni
Current Directory: C:/Users/bemineni/Desktop/hpsumtest/psp8.25</p>")  Line
2022 + 0x1e bytes C++
  LogView.exe!LogViewMain::UpdateDocView(QString ipaddress="", __int64
startfrommessage=1, bool search=false)  Line 475 C++
sometimes the looping stacktrace



  ntdll.dll!77c025cd()
  [Frames below may be incorrect and/or missing, no symbols loaded for
ntdll.dll]
  ntdll.dll!77c023c1()
  ntdll.dll!77c0214c()
  ntdll.dll!77c5178f()
  ntdll.dll!77c1dc7e()
  ntdll.dll!77c02447()
  ntdll.dll!77c50f2b()
  ntdll.dll!77c0214c()
  ntdll.dll!77c51531()
  ntdll.dll!77c02447()
  ntdll.dll!77c1dc7e()
  ntdll.dll!77c02447()
  ntdll.dll!77c0214c()
  ntdll.dll!77c02447()
  ntdll.dll!77c02447()
  ntdll.dll!77c02447()
  ntdll.dll!77c0214c()
> msvcr80d.dll!_nh_malloc_dbg(unsigned int nSize=24, int nhFlag=0, int
nBlockUse=1, const char * szFileName=0x00000000, int nLine=0)  Line 268 +
0x15 bytes C++
  msvcr80d.dll!malloc(unsigned int nSize=29753344)  Line 154 + 0x15
bytes C++
  msvcr80d.dll!_heap_alloc_base(unsigned int size=60)  Line 105 + 0x28
bytes C
  msvcr80d.dll!_heap_alloc_dbg(unsigned int nSize=24, int nBlockUse=1, const
char * szFileName=0x00000000, int nLine=0)  Line 411 + 0x9 bytes C++
  msvcr80d.dll!_nh_malloc_dbg(unsigned int nSize=24, int nhFlag=0, int
nBlockUse=1, const char * szFileName=0x00000000, int nLine=0)  Line 268 +
0x15 bytes C++
  msvcr80d.dll!malloc(unsigned int nSize=24)  Line 154 + 0x15 bytes C++
  msvcr80d.dll!operator new(unsigned int size=24)  Line 59 + 0x9 bytes C++
  LogView.exe!QTextFormatCollection::indexForFormat(const QTextFormat &
format={...})  Line 2890 + 0x7 bytes C++
  LogView.exe!QTextDocumentPrivate::init()  Line 190 + 0x27 bytes C++
  LogView.exe!QTextDocument::QTextDocument(QObject * parent=0x00000000)
Line 293 C++
  LogView.exe!QTextDocumentFragmentPrivate::QTextDocumentFragmentPrivate(const
QTextCursor & _cursor={...})  Line 197 + 0x56 bytes C++
  LogView.exe!QTextDocumentFragment::fromHtml(const QString &
html="<p>03-10-2009 18:55:20Server: sbemineni
Current Directory: C:/Users/bemineni/Desktop/hpsumtest/psp8.25</p>", const
QTextDocument * resourceProvider=0x0012bb5c)  Line 1167 + 0x41 bytes C++
  LogView.exe!QTextCursor::insertHtml(const QString & html="<p>03-10-2009
18:55:20Server: sbemineni
Current Directory: C:/Users/bemineni/Desktop/hpsumtest/psp8.25</p>")  Line
2022 + 0x1e bytes C++
  LogView.exe!LogViewMain::UpdateDocView(QString ipaddress="", __int64
startfrommessage=1, bool search=false)  Line 475 C++



-- 
_/\_
With Regards
SB Angel Warrior
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090403/e06b4d40/attachment.html 


More information about the Qt-interest-old mailing list