🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #34

Weird Problem with Indy 9.0.50

#34
From: Colin B Maharaj
Date: Thu, 28 Feb 2008 10:14
27 lines
1976 bytes
Hi all I wrote this little web server wrapped using IdTCPServer
But it crashes under this condition..

1. Create a Connection to the server that will take a while to finish
2. While that connection is up abort that connection and create a
new one - but let the 1st thread still be active.
3. Let the 2nd connection finish sending out it's data.
4. Later when the 1st thread tries to send out it's data, it will
probably do some memory overrunning. This happens if you use

// Note connection was aborted earlier...
AThread->Connection->WriteStream(stream);
delete stream; //  <-- Crashes here...

but not

AThread->Connection->WriteBuffer(stream->Memory, stream->Size);
delete stream;

Why? Oh Why are am I talking about Indy 9.x when we have heard it
a thousand times we are using Indy 10.x?

Well I still have to move to Indy 10.x but just in case this issue
has propagated into Indy 10 maybe you guys/gals can look into this.

Cheers!
Colin B Maharaj
Technical Details
Message-ID: <47c68994@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,d888cf9603e8fd76,start
X-Google-Attributes: gidfeeec,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Thu, 28 Feb 2008 06:14:42 -0400
From: Colin B Maharaj <noreply@myhost.com>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.web
Subject: Weird Problem with Indy 9.0.50
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080227-0, 02/27/2008), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 190.58.50.199
Message-ID: <47c68994@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1204193684 190.58.50.199 (28 Feb 2008 02:14:44 -0700)
Lines: 28
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
X-Original-Bytes: 1809