Board index » delphi » App. w/threads,sockest..Ok in Win95, crashes in WinNT(outside of D2 environment)

App. w/threads,sockest..Ok in Win95, crashes in WinNT(outside of D2 environment)

Hi all,
I have a message server application that ran fine on Win95 and is blowing up since we switched to Win NT 4.0.  The app has a listening socket on the main thread...and upon connection request, spins off a thread that creates a connection socket and a TSession, TDatabase, and TQuery for some access to an MSSQL server. The components all seem to be freed successively just before the thread hit the 'Exit' statement in the Execute procedure to kill the thread.  After things started crashing on the WinNT server, I installed D2 on the machine to see if I could trace the error.  Well, the error stopped happening...but, when I try running the exe. outside the D2 environment, it give me the old access violation.  Any ideas out there?  I have looked into permissions, and this doesn't seem to be it since we kept the FAT filesystem and permissions only seem to matter if on NTFS.  Rights don't seem to be the problem...I have recompiled the app on the machine on an account with Admin. privil!
eges.  We have even added
more memory...now at 48 MB.  

I'm really puzzled over this one....any ideas out there?

TIA!!

Kashmir
kash...@weasel.owl.de

 

Re:App. w/threads,sockest..Ok in Win95, crashes in WinNT(outside of D2 environment)


In article <199702251932.OAA28...@dhp.com>,
luci...@dhp.com (lucifer Anonymous Remailer) wrote:

Quote
>I have a message server application that ran fine on Win95 and is blowing

up since we switched to Win NT 4.0.  The app has a listening socket on the
main thread...and upon connection request, spins off a thread that creates
a connection socket and a TSession, TDatabase, and TQuery for some
access to an MSSQL server. The components all seem to be freed successively
just before the thread hit the 'Exit' statement in the Execute procedure
to kill the thread.  After things started crashing on the WinNT server,
I installed D2 on the machine to see if I could trace the error.
Well, the error stopped happening...but, when I try running the exe.
outside the D2 environment, it give me the old access violation.
----

(do feel free to press Enter more often when posting your next article ;-) )

I'm sure you've read the Borland TI page which covers multithreaded
database access (it sounds like it, since you mention keeping a separate
TSession for each thread) so I won't mention it here.

However, when you say that you run your EXE, do you actually run it
from the command line? I know of a problem with the BDE version shipped
with D2 which would make it impossible to use the BDE from an application
running under a different user context (which is the case of services, CGIs
and so on) while the user at the console also uses the BDE... This particular
bug was fixed in BDE 3.5 which is the version Borland has been distributing
on their web server since August (?) or so...

--
=\                       homepage @ http://www.qsd.no/staff/rune
 *=- R.Moberg, CD-Player Pro info @ http://home.sn.no/home/mobergru
=/               my own webserver @ http://pumba.qsd.no

Other Threads