I’m encountering problems building my application with JUCE and thought someone could help. My application requires C++ standard library calls which means that I have to link against the DLL versions of the Microsoft C++ runtime libraries.
First I tried to build the JUCE library in debug mode and link it to my application which has been built in debug mode, when I run the application it halts immediately and I get the System message: “An application has made an attempt to load the C runtime library incorrectly, Please contact the application’s support team.”
If I then compile my application in debug mode and link to a version of JUCE that is built in release mode, I no longer see this problem. Unfortunately, I do see runtime errors that are undoubtedly related to this mixing of release and debug models. Usually it crashes on a JUCE call that’s performing some sort of malloc or free.
Has anybody seen any of this type of behavior before? I’m including a stack trace so you can better see what’s happening at runtime.
[code]Unhandled exception at 0x1021c2b2 (msvcr80d.dll) in TuneUpApp.exe: 0xC0000005: Access violation reading location 0xfeeefee8.
msvcr80d.dll!CheckBytes(unsigned char * pb=0xfeeefee8, unsigned char bCheck=‘í’, unsigned int nSize=3) Line 1654 + 0x7 bytes C++
msvcr80d.dll!_free_dbg_nolock(void * pUserData=0xfeeefeee, int nBlockUse=1) Line 1257 + 0x17 bytes C++
msvcr80d.dll!_free_dbg(void * pUserData=0xfeeefeee, int nBlockUse=1) Line 1220 + 0xd bytes C++
msvcr80d.dll!free(void * pUserData=0xfeeefeee) Line 1178 + 0xb bytes C++
TuneUpApp.exe!_png_free() + 0x20 bytes C
TuneUpApp.exe!_png_free_data() + 0x87 bytes C
TuneUpApp.exe!png_destroy_read_struct() + 0x4b bytes C
TuneUpApp.exe!juce::juce_loadPNGImageFromStream() + 0x16f bytes C++
TuneUpApp.exe!juce::PNGImageFormat::decodeImage() + 0xa bytes C++
TuneUpApp.exe!juce::ImageFileFormat::loadFrom() + 0x16 bytes C++
TuneUpApp.exe!juce::ImageFileFormat::loadFrom() + 0x52 bytes C++
TuneUpApp.exe!juce::ImageCache::getFromMemory() + 0x2c bytes C++
TuneUpApp.exe!CTuneUpIconBarChooser::GetImageFromFile(const int resID=123, juce::String fileName={…}) Line 278 + 0xd bytes C++
TuneUpApp.exe!CTuneUpIconBarChooser::buttonToItem(juce::Button * button=0x015281c8) Line 167 + 0x20 bytes C++
TuneUpApp.exe!CTuneUpIconBarChooser::buttonClicked(juce::Button * button=0x015281c8) Line 236 + 0xf bytes C++
TuneUpApp.exe!juce::Button::sendClickMessage() + 0x91 bytes C++
TuneUpApp.exe!juce::Button::internalClickCallback() + 0x3b bytes C++
TuneUpApp.exe!juce::Button::handleCommandMessage() + 0x33 bytes C++
TuneUpApp.exe!juce::MessageManager::deliverMessage() + 0x5d bytes C++
TuneUpApp.exe!juce::juce_dispatchNextMessageOnSystemQueue() + 0x65 bytes C++
TuneUpApp.exe!juce::MessageManager::dispatchNextMessage() + 0x46 bytes C++
TuneUpApp.exe!juce::MessageManager::runDispatchLoop() + 0x6 bytes C++
TuneUpApp.exe!juce::JUCEApplication::main() + 0x1e1 bytes C++
TuneUpApp.exe!WinMain(HINSTANCE * formal=0x00400000, HINSTANCE * formal=0x00400000, char * commandLine=0x00151f19, HINSTANCE * __formal=0x00400000) Line 20 + 0x7f bytes C++
TuneUpApp.exe!__tmainCRTStartup() Line 589 + 0x35 bytes C
TuneUpApp.exe!WinMainCRTStartup() Line 414 C
kernel32.dll!7c816fd7()
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
[/code]
Any tips would be much appreciated.
=Gabe