terminate called without an active exception. Aborted. [long]

142 views
Skip to first unread message

Mauro Ziliani

unread,
Mar 25, 2010, 7:56:30 AM3/25/10
to wx-...@googlegroups.com
Hi all.

My name's Mauro and I'm writing a multi-thread application in Ubuntu Karmic Linux with wxWidgets 2.8.10.
The following explanation can be hard to understand, but I try to explain you how my application works.

My application is build on 3 indipendent objects.

Each device object is derived like this class

class GeneralDevice : public wxEvtHandler, public wxThreadHelper
{
protected:
  virtual void *Entry() { return NULL; }
private:
   DECLARE_DYNAMIC_CLASS(GeneralDevice);
};

class Device : public GeneralDevice
{
protected:
   virtual void *Entry();
private:
   DECLARE_DYNAMIC_CLASS(Device, GeneralDevice)
}

The Entry function of each device is a while loop.
Every loop sleeps for a while calling GetThread()->Sleep(timeout).
The application containers data (vector, list and queu) are implemented with stl.

The device communication schema is the same for all 3 devices.

1. sleep for a while (500ms).
2. write request
3. wait for answer.
4. post a custom event which communicate to the parent the operation result.
restart from step 1.

Device0 is linked to the application TopWindowLevel (MainFrame)
Device1 and Device2 are linked to a Panel1 and Panel2.
Panel1/2 are childs of MainFrame.

When MainFrame receives the event from Device0, post the same event to Panel1 and Panel2.
Panel1 receive events from Device1, Panel2 receives event from Device2.

Each panel has own event table defined statically with BEGIN_EVENT_TABLE/END_EVENT_TABLE.

Well.
This application schema works well on my laptop (Asus M6VA, Penitum M single core).
If I run the application inside an Atom DualCore platform the application give the messagge in subject.

How can I track this beaviours?

Gdb isn't usefull, because the termination of the program doesn't generate exception.

The problem seems the dualcore system.

Any idea?

Best regards.
   Mauro Ziliani

Vadim Zeitlin

unread,
Mar 25, 2010, 8:10:27 AM3/25/10
to wx-...@googlegroups.com
On Thu, 25 Mar 2010 12:56:30 +0100 Mauro Ziliani <mauro....@gmail.com> wrote:

MZ> Gdb isn't usefull, because the termination of the program doesn't generate
MZ> exception.

You could at least set a breakpoint on terminate() to see where is it
called from.

Anyhow, I don't see anything in your message about neither exceptions nor
terminate so it's quite impossible to say what's going on. My only advice
would be to review the code where you (or the functions called by you,
which excludes wxWidgets ones) throws exceptions and check that they're all
caught correctly.

Regards,
VZ

Reply all
Reply to author
Forward
0 new messages