General information defined in the block separating debug information

It must be a Delphi bug ...

I have a unit that underlies my foundation for sustainability. In this block, I have a base class for all my domain objects, list class, and general list class.

More recently, I noticed that when I enter a block when debugging, execution will move to a point a little lower in the file than it should ... Maybe four or five lines. Reordering a file does not matter. The code will also generate access violations, but only when I debugged it.

I gave up trying to find the reason for this ... Several things occurred to me, for example, some injections of code with a debugger (for example, this logitec webcam driver error ), or debugging information is not synchronized with my source code (for example, dcu is extracted from some old source).

As a result, I activated the virtual machine with a clean installation of Windows + Delphi, grabbed only what I needed to test the device, and I created a small DUnit project to test it. Same problem.

Then I started removing things from the unit one at a time until it worked. The only thing that mattered was when I deleted the general list class.

Has anyone else seen this problem? Does anyone know how to get around this?

Thanks in advance,

N @

: , DCU.

+5
3

, , , , .

2011-08-03 :

, Domain TDomainObject - .

, Domain.Generics, .

:

unit Domain;

interface 

type
  TDomainObject = class
    //blah de blah
  end;

  TDomainObjectList = class (TDomainObject)
    //more stuff
  end;

  TDomainListEnumerator = class
    //etc
  end;

unit Domain.Generics;

interface

type

  TDomainObjectList<T: TDomainObject> = class (TDomainObjectList)
    //stuff
  public
    property Items[AIndex: integer]: T read GetItem write SetItem;

    type
      TEnumerator = class (TDomainListEnumerator)
      public
        function GetCurrent: T;
        property Current: T read GetCurrent;
      end;

  public
    function GetEnumerator: TEnumerator;

  end;
+2

, CR LF? CR LF, . - Notepad ++, TextPad .. , . [Windows] NotePad , .

+2

/ .

- .dcu , Delphi, . , .

-

0

All Articles