Results 1 to 4 of 4

Thread: Exception code c0000005 in QtWebKit4.dll

  1. #1
    Join Date
    Apr 2011
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Post Exception code c0000005 in QtWebKit4.dll

    Dear all,

    from time to time I get a crash in my application, the windows dialog gives the information:

    * Exception code: c0000005
    * Module: QtWebKit4.dll
    * Modver: 4.7.2.0
    * Offset:00473e74

    The application contains some QGraphicsWebViews. I don't know how to approach that error. Unfortunately it is hard to reproduce. The offset can vary to some degree. I used a disassembler and searched for the offset to get an idea where this happens, and concluded that QTextBoundaryFinder is always involved. Can anyone please give me some hints how to track this issue further down?

    Lukas

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Exception code c0000005 in QtWebKit4.dll

    Run a debug build in a debugger and when it crashes look at the backtrace to find exactly how you are getting to the crash location. Inspect everything that is passed as a parameter. c0000005 Access violation is more than likely a NULL or invalid pointer problem in your data structure.

  3. #3
    Join Date
    Apr 2011
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Exception code c0000005 in QtWebKit4.dll

    Unfortunately, I cannot reproduce it when running in the debugger, really tough. Also the error occurs more often on other computers than mine. I have one suspicion: since I set some text in the web content dynamically by evaluating JavaScript snippets, maybe there is a condition with threads in WebKit. Can anyone please point me to some information about threads in Qt WebKit?

  4. #4
    Join Date
    Apr 2011
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Exception code c0000005 in QtWebKit4.dll

    I have not really understood this error, but i hunted it down to the function setUpIterator and made a quick fix that seems to work for me. The problem is that the static object staticLineBreakIterator is left with a pointer to the last examined string even after the string is deleted. That is why I only had that error when opening a second web page after closing a first one.

    The quick fix in TextBreakIteratorQt.cpp is:

    Qt Code:
    1. TextBreakIterator* setUpIterator(TextBreakIterator& iterator, QTextBoundaryFinder::BoundaryType type, const UChar* string, int length)
    2. {
    3. if (!string || !length)
    4. return 0;
    5.  
    6. if (iterator.isValid() && type == iterator.type() && length == iterator.length
    7. && string == iterator.string
    8. && memcmp(string, iterator.string, length) == 0)
    9. {
    10. iterator.toStart();
    11. return &iterator;
    12. }
    13.  
    14. iterator = TextBreakIterator(type, string, length);
    15. return &iterator;
    16. }
    To copy to clipboard, switch view to plain text mode 

    The additional comparison in line 7 ensures that memcpy is only called if the new string is exactly the last examined. Maybe the memcpy can be omitted.

Similar Threads

  1. Deploy the huge QtWebKit4.dll
    By ahmdsd_ostora in forum Qt Programming
    Replies: 30
    Last Post: 25th July 2010, 23:25
  2. Replies: 1
    Last Post: 2nd June 2010, 16:14
  3. How to compile my QtWebKit4.dll in Qt4.5
    By cspp in forum Installation and Deployment
    Replies: 1
    Last Post: 16th June 2009, 09:06
  4. exception
    By AnithaRagupathy in forum Qt Programming
    Replies: 1
    Last Post: 14th November 2007, 09:59
  5. Exception handling in Qt 4.2.2
    By vishal.chauhan in forum Qt Programming
    Replies: 1
    Last Post: 27th February 2007, 09:47

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.