Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Heap Corruption in richedit

Heap Corruption in richedit

Scheduled Pinned Locked Moved Managed C++/CLI
helpcsharpvisual-studiodata-structuresdebugging
4 Posts 3 Posters 23 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    ForNow
    wrote on last edited by
    #1

    Hi I am getting a heap corruption. I am running under the visual studio debugger. and the exception is at

    Quote:

    ntdll.dll!RtlReportCriticalFailure() Unknown

    My scenario is I have a DLL reading and formatting data for a .exe. I keep a record count so when I get a exception, at

    Quote:

    ntdll.dll!RtlReportCriticalFailure() Unknown

    I insert code if (recordcount == 0x0000196e) __debugbreak; I then start stepping through the code looking for the problem how ever when stepping through the code works I try this multiple times however when I stop the code where the exception were to occur it always complete successfully The listing I am trying to to inset in the richedit is huge about 153 pages 30 lines to page, 134 bytes across I roughly calculate the number of bytes I am trying to insert into the richedit is 1.6 meg. I am not sure if the size is the issue I do a Rciheditctrl::LimitText with the amount bytes I need Again when break on the offending record and step thru the code it completes normally Here is the stack frame My code starts a the DriveRichedit.exe ntdll.dll!RtlReportCriticalFailure() Unknown ntdll.dll!RtlpHeapHandleError() Unknown ntdll.dll!RtlpHpHeapHandleError() Unknown ntdll.dll!RtlpLogHeapFailure() Unknown ntdll.dll!RtlpHeapFindListLookupEntry() Unknown ntdll.dll!RtlpFindEntry() Unknown ntdll.dll!RtlpAllocateHeap() Unknown ntdll.dll!RtlpAllocateHeapInternal() Unknown riched20.dll!CTxtArray::AddBlock(long,long) Unknown riched20.dll!CTxtArray::SplitBlock(long,long,long,long,int) Unknown riched20.dll!CTxtPtr::InsertRange(long,unsigned short const *) Unknown riched20.dll!CRchTxtPtr::ReplaceRange(long,long,unsigned short const *,class IUndoBuilder *,long,long *,unsigned long) Unknown riched20.dll!CTxtRange::ReplaceRange(long,unsigned short const *,class IUndoBuilder *,enum SELRR,long *,unsigned long) Unknown riched20.dll!CTxtRange::CheckLimitReplaceRange(long,unsigned short const *,int,class IUndoBuilder *,unsigned long,long *,long,int,unsigned long) Unknown riched20.dll!CTxtRange::CleanseAndReplaceRange(long,unsigned short const *,int,class IUndoBuilder *,unsigned short *,long *,unsigned long) Unknown riched20.dll!CLightDTEngine::ReadPlainText(class CTxtRange *,struct _editstream *,int,class IUndoBuilder *,long) Unknown riched20.dll!CLightDTEngine::LoadFromEs(class CTxtRange *,long,struc

    V K 2 Replies Last reply
    0
    • F ForNow

      Hi I am getting a heap corruption. I am running under the visual studio debugger. and the exception is at

      Quote:

      ntdll.dll!RtlReportCriticalFailure() Unknown

      My scenario is I have a DLL reading and formatting data for a .exe. I keep a record count so when I get a exception, at

      Quote:

      ntdll.dll!RtlReportCriticalFailure() Unknown

      I insert code if (recordcount == 0x0000196e) __debugbreak; I then start stepping through the code looking for the problem how ever when stepping through the code works I try this multiple times however when I stop the code where the exception were to occur it always complete successfully The listing I am trying to to inset in the richedit is huge about 153 pages 30 lines to page, 134 bytes across I roughly calculate the number of bytes I am trying to insert into the richedit is 1.6 meg. I am not sure if the size is the issue I do a Rciheditctrl::LimitText with the amount bytes I need Again when break on the offending record and step thru the code it completes normally Here is the stack frame My code starts a the DriveRichedit.exe ntdll.dll!RtlReportCriticalFailure() Unknown ntdll.dll!RtlpHeapHandleError() Unknown ntdll.dll!RtlpHpHeapHandleError() Unknown ntdll.dll!RtlpLogHeapFailure() Unknown ntdll.dll!RtlpHeapFindListLookupEntry() Unknown ntdll.dll!RtlpFindEntry() Unknown ntdll.dll!RtlpAllocateHeap() Unknown ntdll.dll!RtlpAllocateHeapInternal() Unknown riched20.dll!CTxtArray::AddBlock(long,long) Unknown riched20.dll!CTxtArray::SplitBlock(long,long,long,long,int) Unknown riched20.dll!CTxtPtr::InsertRange(long,unsigned short const *) Unknown riched20.dll!CRchTxtPtr::ReplaceRange(long,long,unsigned short const *,class IUndoBuilder *,long,long *,unsigned long) Unknown riched20.dll!CTxtRange::ReplaceRange(long,unsigned short const *,class IUndoBuilder *,enum SELRR,long *,unsigned long) Unknown riched20.dll!CTxtRange::CheckLimitReplaceRange(long,unsigned short const *,int,class IUndoBuilder *,unsigned long,long *,long,int,unsigned long) Unknown riched20.dll!CTxtRange::CleanseAndReplaceRange(long,unsigned short const *,int,class IUndoBuilder *,unsigned short *,long *,unsigned long) Unknown riched20.dll!CLightDTEngine::ReadPlainText(class CTxtRange *,struct _editstream *,int,class IUndoBuilder *,long) Unknown riched20.dll!CLightDTEngine::LoadFromEs(class CTxtRange *,long,struc

      V Offline
      V Offline
      Victor Nijegorodov
      wrote on last edited by
      #2

      I am curios, are you using the MFC code in a Managed C++/CLI application? :confused:

      F 1 Reply Last reply
      0
      • V Victor Nijegorodov

        I am curios, are you using the MFC code in a Managed C++/CLI application? :confused:

        F Offline
        F Offline
        ForNow
        wrote on last edited by
        #3

        I’m not apparently I posted in the wrong forum I meant to post in the MFC forum

        1 Reply Last reply
        0
        • F ForNow

          Hi I am getting a heap corruption. I am running under the visual studio debugger. and the exception is at

          Quote:

          ntdll.dll!RtlReportCriticalFailure() Unknown

          My scenario is I have a DLL reading and formatting data for a .exe. I keep a record count so when I get a exception, at

          Quote:

          ntdll.dll!RtlReportCriticalFailure() Unknown

          I insert code if (recordcount == 0x0000196e) __debugbreak; I then start stepping through the code looking for the problem how ever when stepping through the code works I try this multiple times however when I stop the code where the exception were to occur it always complete successfully The listing I am trying to to inset in the richedit is huge about 153 pages 30 lines to page, 134 bytes across I roughly calculate the number of bytes I am trying to insert into the richedit is 1.6 meg. I am not sure if the size is the issue I do a Rciheditctrl::LimitText with the amount bytes I need Again when break on the offending record and step thru the code it completes normally Here is the stack frame My code starts a the DriveRichedit.exe ntdll.dll!RtlReportCriticalFailure() Unknown ntdll.dll!RtlpHeapHandleError() Unknown ntdll.dll!RtlpHpHeapHandleError() Unknown ntdll.dll!RtlpLogHeapFailure() Unknown ntdll.dll!RtlpHeapFindListLookupEntry() Unknown ntdll.dll!RtlpFindEntry() Unknown ntdll.dll!RtlpAllocateHeap() Unknown ntdll.dll!RtlpAllocateHeapInternal() Unknown riched20.dll!CTxtArray::AddBlock(long,long) Unknown riched20.dll!CTxtArray::SplitBlock(long,long,long,long,int) Unknown riched20.dll!CTxtPtr::InsertRange(long,unsigned short const *) Unknown riched20.dll!CRchTxtPtr::ReplaceRange(long,long,unsigned short const *,class IUndoBuilder *,long,long *,unsigned long) Unknown riched20.dll!CTxtRange::ReplaceRange(long,unsigned short const *,class IUndoBuilder *,enum SELRR,long *,unsigned long) Unknown riched20.dll!CTxtRange::CheckLimitReplaceRange(long,unsigned short const *,int,class IUndoBuilder *,unsigned long,long *,long,int,unsigned long) Unknown riched20.dll!CTxtRange::CleanseAndReplaceRange(long,unsigned short const *,int,class IUndoBuilder *,unsigned short *,long *,unsigned long) Unknown riched20.dll!CLightDTEngine::ReadPlainText(class CTxtRange *,struct _editstream *,int,class IUndoBuilder *,long) Unknown riched20.dll!CLightDTEngine::LoadFromEs(class CTxtRange *,long,struc

          K Offline
          K Offline
          kdbueno
          wrote on last edited by
          #4

          stat thread does not collapse prominent threads such as concept of algorithmics and totality.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups