8 Replies Latest reply: Aug 24, 2012 6:26 AM by 922635 RSS

    Upgrade from 10 to 11 - heap corruption problem

    893090
      Hello,

      I have a problem with Windows application that was developed some time ago. It connects to Oracle using ODBC. It works fine with Oracle Client version 10.2.0.1. When I upgraded Oracle client to 11g Client R2, the strange problem occurred. Debug showed that the break happens when MFC's class CRecordSet calls method Close(). It is closed right after updating row (method Update()). Error message looks like this:

      ------------------------------------------------------------------------------------------
      Debug Error!

      Program C:\**************\app.exe

      HEAP CORRUPTION DETECTED: after Normal block (#4292) at 0x01B59300
      CRT detected that the application wrote to memory after end of heap buffer.

      Memory allocated at
      f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\dbcore.cpp(2622).

      (Press Retry to debug application)
      ------------------------------------------------------------------------------------------

      OS is Windows 7, 32-bit.

      When I press Ignore everything seems to be fine. Until the next time anything in database is updated. Then, the same message appears. I repeat In Oracle 10 everything works fine. Is ODBC driver upgraded to version that does not support some operations?
        • 1. Re: Upgrade from 10 to 11 - heap corruption problem
          857265
          hi,

          this can mean any of the following:-

          1/ if it initially have been compiled with ODBC v10 lib you may need to re-build the app (the library signature may have been changed);
          2/ what Oracle database version do you connect to?

          I think, under Win7, you may need to re-build your up.
          • 2. Re: Upgrade from 10 to 11 - heap corruption problem
            893090
            854262 wrote:
            hi,

            this can mean any of the following:-

            1/ if it initially have been compiled with ODBC v10 lib you may need to re-build the app (the library signature may have been changed);
            2/ what Oracle database version do you connect to?

            I think, under Win7, you may need to re-build your up.
            Actually, I'm debugging and re-building all the time, but it doesn't help. Oracle database version I'm testing right now is 11g x64, but I tested with x32. No luck.

            Edited by: user8390540 on Oct 7, 2011 7:02 AM
            • 3. Re: Upgrade from 10 to 11 - heap corruption problem
              893175
              I get the same exact issue. In my case, the server is still 10g but the client is 11. Windows 7, x64. Using 32 bit Oracle odbc. The real problem happens in CRecordset::FreeRowset() after a modification takes place. This happens only for Oracle and not with a Sql Server database.

              Using VS 2010, SP 1. Rebuilding does not help, this has been going on for months on everyone's development PC here at work.
              • 4. Re: Upgrade from 10 to 11 - heap corruption problem
                899727
                I am having the same problem (VS 2010 SP1, Oracle Instant Client ODBC connection (database is 11g version 11.2.0.2.0)

                Basic Lite Package Information
                ==============================
                Sat Nov 27 17:26:59 CST 2010
                Client Shared Library 32-bit - 11.2.0.2.0

                Did you find or got a solution yet?
                Thanks,

                Luc
                • 5. Re: Upgrade from 10 to 11 - heap corruption problem
                  914620
                  I too have the same problem. I use the 11g driver to connect to either 10g or 11g databases.

                  I'm using windows XP.

                  It would be cool to have a fix. The 11g driver seems to have good speed improvements, but we cannot use it because of this heap corruption error...
                  • 6. Re: Upgrade from 10 to 11 - heap corruption problem
                    922635
                    Hi there,

                    It's been so long since I've found sb with same problem, but I also have that heap corruption error, exactly as first explained.
                    I'm using win7 with the 11g driver to connect, but I don't know which database driver is.

                    I've had this problem forgotten for 4 months, and it's been resurrected again.

                    If someone finds a solution it'd be great to know it.

                    Thanks
                    • 7. Re: Upgrade from 10 to 11 - heap corruption problem
                      922635
                      I've been working some steps more and after a "little testsuite" it seems to be problem of the debug version (as the message says: "Debug ERROR!").

                      I've tried executing the code in release version and after a 100000 updates loop over a text registry, it seems to work perfectly. I don't know if it's actually a driver version problem or if it only affects the code version (debug/release).

                      Could somebody confirm this?

                      Thank you
                      • 8. Re: Upgrade from 10 to 11 - heap corruption problem
                        922635
                        Hello,

                        Once again, we have dedicated some more time on that question, and the new tests revealed that the problem is in the first 11 driver version (11.02.00.01). Exists a solving patch for that 01 version, and the 11.02.00.02 version also solves the problem.

                        Debugging the problem, it seemed to be an operation trying to write in a non-reserved space of memory. The space reserved booked for less space than finally wrote. So that problem is asserted in debug executions, and ("luckily") dont' give noticeable problems, but obviously can cause them, in release versions.

                        So, upgrading the driver version would solve that memory corruption.

                        Hope to be helpful information.