trident-job / delphi-code-coverage

Automatically exported from code.google.com/p/delphi-code-coverage
0 stars 0 forks source link

access violation at address 00000000. Read of address 00000000 delphi #49

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
any solution for this problem,
please can me for solution

Original issue reported on code.google.com by R.03.5mi...@gmail.com on 5 Oct 2012 at 4:01

Attachments:

GoogleCodeExporter commented 9 years ago
Could you provide more details how to reproduce it?

Original comment by e.kotlya...@gmail.com on 11 Oct 2012 at 4:24

GoogleCodeExporter commented 9 years ago
This complete program
procedure TForm1.SegmentasClick(Sender: TObject);
var
i, j, pixel, jumlah_pixel: integer;
garis : array [0..9] of integer;
begin
for i:=0 to (ImagePlat.Picture.Height-1) do
begin
  for j:=0 to (ImagePlat.Picture.Width-1) do
  begin
          jumlah_pixel := 0;
          pixel := 0;
        if garis [i-1]> 0 then
            imagePlat.Canvas.Pixels [j,i]:= clBlack
        else if imagePlat.Canvas.Pixels [j,i]= clBlack then
                 pixel := 1
              else
                 pixel := 0;
         jumlah_pixel := jumlah_pixel + pixel;
         garis [i] := jumlah_pixel;
  end;
end;
ImagePlat.Canvas.Refresh;

may have the solution
because I've learned delphi:-)

Original comment by R.03.5mi...@gmail.com on 13 Oct 2012 at 4:36

GoogleCodeExporter commented 9 years ago
COuld you provide both the compiled executable, test *.pas and command line you 
are using to reporduce this issue?

Thank you for using Delphi Code Coverage!

Original comment by linards....@gmail.com on 4 Dec 2012 at 9:41

GoogleCodeExporter commented 9 years ago
It is not seem to be related to code coverage.
But problem here is that garis array has indexes from 0 to 9 but is used with 
indexes from 0 to ImagePlat.Picture.Height - 1 so if Height > 10 it will crash. 
Another reason maybe that ImagePlat.Picture is not assigned 

Original comment by e.kotlya...@gmail.com on 27 Dec 2013 at 11:50