Toon posts:

Kylix 1,idTCPClient

Pagina: 1
Acties:

Verwijderd

Topicstarter
Hallo,

eerst een stukkie code:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
procedure TIrc.Create;
begin
  //Create TcpClient
  try
    Tcp:=TIdTCPClient.Create(IdComp);
    with Tcp do
    begin
    ASCIIFilter:=true;
    RecvBufferSize:= 32768;
    SendBufferSize:= 32768;
    with SocksInfo do
    begin
      Authentication:=saNoAuthentication;
      Version:=svNoSocks;
    end;
    UseNagle:=True;
    end;
  except
    MessageDlg('TCPError', 'Cannot create TCP Socket',mtError,[mbOK],1)
  end;
  //Set vars to default values
  sIRC_Nick:='SXNick';
  sIRC_Name:='SXName';
  sIRC_PWD:='';
  sIRC_HostName:='127.0.0.1';
  sIRC_SvrName:='127.0.0.1';
  sIRC_RealName:='SXRealName';
  if Tcp.Connected
  then IRCStatus:=stIRC_CONNECTED
  else IRCStatus:=stIRC_DISCONNECTED;
end;

op deze regel: Tcp:=TIdTCPClient.Create(IdComp);
krijg ik deze melding:
Project1 received signal sigsegv(11)

Wat moet ik hier aan doen zodat het probleem wordt opgelost?

  • Janoz
  • Registratie: Oktober 2000
  • Laatst online: 16:30

Janoz

Moderator Devschuur®

!litemod

Je kunt als eerste ff [code] en [/code] om je source heen zetten.. Dan krijg je vast wat sneller antwoord :)..

Deze foutmelding lijkt op een segmentation violation (je zit te messen in geheugen waar je eigenlijk niet bij mag), controleer ff of je niet toevallig met niet gedeclareerde vars of iets dergelijks bezig bent. Ik kan er helemaal naast zitten.. Werk zelf niet met delphi

Ken Thompson's famous line from V6 UNIX is equaly applicable to this post:
'You are not expected to understand this'


Verwijderd

ff zoeken met google :)
For example, dereferencing a NULL pointer in C will cause the application to core. (Die with a core dump.) However, under Kylix's debugger, one gets an exception dialog that says "Project Project1 received signal SIGSEGV (11). Process stopped. Use Step or Run to continue." This gets translated into the familiar "Access violation at address 080B3844, accessing address 0000000".
Maar geen idee waar dat gebeurd, waarschijnlijk in het component ofzo? Of is IdComp nil ofzo?