Problems with image1.canvas.pixels lazarus / 8-Other ---------------------------------------------------------------------- TTL · 2004-09-25 20:11 I get an error when I click on the button with the following code: procedure TForm1.Button3Click(Sender: TObject); begin image1.canvas.pixels[1,1] := 255; showmessage('Color: '+inttostr(image1.canvas.pixels[1,1])); end; image1 correctly displays a red dot on position x=1,y=1. But mostly (around nine of ten times) no message box with the color is displayed. Instead the program shows "Access violation." in an error dialog box. I have tried it with lazarus 0.9.1 and 0.9.2.1 the results are the same. I am using Debian with FPC 1.9.4. Is there a bug in Lazarus/FPC or is my code simply too bad? ---------------------------------------------------------------------- Lightning · 2004-09-27 11:08 It seems that TCanvas has bugs, try getting the latest Lazarus sources and if it doesn't work the latest FPC compiler, i think 1.9.4 isn't the latest. ---------------------------------------------------------------------- Anonymous · 2004-11-02 22:06 I have the same problem Fedora Core 2, lazarus 0.9.5 But in Win Xp, lazarus 0.9.5 is ok ---------------------------------------------------------------------- Spike · 2005-12-28 21:33 Lazarus 0.9.10, fpc 2.0.2, Fedora Core 4 This still isn't fixed. The write function of the Pixels property works, but the read one fails miserably. Is anyone going to fix this? ---------------------------------------------------------------------- felipemdc · 2005-12-28 21:44 Could you add a bug report here: http://www.lazarus.freepascal.org/mantis/main_page.php This will dramatically increase the chances that the bug is fixed soon. thanks, ---------------------------------------------------------------------- Spike · 2005-12-28 22:53 Oops, I've got that the other way around. Writing works, it's the reading that's the problem. I've reported the bug, if anyone cares, here's the link: http://www.lazarus.freepascal.org/mantis/view.php?id=1569