Results 1 to 4 of 4

Thread: crashing in QCoreApplicationPrivate::sendPostedEvents

  1. #1
    Join Date
    Apr 2016
    Location
    Pune, India
    Posts
    2
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    Unix/X11

    Default crashing in QCoreApplicationPrivate::sendPostedEvents

    How we should call QCoreApplication::processEvents and what is the importance of that call in application.
    my application is crashing in QCoreApplicationPrivate::sendPostedEvents(receiver , event_type, data); frequently which is called inside proceesEvents function.

    can you suggest/advise how can i get resolve from that issue.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: crashing in QCoreApplicationPrivate::sendPostedEvents

    Quote Originally Posted by er.soni.himanshu View Post
    How we should call QCoreApplication:rocessEvents and what is the importance of that call in application.
    Why do you want to call the function at all?
    Usually an application just start the event loop by calling QCoreApplication::exec().

    Cheers,
    _

  3. #3
    Join Date
    Apr 2016
    Location
    Pune, India
    Posts
    2
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    Unix/X11

    Default Re: crashing in QCoreApplicationPrivate::sendPostedEvents

    Thanks for your response. but if we call that function explicitly. is there any advantage or disadvantage ?

    Actually my application is getting crashed in QCoreApplicationPrivate::sendPostedEvents and not able to analyses what could be a reason for that .
    1). I am using QtcpSocket in my code and using write call for transmitting data frequently. is there any limit/frequency for writing data on socket.
    2). should be use waitForBytesWritten() function after every write call ?.
    Can Anybody help .

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: crashing in QCoreApplicationPrivate::sendPostedEvents

    Quote Originally Posted by er.soni.himanshu View Post
    Thanks for your response. but if we call that function explicitly. is there any advantage or disadvantage ?
    The main question is still why you want to call it explicitly.
    But if you absolutely must, be aware that this processes events (obviously) and could lead to a code path being executed that ends up right there again.

    A bit like reentrancy.

    Quote Originally Posted by er.soni.himanshu View Post
    1). I am using QtcpSocket in my code and using write call for transmitting data frequently. is there any limit/frequency for writing data on socket.
    That will likely depend on the system and the hardware.

    Quote Originally Posted by er.soni.himanshu View Post
    2). should be use waitForBytesWritten() function after every write call ?.
    Only if you want to block the caller until the data is written.
    Usually you don't want to do that.

    I have to say I am bit puzzled by such basic questions coming from someone who, according to the profile, has experience with three major versions of Qt and two language bindings, potentially additional to C++.

    Cheers,
    _

Similar Threads

  1. Qwt app crashing
    By K4ELO in forum Qwt
    Replies: 0
    Last Post: 25th March 2013, 12:57
  2. Replies: 1
    Last Post: 18th June 2012, 10:05
  3. Crashing without debug mode- No crashing with gdb debugger
    By sujan.dasmahapatra in forum Qt Programming
    Replies: 1
    Last Post: 7th February 2011, 11:27
  4. Application crashing
    By addu in forum Qt Programming
    Replies: 9
    Last Post: 22nd May 2009, 10:37
  5. sendPostedEvents crash
    By stinos in forum Qt Programming
    Replies: 5
    Last Post: 29th October 2006, 09:43

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.