Recent

Author Topic: Virtual Breakpoint  (Read 2520 times)

abarchman

  • New Member
  • *
  • Posts: 11
Virtual Breakpoint
« on: December 20, 2017, 06:36:32 pm »
What would cause execution of a program to pause in the IDE as if there were a breakpoint set.  I am using the laz graphics unit in a port from delphi.  Here is the code part from "custombitmap.inc":

function TCustomBitmap.GetMaskHandle: HBITMAP;
begin
  MaskHandleNeeded;
  Result := FMaskHandle;
end;

When executing the code, execution stopped on the "Mask..." line.   So I commented it out.  Now it stops on the next line.  Then uncommented, it still stops on the "Result:=" line (same next line).  Now when it does stop, one can resume execution by pressing F9, or by using single stepping.  Yet there is NO breakpoint set in this function.  Is it possible that there is a BP set elsewhere and the system is being fooled?

The actual user source is stored on a SD card, with laz & FPC on the main SSD drive as well as all the "built-in" units.

To me this is strange behavior and I cannot explain it.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Virtual Breakpoint
« Reply #1 on: December 20, 2017, 06:44:50 pm »
2 things mainly
1) break points that are not shown but active open view\debug windows\BreakPoints(Ctrl+Alt+B) and remove all breakpoints there.
2) there is an int(3) call somewhere in the chain of execution that force the debugger to stop in the specified spot(less likely).
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Thaddy

  • Hero Member
  • *****
  • Posts: 18764
  • To Europe: simply sell USA bonds: dollar collapses
Re: Virtual Breakpoint
« Reply #2 on: December 20, 2017, 06:54:08 pm »
2) there is an int(3) call somewhere in the chain of execution that force the debugger to stop in the specified spot(less likely).
That is Intel only.
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

abarchman

  • New Member
  • *
  • Posts: 11
Re: Virtual Breakpoint
« Reply #3 on: December 21, 2017, 05:26:52 am »
Thank you for pointing out the breakpoint screen.  It was an active BP that was not shown.  Now it gives the error message of:

TCustomImageList.AddImages not implemented yet for other Width/Height.

Press OK to ignore and risk data corruption.
Press Cancel to kill the program.

Probably because being a delphi import referencing one if those unfinished properties.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Virtual Breakpoint
« Reply #4 on: December 21, 2017, 05:31:39 am »
Thank you for pointing out the breakpoint screen.  It was an active BP that was not shown.  Now it gives the error message of:

TCustomImageList.AddImages not implemented yet for other Width/Height.

Press OK to ignore and risk data corruption.
Press Cancel to kill the program.

Probably because being a delphi import referencing one if those unfinished properties.
that looks like a runtime error not a compile time one, which makes it easy to pin point, just find the raise exception call in the specified method to see what goes wrong or attach a sample application that shows the problem for us to take a look.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

abarchman

  • New Member
  • *
  • Posts: 11
Re: Virtual Breakpoint
« Reply #5 on: December 21, 2017, 05:53:47 am »
Yes it is a runtime error generated by a raise statement.  The original program (written by me in Delphi6) was originally using a component called DLBitmap, but seemed to lack some properties, thus I thought it might be easier to use the laz form of bitmap fixing any problem with properties.  The breakpoint was not allowing me to get to the real problems.  I will ask further questions if I get stuck again.

 

TinyPortal © 2005-2018