Article View: pl.comp.lang.pascal
Article #92787EAccessViolation : Access violation
From: notaras
Date: Sun, 25 Jan 2009 17:00
Date: Sun, 25 Jan 2009 17:00
64 lines
2376 bytes
2376 bytes
Kod:
program nos_text_mode;
uses
nos_types,crt,SysUtils;
var
f:file of TConfig; //plik z danymi
temp:TConfig; //zmienna pomocnicza
temp_boolean:boolean;
temp_char:char;
f2:longint;
BEGIN
if FileExists('config.dat') then
begin
assign(f, 'config.dat');
reset(f);
read(f,temp);
close(f);
writeln('dane konfiguracyjne pomyslnie wczytane');
writeln('aaaaaaaa');
end;
writeln('bbbbbbbb');
END.
Program daje ciekawe wyniki:
dane konfiguracyjne pomyslnie wczytane
aaaaaaaa
bbbbbbbb
An unhandled exception occurred at $08049761 :
EAccessViolation :
Access violation
$08049761
$080566B5
$080481C2 P$NOS_TEXT_MODE_finalize_implicit,
of nos_text_mode.pas
$080572B2
$08057485
nos_types zawiera:
TUser=record
id:string;
end;
TConfig=record
ftp_user:string;
ftp_pass:string;
upload_ip:string;
download_url:string;
user:TUser;
end;
Program kompiluje pod linuxem (ubuntu 8.10) poleceniem:
ppc386 -gl nos_text_mode.pas
Co zrobic aby program konczyl sie normalnie?
Technical Details
Message-ID:
<6c39f892-946c-47a0-b7a0-d0e30f3d72d5@z6g2000pre.googlegroups.com>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!z6g2000pre.googlegroups.com!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!z6g2000pre.googlegroups.com!not-for-mail From: notaras <ripper13@wp.pl> Newsgroups: pl.comp.lang.pascal Subject: EAccessViolation : Access violation Date: Sun, 25 Jan 2009 09:00:54 -0800 (PST) Organization: http://groups.google.com Lines: 64 Message-ID: <6c39f892-946c-47a0-b7a0-d0e30f3d72d5@z6g2000pre.googlegroups.com> NNTP-Posting-Host: 212.76.37.140 Mime-Version: 1.0 X-Trace: posting.google.com 1232902855 6151 127.0.0.1 (25 Jan 2009 17:00:55 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 25 Jan 2009 17:00:55 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z6g2000pre.googlegroups.com; posting-host=212.76.37.140; posting-account=DMV9SgoAAAA90iYikpCK-iNvn_vaY6pe User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9.0.5) Gecko/2008121622 Ubuntu/8.10 (intrepid) Firefox/3.0.5,gzip(gfe),gzip(gfe) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit