<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<title></title>
</head>
<body>
<p style="margin: 0px;"><span> </span></p>
<p style="margin: 0px;"> </p>
<div style="margin: 5px 0px 5px 0px;">
Luca Olivetti <luca@wetron.es> hat am 4. Mai 2011 um 13:44 geschrieben:<br/>
<br/>
> Lately I'm getting a bunch of those. I thought it was because I was<br/>
> using an old version of lazarus, but now I upgraded to 0.9.30 (self<br/>
> compiled from http:://svn.freepascal.org/svn/lazarus/tags_lazarus_0_9_30<br/>
> with fpc 2.4.2 under win32) and I got another strange one.<br/>
><br/>
> The exception, according to the stack trace, is in line 27 of monitor.inc:<br/>
><br/>
> function TMonitor.GetInfo(out Info: TMonitorInfo): Boolean;<br/>
> begin<br/>
> Info.cbSize := SizeOf(TMonitorInfo);<br/>
> Result := GetMonitorInfo(Handle, @Info); <<--here<br/>
> end;<br/>
><br/>
><br/>
> Called from here:<br/>
><br/>
> function TMonitor.GetBoundsRect: TRect;<br/>
> var<br/>
> Info: TMonitorInfo;<br/>
> begin<br/>
> if GetInfo(Info) then <<--here<br/>
> Result := Info.rcMonitor<br/>
> else<br/>
> Result := Rect(0, 0, 0, 0);<br/>
> end;<br/>
><br/>
> So I don't understand how an access violation is possible (unless<br/>
> windows doesn't look at the cbSize field and tries to access past its<br/>
> size). I suspect that the PC where the program is running has some<br/>
> problem (maybe a virus?), since I got another access violation on the<br/>
> same PC (actually I don't know, I didn't manage to get a stack trace,<br/>
> the main form just "vanished" after pressing a button, a different one<br/>
> than this time, and that prompted me to upgrade lazarus) but I'm worried.<br/>
><br/>
> Of course it isn't reproducible (it happened only once, inside a<br/>
> TOpendialog.Execute, I tried many many times after the access violation<br/>
> with no problem).<br/>
><br/>
> Any idea?
</div><br/>
Maybe a heap/stack corruption. Compile with many checks: -ghtl -Criot -Sa<br/>
The problem is probably in some package you installed.<br/>
<br/>
Mattias<br/>
<br/>
</body>
</html>