Application failed (MFC) in the release through the optimization of the compiler, but works well in the debug version

I am facing problem with the Release version. Application works fine in the Debug version, but in the Release version a pointer initialized to contain the object of another class becomes allocation to different addresses, causing corruption to its values.

My main application class is K32App
code in K32App.h file
CSheetPrintManager* m_pSheetPrintManager;
CSheetPrintManager* GetSheetPrintManager() { return m_pSheetPrintManager; }

In file K32App.cpp
K32App::K32App()
{
  m_pSheetPrintManager= NULL;
}
BOOL K32App::InitInstance()
{
  if(!m_pSheetPrintManager)
    m_pSheetPrintManager= new CSheetPrintManager();
}
K32App::~K32App()
{
  if(m_pSheetPrintManager)
    delete(m_pSheetPrintManager)
}

 In my file  CSheetPrintManager.cpp
 void CSheetPrintManager::CSheetPrintManager()
 {
   //Initialized all member variables to default values.
   Init();

 }
 void CSheetPrintManager::Init()
 {
   m_nSheetType = SheetIllegalNone;  //long
   m_sBankEntry.Empty();         //CString
   m_bHistorical = FALSE;        //BOOL
   m_bDebitDetailsSet = FALSE;  //BOOL
   m_mapRequested.RemoveAll(); // Type CMap
 }

During the startup of the application, when it reaches

  if(!m_pSheetPrintManager)
    CSheetPrintManager= new CSheetPrintManager();

