Qt-interest Archive, May 2008
Re: Strange crash on QObject
Message 1 in thread
Hi all,
May be that's help more on the crash:
void ImageViewer::mousePressEvent(QMouseEvent* event)
{
Point * p = viewPointToImagePoint( new Point(event->x(), event->y(),
m_CurrentZ));
emit pointClicked(p);
} <----- the crashes ocurrs here!.
Another thing: my app currently aren't using threads.
Regards,
Wagner Sales
Message 2 in thread
On Friday 02 May 2008 19:17:34 Wagner Sales wrote:
> } <----- the crashes ocurrs here!.
propably corupted stack or something similar. gdb is of no use then. check
with valgrind.
> Another thing: my app currently aren't using threads.
sure? note that some non qt library callbacks might be running on a different
thread. including (and especially) winapi.
--
[ signature omitted ]
Message 3 in thread
Chances are, you are trying to delete the ImageViewer object in one of the
slots called from pointClicked(). You cannot delete an object in an event
handler for that object.
Keith
**Please do not reply to me, reply to the list.**
On 05-02-2008 12:17 PM, "Wagner Sales" wrote:
> Hi all,
>
> May be that's help more on the crash:
>
> void ImageViewer::mousePressEvent(QMouseEvent* event)
> {
> Point * p = viewPointToImagePoint( new Point(event->x(), event->y(),
> m_CurrentZ));
> emit pointClicked(p);
> } <----- the crashes ocurrs here!.
>
> Another thing: my app currently aren't using threads.
>
> Regards,
>
> Wagner Sales
>