I have two projects that each create a module packet.
Each module packet is compiled into a separate .dll library file.
When I place both .dll files simultaneously in the directory AWE Designer 8.D.3.1.RC5-build2947 Pro\Bin\win32-vc142-rel\,
the AWE Server fails to load properly and displays the error message(please refer to attachment).
However, if I place only one of the .dll files in that directory, the AWE Server loads successfully.
Could you please explain the reason for this issue? It's quite urgent. Thank you!
10:54am
Hi Yong Li,
This is a debug-mode assertion from the Microsoft Foundation Classes (MFC) runtime, not a crash in your code per se. It means MFC (the GUI framework) hit an unexpected state during execution, and the assertion was placed in Microsoft’s source to help developers detect incorrect usage of MFC APIs during development.
Common triggers
Custom DLL using MFC: If you have a DLL that uses MFC but doesn’t call AfxWinInit() properly.
Static objects: An MFC object (like CWnd, CWinApp, etc.) being constructed before WinMain() runs.
Improper MFC initialization: Calling MFC code before InitInstance().
Debug/Release mismatch: Linking a release module to a debug MFC library (mfc140d.dll vs mfc140.dll).
How to fix or debug it
Check where the assertion triggers
When the dialog pops up, click Retry — it should break into your debugger. Examine the Call Stack to see your code path that led there.
Confirm your project’s entry point
Ensure CWinApp-derived class exists and is properly instantiated in your APP class.
Check runtime settings
All projects (EXE and DLLs) should use the same runtime:
Debug builds: /MDd (Multi-threaded Debug DLL)
Release builds: /MD (Multi-threaded DLL)
Avoid MFC calls before InitInstance()
If you’re creating windows, dialogs, or using AfxGetMainWnd() too early, move that code into or after InitInstance().
Can you confirm whether your 2 Custom Module DLLs are using different debug settings? I presume that the VS Projects were created from the same version of Audio Weaver. This is the only thing that leaps out at me from these chatGPT suggestions.
Thanks,
Gary