Page 1 of 1

Runtime Error in Every wxWidgets Application

Posted: Mon Sep 05, 2005 9:03 pm
by cristiant
Hi,

I have XP+SP2, Visual Studio 8, wxWidgets 2.6.1. I have compiled the Debug DLL version of wxWidgets.

Every wxWidgets application I run (including "Hello World") compiles and links ok, but at runtime I get this error:

Image

The execution doesn't even reach MyApp::OnInit(). How can I fix this? I suppose it's a wxWidgets compilation / linking problem.

Thanks,
Cristian

Posted: Tue Sep 06, 2005 8:08 am
by benedicte
May you have an issue with Unicode / Non unicode builds ?
Did you have any warning when you have built wx dlls, or the samples ??

Posted: Tue Sep 06, 2005 11:37 pm
by cristiant
No, I built the non unicode debug dll configuration. And I didn't get any warnings (apart of deprecation of string functions, printf, etc.)

This is the code from wxWidgets sources where the the execution stops:

wxWidgets-2.6.1/src/common/init.cpp:

Code: Select all

// we need a dummy app object if the user doesn't want to create a real one
class wxDummyConsoleApp : public wxAppConsole
{
public:
    wxDummyConsoleApp() { }
    virtual int OnRun() { wxFAIL_MSG( _T("unreachable code") ); return 0; }

    DECLARE_NO_COPY_CLASS(wxDummyConsoleApp)
};
The error message (debug alert) happens in OnRun(). I don't understand the coments that the user doesn't create a real application. What is that? The application I am trying to run worked fine under wxWidgets 2.4.2.

Runtime errors also with 2.6.2

Posted: Sat Dec 03, 2005 1:16 pm
by molto_b
Hi there,

I am getting the exact same result as described above (unreachable code assertion in init.cpp), for my own as well as for all sample apps, if and only if I compile/use wx as dll. Static linking works fine.

My configuration:

wxWidgets 2.6.2
Visual C++ 8 (Express)
Windows XP SP2

Christian: did you eventually solve your problem?

It worked fine for 2.6.1...

Any hint is greatly appreciated,
Mike

Posted: Sat Dec 03, 2005 1:20 pm
by Jorg
Please be informed that this forum is not highly visited, it is better to direct this problem to the original wx.NET mailing lists if your problem is not solved here.

- Jorgen