Debugbuild OK! Release build CRASHES! WHY?
-
Hi! I've just about to release a new MFC app. All works in debug ver. When I go to release it crashes when I work with radio buttons - always at L-button up from selecting a new radio btn. Then I do the classics: Change from/to all thinkable optimazations - nothing happens! Can anyone of you think of why? It has no effect to build with MFC-dll's as static. ????????????? Regards Michael Mogensen, dev. mm it-consult dk.
-
Hi! I've just about to release a new MFC app. All works in debug ver. When I go to release it crashes when I work with radio buttons - always at L-button up from selecting a new radio btn. Then I do the classics: Change from/to all thinkable optimazations - nothing happens! Can anyone of you think of why? It has no effect to build with MFC-dll's as static. ????????????? Regards Michael Mogensen, dev. mm it-consult dk.
Hi, Keep in mind that in debug mode your pointer variables are initialized, in release they are not, maybe you are counting on a certain value on a non initialized variable ?. if you can post some code perhaps we can help you more. Andres Manggini. Buenos Aires - Argentina.
-
Hi! I've just about to release a new MFC app. All works in debug ver. When I go to release it crashes when I work with radio buttons - always at L-button up from selecting a new radio btn. Then I do the classics: Change from/to all thinkable optimazations - nothing happens! Can anyone of you think of why? It has no effect to build with MFC-dll's as static. ????????????? Regards Michael Mogensen, dev. mm it-consult dk.
Pay Good attention to code that is written in ASSERT statments (or any code/macro that is excuted in debug builds only). This code is only called in Debug Versions. For example if you have something like this CWnd *pWnd = NULL; ASSERT(pWnd = GetDlgItem(ID_ANYTHING)); pWnd->ShowWindow(SW_HIDE); This code will crash under release but will work under debug ;) Change the ASSERT into VERIFY. Ralph Varjabedian Software Engineer
-
Hi! I've just about to release a new MFC app. All works in debug ver. When I go to release it crashes when I work with radio buttons - always at L-button up from selecting a new radio btn. Then I do the classics: Change from/to all thinkable optimazations - nothing happens! Can anyone of you think of why? It has no effect to build with MFC-dll's as static. ????????????? Regards Michael Mogensen, dev. mm it-consult dk.
You need to read: "Surviving the Release Version" http://www.codeproject.com/debug/survivereleasever.asp[^]. Also the Debugger should help pinpoint the error fairly quickly. If you still can't work it out post some code. Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
-
Hi! I've just about to release a new MFC app. All works in debug ver. When I go to release it crashes when I work with radio buttons - always at L-button up from selecting a new radio btn. Then I do the classics: Change from/to all thinkable optimazations - nothing happens! Can anyone of you think of why? It has no effect to build with MFC-dll's as static. ????????????? Regards Michael Mogensen, dev. mm it-consult dk.
One of the most common causes of this that I have seen is due to message handlers that don't have the correct signatures. I'm pretty sure the article that Neville mentioned discusses this issue. You might want to read KB article Q195032. If you are using VC 6, you can send me an email containing your email address and I'll send you a modified version of afxmsg_.h that contains the changes suggested in Q195032. This will catch most cases of message handlers with incorrect signatures. -------- There are 10 types of people in this world. Those who know binary and those who don't.
-
One of the most common causes of this that I have seen is due to message handlers that don't have the correct signatures. I'm pretty sure the article that Neville mentioned discusses this issue. You might want to read KB article Q195032. If you are using VC 6, you can send me an email containing your email address and I'll send you a modified version of afxmsg_.h that contains the changes suggested in Q195032. This will catch most cases of message handlers with incorrect signatures. -------- There are 10 types of people in this world. Those who know binary and those who don't.
Thank you for your kind answer! I an using VS6.0 yes - I look forward to a mail from you! Thanx' again! Regards, Michael Mogensen, mm it-consult dk.