Hi,
SDDPG causes GPF on application quit in MTVM mode.
Self-contained sample attached.
Tested on Windows/MSVC7.1, libpq.dll (8.3.10) is compiled with
--enable-thread-safety switch.
Crash won't happen without explicit disconnect, comment out ->
RDDINFO(RDDI_DISCONNECT, nConn) to check.
Please test if error can be reproduced, correct PostgreSQL credentials
are needed.
GPF info dumped into hb_out.log follows (not very useful I'd guess):
Application Internal Error - sddtest.exe
Terminated at: 2010.05.31 21:03:29
Unrecoverable error 6005: Exception error:
Exception Code:C0000005
Exception Address:004045AC
EAX:00EB03FC EBX:7FFDF000 ECX:00000001 EDX:00404580
ESI:00000000 EDI:00000000 EBP:0012FF88
CS:EIP:001B:004045AC SS:ESP:0023:0012FE7C
DS:0023 ES:0023 FS:003B GS:0000
Flags:00010206
CS:EIP: FF 51 0C 8B 15 6C 0D 4C 00 8B 04 B2 50 E8 12 6C
SS:ESP: 00EB03FC 00000000 00000000 00489671 00E1980C 00E1597C
00E1596C 004269D6 00000001 00000001 00E1597C 00000000 00001771 0049A6BB
00000001 01CC16C0
C stack:
EIP: EBP: Frame: OldEBP, RetAddr, Params...
004045AC 0012FF88 0012FF94 764B4911 7FFDF000
764B4911 0012FF94 0012FFD4 7709E4B6 7FFDF000 8ED99693 00000000
00000000 7FFDF000 00000000 00000000 00000000
7709E4B6 0012FFD4 0012FFEC 7709E489 0049A54F 7FFDF000 00000000
00000000
Modules:
0x00400000 0x000C4000 sddtest.exe
0x77060000 0x00127000 ntdll.dll
0x76470000 0x000DB000 kernel32.dll
0x10000000 0x0002D000 LIBPQ.dll
[...]
Regards, Aleksander Czajczynski
-mt -lhbnetio -lrddsql -lsddpg -llibpq
sddtest.prg
#include "dbinfo.ch"
#include "error.ch"
#include "hbrddsql.ch"
#include "hbthread.ch"
REQUEST SDDPG, SQLMIX
ANNOUNCE RDDSYS
FIELD RESIDENTS
PROCEDURE main()
RDDSETDEFAULT("SQLMIX")
AEVAL(RDDLIST(), {|X| QOUT(X)})
hb_threadDetach( hb_threadStart( HB_THREAD_INHERIT_PUBLIC, @do() ) )
WAIT
PROCEDURE do()
LOCAL nConn
IF (nConn := RDDINFO(RDDI_CONNECT, {"POSTGRESQL", "localhost", "user",
"password", "postgres"}) ) == 0
? "Unable connect to the server"
RETURN
ENDIF
? "Let's browse table (press any key)"
HB_gtLock()
INKEY(0)
DBUSEAREA( .T.,, "SELECT CAST(version() AS bpchar)", "postgres" )
Browse()
HB_gtUnLock()
DBCLOSEALL()
RDDINFO(RDDI_DISCONNECT, nConn)
// ^ comment this line out, and GPF won't happen on app termination
RETURN
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour