🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.socket
28 messages
28 total messages Started by JLoz Mon, 30 Jul 2007 20:08
Assertion Error while sending email
#973
Author: JLoz
Date: Mon, 30 Jul 2007 20:08
112 lines
4325 bytes
I compiled Indy 10.1.6 for BCB5 some time ago and got it to send emails 
witouth problems.

I have two development machines, so I copied all the bpl, lib and hpp files 
and installed indy in the other one.

In the previous application I put all the indy components in a data module 
and I copied this in another application to which I wanted to add the option 
of sending automated emails.

Now I get the folliwing error.

Assertion failed:
(C:\ProgramFiles\Borland\CBuilder5\Components\Indy10\Lib\System\IdGlobal.pas,
  line 2528)

There is a function in that line for my IdGlobal.pas file, which is:

function IndyLength(const ABuffer: String; const ALength: Integer = -1; 
const AIndex: Integer = 1): Integer;
begin
  Assert(AIndex >= 1);            <<<<------------------  Line 2528
  if ALength < 0 then begin
    Result := Length(ABuffer)-AIndex+1;
  end else begin
    Result := Min(Length(ABuffer)-AIndex+1, ALength);
  end;
end;

I do not understand why this works on one application and does not on 
another one.

This type of problem was reported by Markus Donath on 5/23/07, and it looks 
we both had similar problems compiling this as my compiler crashes doing the 
IdZLib.pas file.

I compiled Indy by modifying FULLC6.bat and I had to generate a header file 
containing the some extructures not included in BCB5.  The file looks as 
follows:

---------------------------------------------------------------------------------------
#ifndef __IDMISSINGSTRUCTS_FORBCB5_H__
#define __IDMISSINGSTRUCTS_FORBCB5_H__

//***********************************************************
//       THIS WAS ADDED IN ORDER TO USE INDYSOCKETS 10 AS
//       THESE STRUCTURES ARE NOT INCLUDED IN BCB5
//
//***********************************************************

#define _SS_MAXSIZE 128                  // Maximum size.
#define _SS_ALIGNSIZE (sizeof(__int64))  // Desired alignment.

/*
 * Definitions used for sockaddr_storage structure paddings design.
 */
#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof (short))
#define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof (short) + _SS_PAD1SIZE + 
_SS_ALIGNSIZE))


typedef struct sockaddr_storage {
  short ss_family;
  char __ss_pad1[_SS_PAD1SIZE];
  __int64 __ss_align;
  char __ss_pad2[_SS_PAD2SIZE];
} SOCKADDR_STORAGE,  *PSOCKADDR_STORAGE;

typedef struct _WSAMSG {
  LPSOCKADDR name;
  INT namelen;
  LPWSABUF lpBuffers;
  DWORD dwBufferCount;
  WSABUF Control;
  DWORD dwFlags;
} WSAMSG,  *PWSAMSG,  *LPWSAMSG;

typedef struct _WSACMSGHDR {
  SIZE_T  cmsg_len;
  INT  cmsg_level;
  INT  cmsg_type;
} WSACMSGHDR, *PWSACMSGHDR;

typedef WSACMSGHDR CMSGHDR, *PCMSGHDR;

typedef struct in6_addr {
  union {
    u_char Byte[16];
    u_short Word[8];
  } u;
} IN6_ADDR,  *PIN6_ADDR,  FAR *LPIN6_ADDR;

typedef struct ipv6_mreq {
  struct in6_addr ipv6mr_multiaddr;
  unsigned int ipv6mr_interface;
} IPV6_MREQ,  *PIPV6_MREQ;


#endif
---------------------------------------------------------------------------------------


After doing that Indy worked fine in the test application I wrote to send 
emails.

Is this a known bug?  Does anyone has had this problem? if so, what is the 
workaround?

Thanks beforehand


JLoz
Re: Assertion Error while sending email
#974
Author: JLoz
Date: Mon, 30 Jul 2007 22:05
134 lines
5019 bytes
I stepped through the code and put some watches on several properties of the 
IdMessage1 and I discovered this:

when I put a watch on the following property

IdMessage1->Recipients->EMailAddresses

I get this:

IdMessage1->Recipients->EMailAddresses: E2451 Undefined symbol '_fastcall 
Idemailaddress::TIdEMailAddressList::GetEMailAddresses()

I do not see that on the application that runs and I do not know what could 
be so different between the two to make one fail.


I appreciate any help.

"JLoz" <jfsierra@excite.com> wrote in message 
news:46ae4529$1@newsgroups.borland.com...
>I compiled Indy 10.1.6 for BCB5 some time ago and got it to send emails 
>witouth problems.
>
> I have two development machines, so I copied all the bpl, lib and hpp 
> files and installed indy in the other one.
>
> In the previous application I put all the indy components in a data module 
> and I copied this in another application to which I wanted to add the 
> option of sending automated emails.
>
> Now I get the folliwing error.
>
> Assertion failed:
> (C:\ProgramFiles\Borland\CBuilder5\Components\Indy10\Lib\System\IdGlobal.pas,
>  line 2528)
>
> There is a function in that line for my IdGlobal.pas file, which is:
>
> function IndyLength(const ABuffer: String; const ALength: Integer = -1; 
> const AIndex: Integer = 1): Integer;
> begin
>  Assert(AIndex >= 1);            <<<<------------------  Line 2528
>  if ALength < 0 then begin
>    Result := Length(ABuffer)-AIndex+1;
>  end else begin
>    Result := Min(Length(ABuffer)-AIndex+1, ALength);
>  end;
> end;
>
> I do not understand why this works on one application and does not on 
> another one.
>
> This type of problem was reported by Markus Donath on 5/23/07, and it 
> looks we both had similar problems compiling this as my compiler crashes 
> doing the IdZLib.pas file.
>
> I compiled Indy by modifying FULLC6.bat and I had to generate a header 
> file containing the some extructures not included in BCB5.  The file looks 
> as follows:
>
> ---------------------------------------------------------------------------------------
> #ifndef __IDMISSINGSTRUCTS_FORBCB5_H__
> #define __IDMISSINGSTRUCTS_FORBCB5_H__
>
> //***********************************************************
> //       THIS WAS ADDED IN ORDER TO USE INDYSOCKETS 10 AS
> //       THESE STRUCTURES ARE NOT INCLUDED IN BCB5
> //
> //***********************************************************
>
> #define _SS_MAXSIZE 128                  // Maximum size.
> #define _SS_ALIGNSIZE (sizeof(__int64))  // Desired alignment.
>
> /*
> * Definitions used for sockaddr_storage structure paddings design.
> */
> #define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof (short))
> #define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof (short) + _SS_PAD1SIZE + 
> _SS_ALIGNSIZE))
>
>
> typedef struct sockaddr_storage {
>  short ss_family;
>  char __ss_pad1[_SS_PAD1SIZE];
>  __int64 __ss_align;
>  char __ss_pad2[_SS_PAD2SIZE];
> } SOCKADDR_STORAGE,  *PSOCKADDR_STORAGE;
>
> typedef struct _WSAMSG {
>  LPSOCKADDR name;
>  INT namelen;
>  LPWSABUF lpBuffers;
>  DWORD dwBufferCount;
>  WSABUF Control;
>  DWORD dwFlags;
> } WSAMSG,  *PWSAMSG,  *LPWSAMSG;
>
> typedef struct _WSACMSGHDR {
>  SIZE_T  cmsg_len;
>  INT  cmsg_level;
>  INT  cmsg_type;
> } WSACMSGHDR, *PWSACMSGHDR;
>
> typedef WSACMSGHDR CMSGHDR, *PCMSGHDR;
>
> typedef struct in6_addr {
>  union {
>    u_char Byte[16];
>    u_short Word[8];
>  } u;
> } IN6_ADDR,  *PIN6_ADDR,  FAR *LPIN6_ADDR;
>
> typedef struct ipv6_mreq {
>  struct in6_addr ipv6mr_multiaddr;
>  unsigned int ipv6mr_interface;
> } IPV6_MREQ,  *PIPV6_MREQ;
>
>
> #endif
> ---------------------------------------------------------------------------------------
>
>
> After doing that Indy worked fine in the test application I wrote to send 
> emails.
>
> Is this a known bug?  Does anyone has had this problem? if so, what is the 
> workaround?
>
> Thanks beforehand
>
>
> JLoz
>
> 
Re: Assertion Error while sending email
#975
Author: JLoz
Date: Tue, 31 Jul 2007 17:38
132 lines
5072 bytes
I also forgot to mention that when I first tried to compile my new 
application I had a lot of errors which disappeared by adding two end 
comments "*/" to the wsnwlink.h file at lines 154, and 156.

After doing that I could compile the app but it does not work.

I am desperate here.  I had develop a test app to make sure I could send 
emails with indy 10 and BCB5, and not that I want to add that code to my 
project it does not work and I am at a halt.

Any help is highly appreciated.

Thanks,

JLoz

"JLoz" <jfsierra@excite.com> wrote in message 
news:46ae4529$1@newsgroups.borland.com...
>I compiled Indy 10.1.6 for BCB5 some time ago and got it to send emails 
>witouth problems.
>
> I have two development machines, so I copied all the bpl, lib and hpp 
> files and installed indy in the other one.
>
> In the previous application I put all the indy components in a data module 
> and I copied this in another application to which I wanted to add the 
> option of sending automated emails.
>
> Now I get the folliwing error.
>
> Assertion failed:
> (C:\ProgramFiles\Borland\CBuilder5\Components\Indy10\Lib\System\IdGlobal.pas,
>  line 2528)
>
> There is a function in that line for my IdGlobal.pas file, which is:
>
> function IndyLength(const ABuffer: String; const ALength: Integer = -1; 
> const AIndex: Integer = 1): Integer;
> begin
>  Assert(AIndex >= 1);            <<<<------------------  Line 2528
>  if ALength < 0 then begin
>    Result := Length(ABuffer)-AIndex+1;
>  end else begin
>    Result := Min(Length(ABuffer)-AIndex+1, ALength);
>  end;
> end;
>
> I do not understand why this works on one application and does not on 
> another one.
>
> This type of problem was reported by Markus Donath on 5/23/07, and it 
> looks we both had similar problems compiling this as my compiler crashes 
> doing the IdZLib.pas file.
>
> I compiled Indy by modifying FULLC6.bat and I had to generate a header 
> file containing the some extructures not included in BCB5.  The file looks 
> as follows:
>
> ---------------------------------------------------------------------------------------
> #ifndef __IDMISSINGSTRUCTS_FORBCB5_H__
> #define __IDMISSINGSTRUCTS_FORBCB5_H__
>
> //***********************************************************
> //       THIS WAS ADDED IN ORDER TO USE INDYSOCKETS 10 AS
> //       THESE STRUCTURES ARE NOT INCLUDED IN BCB5
> //
> //***********************************************************
>
> #define _SS_MAXSIZE 128                  // Maximum size.
> #define _SS_ALIGNSIZE (sizeof(__int64))  // Desired alignment.
>
> /*
> * Definitions used for sockaddr_storage structure paddings design.
> */
> #define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof (short))
> #define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof (short) + _SS_PAD1SIZE + 
> _SS_ALIGNSIZE))
>
>
> typedef struct sockaddr_storage {
>  short ss_family;
>  char __ss_pad1[_SS_PAD1SIZE];
>  __int64 __ss_align;
>  char __ss_pad2[_SS_PAD2SIZE];
> } SOCKADDR_STORAGE,  *PSOCKADDR_STORAGE;
>
> typedef struct _WSAMSG {
>  LPSOCKADDR name;
>  INT namelen;
>  LPWSABUF lpBuffers;
>  DWORD dwBufferCount;
>  WSABUF Control;
>  DWORD dwFlags;
> } WSAMSG,  *PWSAMSG,  *LPWSAMSG;
>
> typedef struct _WSACMSGHDR {
>  SIZE_T  cmsg_len;
>  INT  cmsg_level;
>  INT  cmsg_type;
> } WSACMSGHDR, *PWSACMSGHDR;
>
> typedef WSACMSGHDR CMSGHDR, *PCMSGHDR;
>
> typedef struct in6_addr {
>  union {
>    u_char Byte[16];
>    u_short Word[8];
>  } u;
> } IN6_ADDR,  *PIN6_ADDR,  FAR *LPIN6_ADDR;
>
> typedef struct ipv6_mreq {
>  struct in6_addr ipv6mr_multiaddr;
>  unsigned int ipv6mr_interface;
> } IPV6_MREQ,  *PIPV6_MREQ;
>
>
> #endif
> ---------------------------------------------------------------------------------------
>
>
> After doing that Indy worked fine in the test application I wrote to send 
> emails.
>
> Is this a known bug?  Does anyone has had this problem? if so, what is the 
> workaround?
>
> Thanks beforehand
>
>
> JLoz
>
> 
Re: Assertion Error while sending email
#976
Author: Bob Gonder
Date: Tue, 31 Jul 2007 17:56
13 lines
1488 bytes
JLoz wrote:

>I also forgot to mention that when I first tried to compile my new 
>application I had a lot of errors which disappeared by adding two end 
>comments "*/" to the wsnwlink.h file at lines 154, and 156.

You probably have "Enable Nested Comments" turned On.
(Options/C++/Source)

Try turning it off.
Those 2 lines, as written, I think don't complain if this option is Off.

There might be other header issues that get created by this option?
Re: Assertion Error while sending email
#977
Author: JLoz
Date: Tue, 31 Jul 2007 18:28
27 lines
1919 bytes
"Bob Gonder" <notbg@notmindspring.invalid> wrote in message 
news:3mtua39vadcc2de0p2ertm0fl224sevvu7@4ax.com...
> JLoz wrote:
>
>>I also forgot to mention that when I first tried to compile my new
>>application I had a lot of errors which disappeared by adding two end
>>comments "*/" to the wsnwlink.h file at lines 154, and 156.
>
> You probably have "Enable Nested Comments" turned On.
> (Options/C++/Source)

This option was in fact turned on.  Now I can compile and I do not get the 
assertion error anymore.  However, I get an error "Unable to decode 
response" when trying to send the email.

Thanks for your help!!


>
> Try turning it off.
> Those 2 lines, as written, I think don't complain if this option is Off.
>
> There might be other header issues that get created by this option?
>
>
> 
Re: Assertion Error while sending email
#978
Author: JLoz
Date: Tue, 31 Jul 2007 18:38
88 lines
3974 bytes
I was wrong.  It is still giving me the assertion error.  the code is below.

Think of "Header" as an INI file

void __fastcall TEmail::SendEmail2(TIniTable& Header) {
  int Count;
  dstring j,err;

  IdSMTP1->Host = Header["Host"];
  IdSMTP1->Port = Header["Port"].as_int();

  if( Header["Encripted"].as_int() ){
    IdSMTP1->IOHandler = IdSSLIOHandlerSocketOpenSSL1;
    IdSSLIOHandlerSocketOpenSSL1->PassThrough = true;
    IdSMTP1->UseTLS = utUseExplicitTLS;
    if( Header["EncriptionMethod"] == "TLSv1" ) {
      IdSSLIOHandlerSocketOpenSSL1->SSLOptions->Method = sslvTLSv1;
    } else if( Header["EncriptionMethod"] == "SSLv2" ) {
      IdSSLIOHandlerSocketOpenSSL1->SSLOptions->Method = sslvSSLv2;
    } else if( Header["EncriptionMethod"] == "SSLv23" ) {
      IdSSLIOHandlerSocketOpenSSL1->SSLOptions->Method = sslvSSLv23;
    } else if( Header["EncriptionMethod"] == "SSLv3" ) {
      IdSSLIOHandlerSocketOpenSSL1->SSLOptions->Method = sslvSSLv3;
    }
  } else {
    IdSMTP1->UseTLS = utNoTLSSupport;
    IdSMTP1->IOHandler = NULL;
  }
  if( Header["Authenticate"].as_int() ) {
    IdSMTP1->AuthType = Idsmtp::atSASL;
    IdUserPassProvider1->Username = Header["UserName"];
    IdUserPassProvider1->Password = Header["Password"];
    IdSMTP1->Username =  Header["UserName"];
    IdSMTP1->Password = Header["Password"];
  } else {
    IdSMTP1->AuthType = Idsmtp::atNone;
  }

  IdMessage1->Clear();
  IdMessage1->From->Address = Header["From"];
  IdMessage1->Recipients->EMailAddresses = AnsiString(Header["To"]);
  IdMessage1->Subject = Header["Subject"];

  Header.SetSection("$");
  if( Header["Attachments"].as_int() ) {
    Header.SetSection("Body");
    Count = Header["NoOfLines"].as_int();

    TIdText *pText = new TIdText(IdMessage1->MessageParts, NULL);
    pText->ContentType = "text/plain";

    for(int i = 1; i <= Count; ++i) {
      pText->Body->Add(Header[dstring(i)]);
    }
    Header.SetSection("AttachmentList");
    Count = Header["NoOfFiles"].as_int();
    for(int i = 1; i <= Count; ++i) {
      new TIdAttachmentFile(IdMessage1->MessageParts,Header[dstring(i)]);
    }
    IdMessage1->ContentType = "multipart/mixed";
  } else {
    Header.SetSection("Body");
    Count = Header["NoOfLines"].as_int();
    for(int i = 1; i <= Count; ++i) {
     IdMessage1->Body->Add(Header[dstring(i)]);
    }
    IdMessage1->ContentType = "text/plain";
  }

  Header.SetSection("$");
  try {
    IdSMTP1->Connect();
    try {
      IdSMTP1->Send(IdMessage1);
    } __finally {
      IdSMTP1->Disconnect(true);
    }
    Header.Set("Result", "1");
  } catch (const Exception& E) {
    if (!UpperCase(E.Message).Pos("RANGE CHECK ERROR")) {
      err = E.Message;
      Header.Set("Error", E.Message);
      Header.Set("Result", "0");
    }
  }
  IdMessage1->Clear();
  if(err != "") throw Exception(AnsiString(err));
} 
Re: Assertion Error while sending email
#979
Author: Remy Lebeau (TeamB)
Date: Tue, 31 Jul 2007 18:46
12 lines
1274 bytes
"JLoz" <jfsierra@excite.com> wrote in message
news:46af7f59$1@newsgroups.borland.com...

> I get an error "Unable to decode response" when
> trying to send the email.

That is not an Indy error message.  And there is no decoding occuring when
*sending* a message.  What is the EXACT error message?


Gambit
Re: Assertion Error while sending email
#980
Author: JLoz
Date: Tue, 31 Jul 2007 19:00
33 lines
1952 bytes
The error says

"Cannot decode Response 34sm448984uga"

However, this is not consistent.  Most of the time I still get the error:

Assertion failed:
(C:\ProgramFiles\Borland\CBuilder5\Components\Indy10\Lib\System\IdGlobal.pas,
  line 2528)

I tried to use IdLogFile but it's not creating the file for some reason.

Thanks,

JLoz


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:46af83cc$1@newsgroups.borland.com...
>
> "JLoz" <jfsierra@excite.com> wrote in message
> news:46af7f59$1@newsgroups.borland.com...
>
>> I get an error "Unable to decode response" when
>> trying to send the email.
>
> That is not an Indy error message.  And there is no decoding occuring when
> *sending* a message.  What is the EXACT error message?
>
>
> Gambit
>
> 
Re: Assertion Error while sending email
#981
Author: JLoz
Date: Tue, 31 Jul 2007 21:14
22 lines
1550 bytes
Any more ideas?

What can I try?

Thanks,

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:46af83cc$1@newsgroups.borland.com...
>
> "JLoz" <jfsierra@excite.com> wrote in message
> news:46af7f59$1@newsgroups.borland.com...
>
>> I get an error "Unable to decode response" when
>> trying to send the email.
>
> That is not an Indy error message.  And there is no decoding occuring when
> *sending* a message.  What is the EXACT error message?
>
>
> Gambit
>
> 
Re: Assertion Error while sending email
#982
Author: Remy Lebeau (TeamB)
Date: Tue, 31 Jul 2007 21:18
21 lines
1796 bytes
"JLoz" <jfsierra@excite.com> wrote in message
news:46af86e7@newsgroups.borland.com...

> The error says
>
> "Cannot decode Response 34sm448984uga"

Like I said, that is not an Indy error message.  What is the class name of
the exception that is being raised?  If it is an EIdReplyError (or
descendant), then the error message is coming from the SMTP server itself.

> Most of the time I still get the error:

That is not very helpful without knowing where that function is being called
from in the first place.  There are half a dozen files that use that
function.  Can you get a stack trace when the error occurs?  There are
plenty of third-party tools available for that.


Gambit
Re: Assertion Error while sending email
#983
Author: Remy Lebeau (TeamB)
Date: Tue, 31 Jul 2007 21:23
14 lines
1445 bytes
"JLoz" <jfsierra@excite.com> wrote in message
news:46ae4529$1@newsgroups.borland.com...

>   Assert(AIndex >= 1);            <<<<------------------  Line 2528

For that assertion to be triggered, IndyLength(String) would have to be
called with an AIndex parameter that is less than 1.  Looking at the current
Indy source code, there is not a single call to IndyLength(String) anywhere
that passes a value to the AIndex parameter, so it has to always be the
default value of 1, which will not trigger the assertion.


Gambit
Re: Assertion Error while sending email
#984
Author: JLoz
Date: Tue, 31 Jul 2007 22:00
11 lines
1437 bytes
Can you get a stack trace when the error occurs?  There are
> plenty of third-party tools available for that.
>
Is there one you recommend?

Is the current version of Indy still 10.1.6?

>
> Gambit
>
> 
Re: Assertion Error while sending email
#835
Author: Remy Lebeau (TeamB)
Date: Tue, 31 Jul 2007 22:55
19 lines
1871 bytes
"JLoz" <jfsierra@excite.com> wrote in message
news:46afb0f1$1@newsgroups.borland.com...

> Is there one you recommend?

MadExcept (http://www.madexcept.com) is popular choice, but there are others
available as well.  Just look around.

> Is the current version of Indy still 10.1.6?

Yes, but not for much longer.  We're going to increment the build number in
the next release coming soon.  There have been too many changes in Indy that
have been labeled as 10.1.6 so it makes troubleshooting a little difficult
as different people have different copies of 10.1.6 from different download
dates.


Gambit
Re: Assertion Error while sending email
#836
Author: JLoz
Date: Wed, 01 Aug 2007 22:54
161 lines
7945 bytes
Gambit,

Below is the stack trace you asked for.  The "Cannot decode Response" error 
occurs after the fact as I have a try finally around this and it happens 
when I try to disconnect by using this code

try {
   // try {
      IdSMTP1->Connect();
      IdSMTP1->Send(IdMessage1);
    } catch (const Sysutils::Exception& E) {
      if (!UpperCase(E.Message).Pos("RANGE CHECK ERROR")) {
        err = E.Message;
        Header.Set("Error", E.Message);
        Header.Set("Result", "0");
      }
    }
  } __finally {
    if(IdSMTP1->Connected()) IdSMTP1->Disconnect(true);
  }
  IdMessage1->Clear();
  if(err != "") throw Sysutils::Exception(AnsiString(err));


**********  STACK TRACE GOTTEN WITH MADEXCEPT  **********

date/time         : 2007-08-01, 18:46:14, 773ms
computer name     : JLoz
user name         : JLoz <admin>
registered owner  : Home
operating system  : Windows XP Service Pack 2 build 2600
system language   : English
system up time    : 2 hours 5 minutes
program up time   : 28 seconds
processors        : 2x Intel(R) Pentium(R) D CPU 3.00GHz
physical memory   : 1369/2046 MB (free/total)
free disk space   : (C:) 105.31 GB
display mode      : 1280x1024, 32 bit
process id        : $530
allocated memory  : 17.18 MB
executable        : TB.exe
exec. date/time   : 2007-08-01 18:45
bde version       : 5.1.1.1
compiled with     : BCB5
madExcept version : 3.0e
contact name      : JLoz
contact email     : jfsierra@excite.com
callstack crc     : $09df8dc9, $b8797d6b, $b8797d6b
exception number  : 1
exception class   : EAssertionFailed
exception message : Assertion failure 
(C:\Libraries\Indy\Lib\System\IdGlobal.pas, line 2528).

main thread ($f4c):
004f624d +0029 TB.exe IdGlobal         2529  +2 IndyLength
004fdb41 +0039 TB.exe IdStreamVCL        86  +4 TIdStreamHelperVCL.Write
004f76e5 +0045 TB.exe IdGlobal         2913  +2 WriteStringToStream
004a3da9 +0031 TB.exe IdCoder                   TIdEncoder.Encode
004e71f1 +0109 TB.exe IdSASLCollection          _16406
004e7529 +0135 TB.exe IdSASLCollection          TIdSASLEntries.LoginSASL
004e8cac +01e4 TB.exe IdSMTP                    TIdSMTP.Authenticate
004e8fb6 +000e TB.exe IdSMTP                    TIdSMTP.Send
00431d81 +1001 TB.exe Indy10Email.cpp   211 +72 TEmail.SendEmail2
00427b7c +04e4 TB.exe MainForm.cpp      972 +16 TForm1.EnviarEmail
00427c8d +00a1 TB.exe MainForm.cpp      981  +3 
TForm1.btnConfEnviarEmailClick
005a72bb +0083 TB.exe Controls         4288  +9 TControl.Click
00569c7b +002f TB.exe StdCtrls         2885  +3 TButton.Click
005ca248 +008c TB.exe buttons          1346 +17 TBitBtn.Click
00569de2 +001e TB.exe StdCtrls         2937  +1 TButton.CNCommand
005a7093 +0167 TB.exe Controls         4227 +37 TControl.WndProc
005aa686 +0216 TB.exe Controls         5731 +47 TWinControl.WndProc
00569bc6 +0086 TB.exe StdCtrls         2865 +13 TButtonControl.WndProc
005a6e16 +0036 TB.exe Controls         4152  +5 TControl.Perform
005aa830 +003c TB.exe Controls         5774  +6 DoControlMsg
005aae65 +0015 TB.exe Controls         5950  +1 TWinControl.WMCommand
005a7093 +0167 TB.exe Controls         4227 +37 TControl.WndProc
005aa686 +0216 TB.exe Controls         5731 +47 TWinControl.WndProc
005aa1d0 +0034 TB.exe Controls         5612  +3 TWinControl.MainWndProc
0058d360 +0014 TB.exe Forms            1459  +8 StdWndProc
7e41b8fe +0044 USER32.dll                                 SendMessageW
7e41f658 +0016 USER32.dll                                 CallWindowProcA
005aa7b4 +0124 TB.exe Controls         5755 +20 TWinControl.DefaultHandler
005a774d +0015 TB.exe Controls         4410  +1 TControl.WMLButtonUp
005a7093 +0167 TB.exe Controls         4227 +37 TControl.WndProc
005aa686 +0216 TB.exe Controls         5731 +47 TWinControl.WndProc
00569bc6 +0086 TB.exe StdCtrls         2865 +13 TButtonControl.WndProc
005aa1d0 +0034 TB.exe Controls         5612  +3 TWinControl.MainWndProc
0058d360 +0014 TB.exe Forms            1459  +8 StdWndProc
7e4196c2 +000a USER32.dll                                 DispatchMessageA
005984c4 +00ac TB.exe Forms            6630 +13 TApplication.ProcessMessage
0059850b +000f TB.exe Forms            6649  +1 TApplication.HandleMessage
00598791 +0091 TB.exe Forms            6732 +15 TApplication.Run
0040139c +00dc TB.exe TB.cpp   34 +13 WinMain
7c910942 +0025 ntdll.dll                                  RtlAcquirePebLock
7c91096d +000c ntdll.dll                                  RtlReleasePebLock
005e454c +014c TB.exe                           __startup

thread $208 (TDirWatchThread): <priority:1>
7c90eb94 +000 ntdll.dll                         KiFastSystemCallRet
7c90e9a9 +00a ntdll.dll                         NtWaitForMultipleObjects
7c8094dc +000 kernel32.dll                      WaitForMultipleObjectsEx
7c80a070 +013 kernel32.dll                      WaitForMultipleObjects
00517442 +036 TB.exe TDirChangeButton WaitForWatch
005177a7 +21b TB.exe TDirWatchThread  Execute
00482dff +02b TB.exe Madexcept        _17173
004b3158 +01c TB.exe Classes          _16999
004bfc20 +028 TB.exe System           _16624
00482ce1 +00d TB.exe Madexcept        _17171
00482d4b +037 TB.exe Madexcept        _17172
>> created by main thread ($f4c) at:
005174f6 +032 TB.exe                  TDirWatchThread.Create

thread $d24: <priority:1>
7c90eb94 +00 ntdll.dll                  KiFastSystemCallRet
7c90e319 +0a ntdll.dll                  NtRemoveIoCompletion
00482ce1 +0d TB.exe Madexcept _17171
00482d4b +37 TB.exe Madexcept _17172
>> created by main thread ($f4c) at:
71a5dbb3 +00 mswsock.dll

thread $78:
7c90eb94 +0 ntdll.dll  KiFastSystemCallRet
7c90d85a +a ntdll.dll  NtDelayExecution

thread $f28:
7c90eb94 +0 ntdll.dll  KiFastSystemCallRet
7c90e319 +a ntdll.dll  NtRemoveIoCompletion

thread $ff0:
7c90eb94 +00 ntdll.dll                  KiFastSystemCallRet
7c90e9a9 +0a ntdll.dll                  NtWaitForMultipleObjects
7c8094dc +00 kernel32.dll               WaitForMultipleObjectsEx
00482ce1 +0d TB.exe Madexcept _17171
00482d4b +37 TB.exe Madexcept _17172
>> created by main thread ($f4c) at:
77dfa17c +00 ADVAPI32.dll

thread $23c:
7c90eb94 +0 ntdll.dll  KiFastSystemCallRet
7c90e319 +a ntdll.dll  NtRemoveIoCompletion

Thanks again



"JLoz" <jfsierra@excite.com> wrote in message 
news:46afb0f1$1@newsgroups.borland.com...
> Can you get a stack trace when the error occurs?  There are
>> plenty of third-party tools available for that.
>>
> Is there one you recommend?
>
> Is the current version of Indy still 10.1.6?
>
>>
>> Gambit
>>
>>
>
> 
Re: Assertion Error while sending email
#837
Author: JLoz
Date: Wed, 01 Aug 2007 23:01
25 lines
1876 bytes
>> Is the current version of Indy still 10.1.6?
>
> Yes, but not for much longer.  We're going to increment the build number 
> in
> the next release coming soon.  There have been too many changes in Indy 
> that
> have been labeled as 10.1.6 so it makes troubleshooting a little difficult
> as different people have different copies of 10.1.6 from different 
> download
> dates.

Would it be possible for you to repair the FULLC5.bat file for this new 
release?  That would be very helpul.

Just asking.

Thanks again,

JLoz

>
>
> Gambit
>
> 
Re: Assertion Error while sending email
#838
Author: Remy Lebeau (TeamB)
Date: Thu, 02 Aug 2007 17:36
11 lines
1423 bytes
"JLoz" <jfsierra@excite.com> wrote in message
news:46b110c0$1@newsgroups.borland.com...

> Would it be possible for you to repair the FULLC5.bat file
> for this new release?  That would be very helpul.

What is wrong with it to begin with?


Gambit
Re: Assertion Error while sending email
#839
Author: Remy Lebeau (TeamB)
Date: Thu, 02 Aug 2007 18:40
99 lines
3925 bytes
"JLoz" <jfsierra@excite.com> wrote in message
news:46b10f2b$1@newsgroups.borland.com...

> Below is the stack trace you asked for.

That stack trace is showing a completely different error than the one you
have been describing.

> The "Cannot decode Response" error occurs after the fact
> as I have a try finally around this and it happens when I try
> to disconnect by using this code

Based on what the stack trace shows, what appears to be happening is that
the code is crashing while sending a login command to the server, so there
is likely unprocessed data from the server being left in the connection's
InputBuffer, such that when you call Disconnect() later, it sends a QUIT
command to the server and then ends up reading the unprocessed data from the
earlier command and fails.

>       if (!UpperCase(E.Message).Pos("RANGE CHECK ERROR")) {

That is not the best way to check for a specific exception type.  You should
be checking for the ERangeError class specifically instead, ie:

    catch (const Sysutils::ERangeError& E)
    {
        // why do you ignore this type of error?
    }
    catch (const Sysutils::Exception& E)
    {
        err = E.Message;
        Header.Set("Error", E.Message);
        Header.Set("Result", "0");
    }

Or:

    catch (const Sysutils::Exception& E)
    {
        if( dynamic_cast<const ERangeError*>(&E) == NULL )
        {
            err = E.Message;
            Header.Set("Error", E.Message);
            Header.Set("Result", "0");
        }
    }

Or:

    catch (const Sysutils::Exception& E)
    {
        if( !E.InheritsFrom(__classid(ERangeError)) )
        {
            err = E.Message;
            Header.Set("Error", E.Message);
            Header.Set("Result", "0");
        }
    }


>   if(err != "") throw Sysutils::Exception(AnsiString(err));

You should be re-throwing the original exception, not creating a new one.
You lose the original error information that way.

Try something more like this code instead:

    try
    {
        IdSMTP1->Connect();
        try
        {
            IdSMTP1->Send(IdMessage1);
        }
        __finally
        {
            IdMessage1->Clear();
            IdSMTP1->Disconnect();
        }
    }
    catch (const Sysutils::ERangeError & E)
    {
        // ignore ...
    }
    catch (const Sysutils::Exception& E)
    {
        Header.Set("Error", E.Message);
        Header.Set("Result", "0");
        throw;
    }

As for the actual cause of the original error, that is something that will
have to be looked into more deeply.  Since Indy 10 is currently undergoing a
major code review right now, the issue may have already been addressed for
the next release.


Gambit
Re: Assertion Error while sending email
#840
Author: JLoz
Date: Thu, 02 Aug 2007 18:43
29 lines
2254 bytes
>> Would it be possible for you to repair the FULLC5.bat file
>> for this new release?  That would be very helpul.
>
> What is wrong with it to begin with?
>
The FULLC5.bat file does not work for Indy 10.1.6.

I tried two workarounds:  1st) I manually generated the bpk files by 
comparing with the dbk that were available.  I compiles to a point and then 
crashes when compiling IdZlib.pas.  Then, I dissable the debug options and 
got it to compile but the components did not work as I was never able to 
send an email.

2nd)  I modified FULLC6.bat, and it still gives me errors doing the 
IdZlib.pas, but I am able to continue and get all the bpl and bpi files 
needed.  I installed it and I was able to write a test application and send 
emails with attachments.  Then, the same code on a different application 
would not work.

Were you able to take a look at the stack trace that I posted yesterday?

Thanks again for all your help,

JLoz

>
> Gambit
>
> 
Re: Assertion Error while sending email
#841
Author: JLoz
Date: Thu, 02 Aug 2007 18:46
14 lines
1599 bytes
> As for the actual cause of the original error, that is something that will
> have to be looked into more deeply.  Since Indy 10 is currently undergoing 
> a
> major code review right now, the issue may have already been addressed for
> the next release.
>
How soon are you guys planning on releasing this new version?

JLoz

>
> Gambit
>
> 
Re: Assertion Error while sending email
#842
Author: JLoz
Date: Thu, 02 Aug 2007 18:51
24 lines
2031 bytes
>
>>       if (!UpperCase(E.Message).Pos("RANGE CHECK ERROR")) {
>
> That is not the best way to check for a specific exception type.  You 
> should
> be checking for the ERangeError class specifically instead, ie:
>
>    catch (const Sysutils::ERangeError& E)
>    {
>        // why do you ignore this type of error?
I am ignoring the error because I starting getting it with my test 
application, but the emails were still being sent.  I posted the question on 
7/18 but I never got an answer on this, so I decided to ignore it for now 
while I understand this error and/or find out about a way to prevent it.


>    }
>    catch (const Sysutils::Exception& E)
>    {
>        err = E.Message;
>        Header.Set("Error", E.Message);
>        Header.Set("Result", "0");
>    }
>
Re: Assertion Error while sending email
#844
Author: Remy Lebeau (TeamB)
Date: Thu, 02 Aug 2007 20:42
10 lines
1427 bytes
"JLoz" <jfsierra@excite.com> wrote in message
news:46b225c1$1@newsgroups.borland.com...

> The FULLC5.bat file does not work for Indy 10.1.6.

You need to be more specific.


Gambit
Re: Assertion Error while sending email
#845
Author: Remy Lebeau (TeamB)
Date: Thu, 02 Aug 2007 20:43
10 lines
1395 bytes
"JLoz" <jfsierra@excite.com> wrote in message
news:46b2269f@newsgroups.borland.com...

> How soon are you guys planning on releasing this new version?

Within the next few weeks.


Gambit
Re: Assertion Error while sending email
#847
Author: JLoz
Date: Thu, 02 Aug 2007 21:15
304 lines
9651 bytes
>> The FULLC5.bat file does not work for Indy 10.1.6.
>
> You need to be more specific.

I run the batch file and no BPL or BPI files are generated.

This is what the command prompt displays.  I removed the Clean.bat file as I 
ran it once and I had to reinstall BCB5 afterwards.  Therefore, you will see 
errors regarding that.  I manually compiled the computil.dpr and lspfix.dpr. 
What are those for by the way?

The path would look like this

...indy\lib\Fullc5.bat.


Here it goes....



'clean.bat' is not recognized as an internal or external command,
operable program or batch file.
'clean.bat' is not recognized as an internal or external command,
operable program or batch file.
Core\IdAbout.pas
Core\IdAboutDotNET.pas
Core\IdAboutVCL.pas
Core\IdAntiFreeze.pas
Core\IdAssignedNumbers.pas
Core\IdBuffer.pas
Core\IdCmdTCPClient.pas
Core\IdCmdTCPServer.pas
Core\IdCommandHandlers.pas
Core\IdContext.pas
Core\IdCoreDsnRegister.pas
Core\IdCustomTCPServer.pas
Core\IdCustomTransparentProxy.pas
Core\IdDsnBaseCmpEdt.pas
Core\IdDsnCoreResourceStrings.pas
Core\IdDsnPropEdBinding.pas
Core\IdDsnPropEdBindingNET.pas
Core\IdDsnPropEdBindingVCL.pas
Core\IdExceptionCore.pas
Core\IdGlobalCore.pas
Core\IdIcmpClient.pas
Core\IdIntercept.pas
Core\IdInterceptSimLog.pas
Core\IdInterceptThrottler.pas
Core\IdIOHandler.pas
Core\IdIOHandlerSocket.pas
Core\IdIOHandlerStack.pas
Core\IdIOHandlerStream.pas
Core\IdIPAddress.pas
Core\IdIPMCastBase.pas
Core\IdIPMCastClient.pas
Core\IdIPMCastServer.pas
Core\IdLogBase.pas
Core\IdLogDebug.pas
Core\IdLogEvent.pas
Core\IdLogFile.pas
Core\IdLogStream.pas
Core\IdRawBase.pas
Core\IdRawClient.pas
Core\IdRawFunctions.pas
Core\IdRawHeaders.pas
Core\IdRegisterCore.pas
Core\IdReply.pas
Core\IdReplyRFC.pas
Core\IdResourceStringsCore.pas
Core\IdScheduler.pas
Core\IdSchedulerOfThread.pas
Core\IdSchedulerOfThreadDefault.pas
Core\IdSchedulerOfThreadPool.pas
Core\IdServerIOHandler.pas
Core\IdServerIOHandlerSocket.pas
Core\IdServerIOHandlerStack.pas
Core\IdSimpleServer.pas
Core\IdSocketHandle.pas
Core\IdSocks.pas
Core\IdSync.pas
Core\IdTask.pas
Core\IdTCPClient.pas
Core\IdTCPConnection.pas
Core\IdTCPServer.pas
Core\IdTCPStream.pas
Core\IdThread.pas
Core\IdThreadComponent.pas
Core\IdThreadSafe.pas
Core\IdTraceRoute.pas
Core\IdUDPBase.pas
Core\IdUDPClient.pas
Core\IdUDPServer.pas
Core\IdYarn.pas
       69 file(s) copied.
Core\dclindycorek3.dpkl
Core\dclIndyCore100.dpk
Core\dclIndyCore100Net.dpk
Core\dclIndyCore110Net.dpk
Core\dclIndyCore50.dpk
Core\dclIndyCore60.dpk
Core\dclIndyCore70.dpk
Core\dclIndyCore90.dpk
Core\dclIndyCore90Net.dpk
Core\dclindycorek3.dpk
Core\IndyCore100.dpk
Core\IndyCore100Net.dpk
Core\IndyCore110Net.dpk
Core\IndyCore50.dpk
Core\IndyCore60.dpk
Core\IndyCore70.dpk
Core\IndyCore90.dpk
Core\IndyCore90Net.dpk
Core\IndyCoreK3.dpk
       19 file(s) copied.
Core\dclIndyCore50.obj
Core\IdAbout.obj
Core\IdAboutVCL.obj
Core\IdAntiFreeze.obj
Core\IdAssignedNumbers.obj
Core\IdBuffer.obj
Core\IdCmdTCPClient.obj
Core\IdCmdTCPServer.obj
Core\IdCommandHandlers.obj
Core\IdContext.obj
Core\IdCoreDsnRegister.obj
Core\IdCustomTCPServer.obj
Core\IdCustomTransparentProxy.obj
Core\IdDsnBaseCmpEdt.obj
Core\IdDsnCoreResourceStrings.obj
Core\IdDsnPropEdBinding.obj
Core\IdDsnPropEdBindingVCL.obj
Core\IdExceptionCore.obj
Core\IdGlobalCore.obj
Core\IdIcmpClient.obj
Core\IdIntercept.obj
Core\IdInterceptSimLog.obj
Core\IdInterceptThrottler.obj
Core\IdIOHandler.obj
Core\IdIOHandlerSocket.obj
Core\IdIOHandlerStack.obj
Core\IdIOHandlerStream.obj
Core\IdIPAddress.obj
Core\IdIPMCastBase.obj
Core\IdIPMCastClient.obj
Core\IdIPMCastServer.obj
Core\IdLogBase.obj
Core\IdLogDebug.obj
Core\IdLogEvent.obj
Core\IdLogFile.obj
Core\IdLogStream.obj
Core\IdRawBase.obj
Core\IdRawClient.obj
Core\IdRawFunctions.obj
Core\IdRawHeaders.obj
Core\IdRegisterCore.obj
Core\IdReply.obj
Core\IdReplyRFC.obj
Core\IdResourceStringsCore.obj
Core\IdScheduler.obj
Core\IdSchedulerOfThread.obj
Core\IdSchedulerOfThreadDefault.obj
Core\IdSchedulerOfThreadPool.obj
Core\IdServerIOHandler.obj
Core\IdServerIOHandlerSocket.obj
Core\IdServerIOHandlerStack.obj
Core\IdSimpleServer.obj
Core\IdSocketHandle.obj
Core\IdSocks.obj
Core\IdSync.obj
Core\IdTask.obj
Core\IdTCPClient.obj
Core\IdTCPConnection.obj
Core\IdTCPServer.obj
Core\IdTCPStream.obj
Core\IdThread.obj
Core\IdThreadComponent.obj
Core\IdThreadSafe.obj
Core\IdTraceRoute.obj
Core\IdUDPBase.obj
Core\IdUDPClient.obj
Core\IdUDPServer.obj
Core\IdYarn.obj
Core\Indycore50.obj
       69 file(s) copied.
Core\IdCompilerDefines.inc
Core\IdCore90ASM90.inc
Core\IddclCore90ASM90.inc
        3 file(s) copied.
Core\AboutIndyNET.resources
Core\AboutProg.res
Core\dclIndyCore100.res
Core\dclIndyCore50.res
Core\dclIndyCore60.res
Core\dclIndyCore70.res
Core\dclIndyCore90.res
Core\dclindycorek3.res
Core\IdAboutDotNET.TfrmAbout.resources
Core\IdAboutDotNET.resx
Core\IdAboutDotNET.resources
Core\IdAboutNET.resources
Core\IdAboutVCL.RES
Core\IdAbout.resources
Core\IdAbout.resx
Core\IdAbout.TfrmAbout.resources
Core\IdAbout.TWinForm.resources
Core\IdCreditsBitmap.res
Core\IdCreditsBitmap.resources
Core\IdDsnPropEdBindingNET.resx
Core\IdDsnPropEdBindingNET.TIdDsnPropEdBindingNET.resources
Core\IndyCore100.res
Core\IndyCore50.RES
Core\IndyCore60.RES
Core\IndyCore70.RES
Core\IndyCore90.RES
       26 file(s) copied.
Core\IdCoreRegister.dcr
Core\IdCoreRegisterCool.dcr
        2 file(s) copied.
*.pas
The system cannot find the file specified.
        0 file(s) copied.
Indy100Net.dpk
Indy110Net.dpk
Indy90Net.dpk
        3 file(s) copied.
*.obj
The system cannot find the file specified.
        0 file(s) copied.
*.inc
The system cannot find the file specified.
        0 file(s) copied.
*.res
The system cannot find the file specified.
        0 file(s) copied.
*.dcr
The system cannot find the file specified.
        0 file(s) copied.
Borland Delphi  Version 13.0  Copyright (c) 1983,99 Inprise Corporation
IdCompilerDefines.inc(190)
IdCompressionIntercept.pas(329)
519 lines, 0.06 seconds, 2942 bytes code, 4 bytes data.
Borland Delphi  Version 13.0  Copyright (c) 1983,99 Inprise Corporation
IndyCore50.dpk(93)
94 lines, 0.08 seconds, 779 bytes code, 0 bytes data.
Borland Delphi  Version 13.0  Copyright (c) 1983,99 Inprise Corporation
IndyCore50.dpk(93)
Hint: Package 'IndyCore50' does not use or export 
'IdIcmpClient.RSICMPPortUnreac
hable'
Hint: Package 'IndyCore50' does not use or export 
'IdIcmpClient.RSICMPAAdminDest
Prohibitted'
Hint: Package 'IndyCore50' does not use or export 
'IdIcmpClient.RSICMPInfoReques
t'
Hint: Package 'IndyCore50' does not use or export 
'IdIcmpClient.RSICMPConvUnknow
nUnspecError'
Hint: Package 'IndyCore50' does not use or export 
'IdIcmpClient.RSICMPConvDontCo
nvOptPresent'
Hint: Package 'IndyCore50' does not use or export 
'IdIcmpClient.RSICMPMobReg'
94 lines, 0.11 seconds, 216488 bytes code, 633 bytes data.
Creating IndyCore50.LIB file, please wait...
The system cannot find the path specified.
Borland Delphi  Version 13.0  Copyright (c) 1983,99 Inprise Corporation
IdCompilerDefines.inc(190)
IdCompilerDefines.inc(190)
IdDsnCoreResourceStrings.pas(128)
IdAboutVCL.pas(287)
IdAbout.pas(34)
IdCompilerDefines.inc(190)
IdAntiFreeze.pas(129)
IdCompilerDefines.inc(190)
IdCompilerDefines.inc(190)
IdDsnBaseCmpEdt.pas(91)
IdCompilerDefines.inc(190)
IdCompilerDefines.inc(190)
IdDsnPropEdBindingVCL.pas(792)
IdDsnPropEdBinding.pas(130)
IdCoreDsnRegister.pas(177)
IdCompilerDefines.inc(190)
IdRegisterCore.pas(225)
dclIndyCore50.dpk(45)
3560 lines, 0.09 seconds, 26340 bytes code, 261 bytes data.
Borland Delphi  Version 13.0  Copyright (c) 1983,99 Inprise Corporation
IdCompilerDefines.inc(190)
IdCompressionIntercept.pas(329)
519 lines, 0.06 seconds, 2942 bytes code, 4 bytes data.
Borland Delphi  Version 13.0  Copyright (c) 1983,99 Inprise Corporation
Fatal: File not found: 'Indy50.dpk'
'clean' is not recognized as an internal or external command,
operable program or batch file.
Error!
The system cannot find the path specified.
Press any key to continue . . .


>
>
> Gambit
>
> 
Re: Assertion Error while sending email
#849
Author: Remy Lebeau (TeamB)
Date: Thu, 02 Aug 2007 22:54
16 lines
1840 bytes
"JLoz" <jfsierra@excite.com> wrote in message
news:46b24955@newsgroups.borland.com...

> I manually compiled the computil.dpr and lspfix.dpr.
> What are those for by the way?

Computil.exe sets up environment variables that the .bat file uses to know
where the appropriate compiler version is installed.

> Fatal: File not found: 'Indy50.dpk'

That might have something to do with your problem.


Gambit
Re: Assertion Error while sending email
#850
Author: JLoz
Date: Thu, 02 Aug 2007 23:20
49 lines
3128 bytes
>> Fatal: File not found: 'Indy50.dpk'
>
> That might have something to do with your problem.
>
Is there an easy solution to this?  I am not very familiar with batch 
programming...



Right now I have an app that works great but it only has Indy components and 
some buttons, edit boxes an such to set all I need to send an email.  All 
the Indy components and functions used to send the email are contained in 
tha data module.  Now, that same data module on another app does not work.

I just tried recreating a new data module in my big application (I do not 
know what else to try) and noticed that the property 
IdMessage1->Recipients->EMailAddresses shows the following when using a 
watch.

IdMessage1->Recipients->EMailAddresses: E2451 Undefined symbol '_fastcall
Idemailaddress::TIdEMailAddressList::GetEMailAddresses()

Why doesn't this show up when I compile?

I also just tried to download the latest snapshot (hoping this has been 
taking care of), but it does not compile at all as it crashes doing the 
IdGlobal.pas (This using my modified Fullc6.bat which by the way is just 
like the original one except that it uses tha packages for bd5).  The error 
is below:   I will give it a try the following days to see if I can compile 
it.

Press any key to continue . . .
Borland Delphi  Version 13.0  Copyright (c) 1983,99 Inprise Corporation
IdCompilerDefines.inc(339)
IdCompilerDefines.inc(339)
IdCompilerDefines.inc(339)
IdVers.inc(3)
IdGlobal.pas(831) Error: Undeclared identifier: 'TSeekOrigin'
IdResourceStrings.pas(120)
IdGlobal.pas(1133) Fatal: Could not compile used unit 
'IdResourceStrings.pas'
Error!
Press any key to continue . . .


>
> Gambit
>
> 
Re: Assertion Error while sending email
#851
Author: Remy Lebeau (TeamB)
Date: Fri, 03 Aug 2007 00:17
38 lines
2960 bytes
"JLoz" <jfsierra@excite.com> wrote in message
news:46b266b1$1@newsgroups.borland.com...

> Is there an easy solution to this?

If you disable the "@echo off" command at the very top of the script, then
you will see the actual commands output to the screen while they are being
executed.  You can then seen which command is outputting which error.

> I just tried recreating a new data module in my big application
> (I do not know what else to try) and noticed that the property
> IdMessage1->Recipients->EMailAddresses shows the following
> when using a watch.
>
> IdMessage1->Recipients->EMailAddresses: E2451 Undefined
> symbol '_fastcall Idemailaddress::TIdEMailAddressList::GetEMailAddresses()
>
> Why doesn't this show up when I compile?

Because there is nothing wrong with the actual code.  The Watch is simply
being stupid.

> I also just tried to download the latest snapshot (hoping
> this has been taking care of), but it does not compile at all

That is because the snapshot is currently undergoing changes in preparation
for a new release, so it is unstable at the moment, and will likely continus
to be so for the next couple of weeks.

> This using my modified Fullc6.bat which by the way is just
> like the original one except that it uses tha packages for bd5

You should not have done that.  The v6 packages should have worked fine.  I
have compiled Indy 10 for BCB 6 before.


Gambit
Re: Assertion Error while sending email
#852
Author: JLoz
Date: Fri, 03 Aug 2007 13:40
344 lines
11943 bytes
> If you disable the "@echo off" command at the very top of the script, then
> you will see the actual commands output to the screen while they are being
> executed.  You can then seen which command is outputting which error.
>

I did the following...

Dissabled the @echo off

Then I got the error : Fatal: File not found: 'Indy50.dpk'

I added the following lines:

    copy System\*.pas ..\C5
    copy System\*.dpk ..\C5
    copy System\*.obj ..\C5
    copy System\*.inc ..\C5
    copy System\*.res ..\C5
    copy System\*.dcr ..\C5

    copy Protocols\*.pas ..\C5
    copy Protocols\*.dpk ..\C5
    copy Protocols\*.obj ..\C5
    copy Protocols\*.inc ..\C5
    copy Protocols\*.res ..\C5
    copy Protocols\*.dcr ..\C5

Then I ran it again and I got errors again doing the IdZlib.pas which I 
ignored the same I did when I used FULLC6.bat; it kept running until I got 
the following error


    C:\Public\indy\C5>C:\PROGRA~1\Borland\CBUILD~3\bin\dcc32.exe 
IndyCore50.dpk /O..
    \Source\objs /DBCB /M /H /W /JPHN -$d-l-n+p+r-s-t-w-y-
    Borland Delphi  Version 13.0  Copyright (c) 1983,99 Inprise Corporation
    IdObjsBase.pas(27)
    IdObjsVCL.pas(30)
    IdStruct.pas(199)
    IndySystem50.dpk(57)
        >>>>>>  IndyCore50.dpk(30) Warning: Package 'IndySystem50' will not 
be written to disk b
        >>>>>>  ecause -J option is enabled
    IndyCore50.dpk(30) Fatal: Required package 'IndySystem50' not found

    C:\Public\indy\C5>if errorlevel 1 goto enderror

    C:\Public\indy\C5>call clean
    'clean' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Public\indy\C5>echo Error!
    Error!

    C:\Public\indy\C5>cd ..\Source
    The system cannot find the path specified.

    C:\Public\indy\C5>PAUSE
    Press any key to continue . . .


It says the IndySystem50 is not written to the disk, but IndiCore50 requires 
it.

I removed the J from the /JPHN part in the following command line

    C:\Public\indy\C5>C:\PROGRA~1\Borland\CBUILD~3\bin\dcc32.exe 
IndyCore50.dpk /O..
    \Source\objs /DBCB /M /H /W /JPHN -$d-l-n+p+r-s-t-w-y-

Then one more error...


    C:\Public\indy\C5>C:\PROGRA~1\Borland\CBUILD~3\bin\dcc32.exe 
IndyCore50.dpk /O..
    \Source\objs /DBCB /M /H /W /PHN -$d-l-n+p+r-s-t-w-y-
    Borland Delphi  Version 13.0  Copyright (c) 1983,99 Inprise Corporation
    IndySystem50.dpk(57)
    IdYarn.pas(47)
    IdTask.pas(119)
    IdContext.pas(201)
    IdCompilerDefines.inc(190)
    IdThreadSafe.pas(719)
    IdThread.pas(580)
    IdCommandHandlers.pas(649)
    IdCmdTCPClient.pas(270)
    IdScheduler.pas(154)
    IdServerIOHandler.pas(105)
    IdServerIOHandlerSocket.pas(153)
    IdServerIOHandlerStack.pas(89)
    IdCustomTCPServer.pas(389) Fatal: Unit name mismatch: 'IdGlobalCore'

    C:\Public\indy\C5>if errorlevel 1 goto enderror


At this point I decided to stop as I did not know what to do...

This is how my modiffied FULLC6.bat that I use to compile the BCB5 packages 
looks like... just in case:


    @echo off

    if (%1)==() goto test_command
    if (%1)==(start) goto start
    goto endok

    :test_command
    ECHO *************  TEST COMMAND   ***********
    PAUSE
    if (%COMSPEC%)==() goto no_command
    %COMSPEC% /E:9216 /C %0 start %1 %2 %3
    goto endok

    :no_command
    ECHO *************  NO COMMAND   ***********
    PAUSE
    echo No Command Interpreter found
    goto endok

    :start
    REM call clean.bat
    ECHO *************  BEFORE CALLING COMPUTIL   ***********
    PAUSE
    computil SetupC5
    if exist setenv.bat call setenv.bat
    if not exist ..\C5\*.* md ..\C5 >nul
    REM if exist ..\C5\*.* call clean.bat ..\C5\
    if (%NDC5%)==() goto enderror

    REM ***************************************************
    REM Compile Runtime Package IndySystem60
    REM ***************************************************
    ECHO *************  BEFORE COPYING THE FILES   ***********
    PAUSE

    cd System
    copy *.pas ..\..\C5
    copy *.dpk ..\..\C5
    copy *.obj ..\..\C5
    copy *.inc ..\..\C5
    copy *.res ..\..\C5
    copy *.dcr ..\..\C5
    copy *.rsp ..\..\C5
    if not exist .\objs\*.* md .\objs >nul
    cd ..\..\C5

    ECHO *************  COMPILING INDYSYSTEM50.DPK   ***********
    PAUSE

    dcc32.exe IndySystem50.dpk /O..\Lib\System\objs /DBCB /M /H /W /JPHN 
/N. -$d-l-n+p+r-s-t-w-y- %2 %3 %4
    if errorlevel 1 goto enderror
    dcc32.exe IndySystem50.dpk /O..\Lib\System\objs /DBCB /M /H /W 
/N. -$d-l-n+p+r-s-t-w-y- %2 %3 %4
    if errorlevel 1 goto enderror
    ECHO *************  CREATING THE LIBRARY   ***********
    PAUSE
    for %%f in (*.obj) do tlib.exe IndySystem50.lib +%%f /P64 > nul

    ECHO *************  CLEANING UP FILES   ***********
    PAUSE

    REM ***************************************************
    REM Clean-up IndySystem60
    REM ***************************************************
    del *.dcu > nul
    del *.pas > nul
    del *.dpk > nul
    del *.obj > nul
    del *.inc > nul
    del *.res > nul
    del *.dcr > nul
    del *.rsp > nul

    REM ***************************************************
    REM Compile Runtime Package IndyCore60
    REM ***************************************************
    cd ..\Lib\Core

    ECHO *************  COPYING CORE FILES   ***********
    PAUSE

    copy *.pas ..\..\C5
    copy *.dpk ..\..\C5
    copy *.obj ..\..\C5
    copy *.inc ..\..\C5
    copy *.res ..\..\C5
    copy *.dcr ..\..\C5
    copy *.rsp ..\..\C5

    if not exist .\objs\*.* md .\objs >nul
    cd ..\..\C5

    ECHO *************  COMPILING INDYCORE50.DPK   ***********
    PAUSE

    dcc32.exe IndyCore50.dpk /O..\Lib\Core\objs /DBCB /M /H /W /JPHN /N. 
/U. -$d-l-n+p+r-s-t-w-y- %2 %3 %4
    if errorlevel 1 goto enderror
    dcc32.exe IndyCore50.dpk /O..\Lib\Core\objs /DBCB /M /H /W /N. 
/U. -$d-l-n+p+r-s-t-w-y- %2 %3 %4
    if errorlevel 1 goto enderror

    ECHO *************  CREATING CORE LIBRARY   ***********
    PAUSE

    for %%f in (*.obj) do tlib.exe IndyCore50.lib +%%f /P64 > nul
    del *.obj > nul

    REM ***************************************************
    REM Compile Designtime Package dclIndyCore60
    REM ***************************************************

    ECHO *************  COMPILING DCLINDYCORE50.DPK   ***********
    PAUSE

    dcc32.exe dclIndyCore50.dpk /O..\Lib\Core\objs /DBCB /M /H /W /Z /JPHN 
/N. /U. -$d-l-n+p+r-s-t-w-y- %2 %3 %4
    if errorlevel 1 goto enderror
    dcc32.exe dclIndyCore50.dpk /O..\Lib\Core\objs /DBCB /M /H /W /Z /N. 
/U. -$d-l-n+p+r-s-t-w-y- %2 %3 %4
    if errorlevel 1 goto enderror

    ECHO *************  CREATING DCLCORE LIBRARY   ***********
    PAUSE
    for %%f in (*.obj) do tlib.exe dclIndyCore50.lib +%%f /P64 > nul

    ECHO *************  CLEANING UP CORE FILES   ***********
    PAUSE

    REM ***************************************************
    REM Clean-up IndyCore60
    REM ***************************************************
    del *.dcu > nul
    del *.pas > nul
    del *.dpk > nul
    del *.obj > nul
    del *.inc > nul
    del *.res > nul
    del *.dcr > nul
    del *.rsp > nul

    REM ***************************************************
    REM Compile Runtime Package IndyProtocols60
    REM ***************************************************

    ECHO *************  COPYING PROTOCOL FILES  ***********
    PAUSE

    cd ..\Lib\Protocols
    copy *.pas ..\..\C5
    copy *.dpk ..\..\C5
    copy *.obj ..\..\C5
    copy *.inc ..\..\C5
    copy *.res ..\..\C5
    copy *.dcr ..\..\C5
    copy *.rsp ..\..\C5
    if not exist .\objs\*.* md .\objs >nul
    cd ..\..\C5

    ECHO *************  COMPILING PROTOCOLS ***********
    PAUSE
    ECHO *************  FIRST ***********
    PAUSE
    dcc32.exe IndyProtocols50.dpk /O..\Lib\Protocols\objs /DBCB /M /H /W 
/JPHN /N. /U. -$d-l-n+p+r-s-t-w-y- %2 %3 %4
    if errorlevel 1 goto enderror
    ECHO *************  SECOND ***********
    PAUSE
    dcc32.exe IndyProtocols50.dpk /O..\Lib\Protocols\objs /DBCB /M /H /W /N. 
/U. -$d-l-n+p+r-s-t-w-y- %2 %3 %4
    if errorlevel 1 goto enderror

    ECHO *************  DELETING THIRD PARTY FILES   ***********
    PAUSE

    REM ***************************************************
    REM Delete third-party .obj files
    REM before compiling the .lib file
    REM ***************************************************
    del adler32.obj > nul
    del compress.obj > nul
    del crc32.obj > nul
    del deflate.obj > nul
    del example.obj > nul
    del gzio.obj > nul
    del infback.obj > nul
    del inffast.obj > nul
    del inflate.obj > nul
    del inftrees.obj > nul
    del minigzip.obj > nul
    del trees.obj > nul
    del uncompr.obj > nul
    del zutil.obj > nul
    ECHO *************  CREATING PROTOCOLS LIBRARY ***********
    PAUSE

    for %%f in (*.obj) do tlib.exe IndyProtocols50.lib +%%f /P64 > nul
    del *.obj > nul

    REM ***************************************************
    REM Compile Designtime Package dclIndyProtocols60
    REM ***************************************************

    ECHO *************  COMPILING dclPROTOCOLS   ***********
    PAUSE
    dcc32.exe dclIndyProtocols50.dpk /O..\Lib\Protocols\objs /DBCB /M /H /W 
/JPHN /N. /U. -$d-l-n+p+r-s-t-w-y- %2 %3 %4
    if errorlevel 1 goto enderror
    dcc32.exe dclIndyProtocols50.dpk /O..\Lib\Protocols\objs /DBCB /M /H /W 
/N. /U. -$d-l-n+p+r-s-t-w-y- %2 %3 %4
    if errorlevel 1 goto enderror
    for %%f in (*.obj) do tlib.exe dclIndyProtocols50.lib +%%f /P64 > nul

    ECHO *************  DELETING PROTOCOLS FILES  ***********
    PAUSE

    REM ***************************************************
    REM Clean-up IndyProtocols60
    REM ***************************************************
    del *.dcu > nul
    del *.pas > nul
    del *.dpk > nul
    del *.obj > nul
    del *.inc > nul
    del *.res > nul
    del *.dcr > nul
    del *.rsp > nul
    cd ..\Lib
    goto endok

    :enderror
    REM call ..\Lib\clean.bat
    cd ..\Lib
    echo Error!

    :endok
    pause


Thanks again

JLoz 
Re: Assertion Error while sending email
#853
Author: JLoz
Date: Fri, 03 Aug 2007 13:42
18 lines
1931 bytes
>> This using my modified Fullc6.bat which by the way is just
>> like the original one except that it uses tha packages for bd5
>
> You should not have done that.  The v6 packages should have worked fine. 
> I
> have compiled Indy 10 for BCB 6 before.


I need to compile it for BCB5 for I do not have BCB6.  The contents of the 
fullc6.bat file as I modified it are in the previous email I just sent.


>
>
> Gambit
>
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads