Board index » delphi » App w/threads,sockets ok in Win95, crashes WinNT4.0(outside D2 environment)

App w/threads,sockets ok in Win95, crashes WinNT4.0(outside D2 environment)

Hi all,
My message server application that ran fine on Win95 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. privileges.  

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

 

Re:App w/threads,sockets ok in Win95, crashes WinNT4.0(outside D2 environment)


The NT os has a much better built in exception handling than win 95 you may
find that the problem is still happening in Win 95 but win 95  is just
oblivious to the problem as a start you may try making  well positioned
trace calls to _getlasterror which may give you further clues to the nature
of the problem.  Also bear in mind that NT 4.0 uses winsockets 2.0 which
may be worth invesigateing if you have done the socket codeing yourself.
but you havent really given enough information to understand the problem

lucifer Anonymous Remailer <luci...@dhp.com> wrote in article
<199702251942.OAA29...@dhp.com>...

Quote
> Hi all,
> My message server application that ran fine on Win95 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. privileges.  
Quote

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

Other Threads