and trying to create a m_pSheetPrintManager object, a 'this' inside the CSheetPrintManager.cpp pointer shows a valid address (0x03768ce0) at the stop just to brace {, once I more in CSheetPrintManager.Init (), not 'this' gets different location and starting point to a different address (0 x 0000000) and then passing more its starting pointing to an another rental (0x03786ce0)} ", then arriving to m_mapRequested.RemoveAll(); 'this' points to some other location. back to main application C32App.cpp file I get next to 'm_pSheetPrintManager' error CXX0030 ' expression cannot be evaluated" in the window of the car. and application continues to run. See what get when move mouse m_pSheetPrintManager (can't post the image because need 10 reputation for him :) so antisocial)Auto window studio screenshot 

In debug mode, I get m_pSheetPrintManager pointing to the same location during all the processing of the application and members are always correctly initialized.

But in Release mode, m_pSheetPrintManager continues to point to the different location (address in the window of Auto value). and all the class member variables CSheetPrintManager garbage (Uninitialized) values with each line of treatment within the CSheetPrintManager class.

If I disable the optimization of the c++ in Release Mode then it works very well without any problems.

Any help/advice/suggestion is the most popular. Thanks in advance.

PS: This is my first question here so please excuse if you lack something to point or express properly.

This issue is beyond the scope of this site (for consumers) and to be sure, you get the best (and fastest) reply, we have to ask either on Technet (for IT Pro) or MSDN (for developers)
*

Tags: Windows

Similar Questions

  • What is the next step to get the debug version of InDesign CS6?

    I downloaded and used earlier versions of the developer version of InDesign for Mac and I completely forgot how. I hope someone here can advise me what I should do and point me in the right direction.

    To the header of this forum it says:

    "To effectively use the InDesign SDK, you must have installed the InDesign debug version. Debugging of InDesign are available through Adobe partner programs. You can connect to one of the partner programs using the Partner Portal. Here is a link to the landing page of Solution Partner. Here is a link to the company the developer program page. »

    I use the account by which we have established a program of partner before. So here are my questions.

    (1) how to find my details to see if I need to renew the partnership? We already had one, but it could be expired and I can't say. Should what kind of partner program I expect?

    (2) once the partnership program is released, I will actually download the debug for CS6 InDesign for Mac?

    (3) if the above is the wrong approach, no one knows the SKU for the debug version. We talked to our contacts at Adobe, and they have not heard of a debug version of InDesign. The SKU could help them find the right product for us.

    Drop an email to the folk on the assistance of partner technical [email protected]. They manage the administrative aspect of this partner program and should be able to help with questions about your membership and the debugging of InDesign.

    -Roddy

  • InDesign CC 2015 will not load the plugin, claims its for the debug version

    Hi, so: I am compiling a plugin for InDesign CC 2015.1 x 64, and during the launch of the ID, he says its for a debug version.

    Only this isn't. I checked three times and sound using the Release configuration (I have never built a before debugging version); her affair against bookstores of liberation in the configuration pages.

    What is exactly what that search the ID that indicates a plugin like 'debug '?

    Although you checked, but still I would like to apply the points that you need to check to identify the problem

    1. Check again that only free Indesign libraries are linked in, a way to check this is to just rename the folder where the debug version of lib and then compile it. We would immediately have a binding error.
    2. Check that the indicator of correct preprocessor is sent to the command ODFRC line that is there is no d DEBUG to the command ODFRC line
    3. Check again that NDEBUG is sent as preprocessor flag to the compiler as well.

    I suppose that one of these gossipyshe points doesn't solve your problem, if it does not then post back. We will think of other causes to this problem

    Thank you

    Manan

  • Updated Windows kb3087916 [August] installs the DEBUG version of the Flash ActiveX in IE11 on 8.1 Windows systems (32-bit).

    Kb3087916 Windows Update [August] installs the DEBUG version of the Flash ActiveX in IE11 on 8.1 Windows systems (32 bit).  This version generates ActionScript errors.

    It may (or may not) do under other configurations (e.g. 64-bit?  Windows 10?) -I don't know.

    Uninstallation of the update is NOT the solution: Tit Windows Update itself must be fixed!

    The problem has been resolved by the release of kb3089023

    https://support.Microsoft.com/en-us/KB/3089023

    If you run Windows updates, it should find it now.

  • Flash Builder 4.5 unable to find the debug version of Flash Player.

    I'm running into the following error message:

    C:\Windows\System32\Macromed\Flash\NPSWF32.dll

    Flash Builder cannot locate the required Adobe Flash player debug version. You should perhaps install the debug version of Flash Player or reinstall Flash Builder.

    You want to try to debug using the current version?

    I already went to the binding dialog box provided to download Flash Player debug builds.  I installed the Plugin and AX versions of the debugger.  Reboot all browsers, Flash Builder and restarted the PC for good measure.  I spent a good amount of time looking for information on this issue.  All the threads I found who were related to this issue was to present one must be achievable.  So I'm starting a thread on this problem.

    I'm running Flash Builder 4.5 on Windows Vista 32-bit.  I tried to use 3.6.24 FireFox and IE 8.0.6001.

    I started with the trial version and then purchased the license online.  I do not know if that has an impact.

    All the information to diagnose this problem would be greatly appreciated.

    Hi emat3d,

    Try to uninstall Flash Player with this uninstaller from Adobe, please make sure that you close all applications that may be using Flash Player. Then try again to install your Flash Player debugger. He has solved it for me.

  • I use iMessage to the text of my Macbook. For some reason, it will not let me send a text message to a particular group (everyone has iMessage/iPhones) to my computer, but works well on my iPhone. All messages always appear on my Macbook iMessa

    I use iMessage to the text of my Macbook. For some reason, it will not let me send a text message to a particular group (everyone has iMessage/iPhones) to my computer, but works well on my iPhone. All messages always appear on my Macbook iMessage, but when I click in the conversation, no text box for me to write as he does with everyone. It's driving me crazy. How should I do? The two contacts are in my address book and identified on my computer but I can't their message from my computer and have to keep spending on my phone to text their return. Their new messages are always also highlighted on my computer. In the photo I've included, you can see there is no text box for the text of the group with "Franny, dad."

    Thanks for any help!

    What happens if you start a new conversation with Franny & Dad from the IOW computer do not try to "catch" the conversation

    Click on new message and put their names in there

    If this does not work - remove the wire from the Mac and try again

  • I can't uninstall the debug version of flash player...?

    I have this version: 18.0.0.232 (debug version). I saw the posts explaining how to uninstall the present, but it never works (downloaded an uninstall offline program, closed all the browser windows, then restarted - no result) .dows

    In collaboration with IE on Windows 8.1, if that helps.

    Hi Excadream,

    The debug version of Flash Player is installed as an update of Windows on Windows 8.x.  You will need to go to control panel > programs > programs and features > installed updates and find the Flash Player of the debugger for Internet Explorer update and uninstall this update.

    --

    Maria

  • problems to install the debug version of flash player

    I tried to install the debug version of flash player on a 64-bit Windows 7 computer using Firefox as my browser, but got the following installation error: "the Adovè Flashplayer version you are trying to install is not the most recent version. Visit the Player Download Center to get the latest and most secure version. "Of course, I did several times and restarted my computer.

    Originally, I used the 64-bit version of Firefox (Waterfox) as my default browser, but because the debugger is 32-bit only, I switched to Firefox (32 bit). However, this did not help. Any ideas?

    Harry

    Do a clean install: How to do a clean install of the Flash Player?

  • Why to have latest version of applications was replaced by the earlier version after Migration Wizard

    I recently bought a new iMac running the Version OS X El Capitan entered 10.11.5 pre loaded with the latest Numbers, Keynote, iMovie, GarageBand etc applications.  Unfortunately after you run the Migration Wizard from a backup Time Machine to migrate the data from my previous iMac, apps like iMovie and GarageBand have returned back to older versions.  Please can someone tell me how I can get the latest versions that have been initially installed without having to pay for download on the App Store.  Thank you.

    Have you checked the App Store for updates? If you go to the App Store purchases tab, apps appear there? If so, try to download them again.

  • Propeller: Graphics distorted in Windows applications after you install the latest version of the graphics driver (3643)

    After downloading and installing the latest graphics driver for lenovo support pages (10.18.10.3643) I noticed that some graphics in Windows applications are distorted. Generally, it looks like a refresh or memory problem. If you start the application that everything is OK and after using it awhile (or switch to another app and back)

    For example, Onenote radial menu looks like this:

    Where is should look like this:

    Over time, it could get worse, as the entire application has problems how to freshen up, or this menu does not lose only icons, but also the colors, etc..

    I tried to reduce the demand for resources by disabled anti-aliassing, but it does not help.

    Normal windows applications do not have the problem and friendly resource (for example not chart orieted apps) takes more time to show the same behavior.

    It is 'just' a bug in the driver, or y at - it shape a setting I have to solve this problem?

    Thank you

    Ruud

    the version that the system put in place after unistalling the last display dirver is:

    Version: 9.17.10.3190

    Dirver date = 20/06/2013

    = Intel driver provider

  • Update Application of Adf faces the new Version

    Hello

    I have a running adf faces application with jdeveloper (11.1.1.1.0), I want to update
    my currently adf application to the new version of adf faces (11.1.1.3.0).

    How can I update the application?

    Jar files that I could spend? or some works that runs the application in the new version of jdeveloper?

    Thank you.

    As far as I know, you cannot run JDev 11.1.1.3 ADF applications on WLS 10.3.1 - you must upgrade to WebLogic 10.3.3 first.

    John

  • XP Professional 32-bit application if I have the wrong version of the SP£

    I v.3311 Sevice Pack 3 installed and I am running XP proffesional. I am told by Kaspersky, I have the right version and that it is interfering with their software. Is this correct and if it is just to download Service Pack 3 again on the download site or I have to delete the existing pack Service first?

    07/14/2010 12:34, master wrote:
    > I v.3311 Sevice Pack 3 installed and I am running XP proffesional.
    > I am told by Kaspersky, I have the right version and that it is
    > interfere with their software. Is this correct and if it is do I just
    > Download Service Pack 3 again on the site to download or do I have to
    > First remove the Service pack today?
     
    How determine you that you have "Sevice Pack 3 installed v.3311"?
     
    How did you get first Service Pack 3?
     
    Please be specific.
     
    --
    LEM
     
  • Version of the plugin flash player 23.0.0.162 fails to download the old version of the browser based on Chromium

    Windows XP, using chrome base SR Ware iron 49.0.2600.0 version (as it is the last available for Windows XP). After updating flash player PPAPI to version 23.0.0.162 discovered that the plugin has been successfully installed, but could not get downloaded when required by a Web page.

    no flash.jpg

    Had to downgrade to the 22 version which works fine

    Link below might be useful:

    Re: Flash has stopped working - strange version 23.0.0.162 in Chrome?

    Re: Plugin Flash PPAPI 23.0.0.162 does not work in Opera and chrome

  • Impossible to install the debug version InDesign CC 2015.2 on MacOSX1

    Hello

    I just downloaded CC2015.2 InDesign debug version of Portal Technology Partner Program, but I can't install it. When I open the disk image and run the updater application I get window "update failed". Someone at - it had the same problem? Solve you this problem? How?Screen Shot 2016-01-22 at 12.42.59.png

    Heh, I figured that out. I needed a copy of CC2015.0 installed on my machine first. Now it's working. Anyway, maybe it helps someone else dealing with this problem in the future

  • Crash of CVI 2013 with the debug version

    Hello

    I'm trying to migrate a large enough project of CVI 2012SP1-CVI 2013 and feels the clang compiler crash when I try a debug on some files.  Clang will also plant (' Labwindows/CVI the Clang compiler has stopped working... ") so I am just trying to compile the file (ctrl-k) in the editor.  Here's what I found:

    • A release not crushed

    • By turning the C99 power button has no effect

    • Change the warning level has no effect (other than the types of warnings that I get, of course)

    • Change the ' debug ' on 'No run-time check' eliminates the crash.

    • 'Enable. Option of obj"eliminates the crash.

    • By turning precompiled headers power has the effect.

    Here is the long message I get from the compiler when this happens (including all the warnings that are always displayed when the level is set to 'None'):

    Any thoughts?  Unfortunately it's a pretty big project that I can't post and it doesn't seem to be an indication of the or the lines in the file that he has problems with it, so I can't limit, although it seems to hint that he has problems with the structures of some sort.  The PC is running Windows 7 Pro 32 bit if it matters.

    Thank you.

    Hi tstanley,

    We could find the cause of the accident of the compiler from your code. We will settle in the next update and you can follow with bug ID 422577.

    The issue occurs when in a function, you have a call to a function that returns a structure in a global variable and then refer to this world in another function. For example:

    struct Foo foo; global variable foo

    Sub FuncA()
    {
    foo = GetStructFoo();
    }

    Sub FuncB()
    {
    do something with foo / / crash
    }

    In this case is because we are bad associate information of temporary pointer with foo in FuncA. Then in FuncB, clang will crash when it tries to access this pointer information.

    There are two workaround solutions, but both require changes in the code.

    1. modify the function that returns the structure, GetStructFoo in my example, the return via a pointer parameter:

    void GetStructFoo(Foo *foo);

    2 use a temporary local variable to manipulate the structure returned and then assign its value to the overall structure:

    struct Foo tempFoo;

    tempFoo = GetStructFoo();

    foo = tempFoo;

    In our next update, we will include the fix for this bug.

Maybe you are looking for