Page 1 of 1

Access Violation on some XP machines

Posted: Fri 21 Mar 2014 08:47
by brace
Hello.

I stumbled in a problem i could not understand.

I hope you can give me a hint.

After the latest release of my app (using SDAC 6.1.6, as the previous release) on a TMSQuery.Open i see an Access Violation on some Win XP machines.

I could not debug on those machines, but i tried with MadExcept and I foudn the problem was in a TMSConnection.OpenDatasets statement.

i tried to rewrite OpenDatasets as TMSQuery.Open and the AV occurred anyway.

I found a solution: installing SQLServer Native CLient. This solves the problem.
Note: i was not able to find the exact query giving the problem, because on rewriting from opendatasets to .open i coudl not investigate that.

Could you please explain me why?

Facts:
1) on some (not ALL!) WinXp machines there is AV on TMSQuery.Open
2) this started happening in my latest release (where i did not change the code in the method that gives AV or did not changethe sdac version, still 6.1.6)
3) installing SQLServer Native Client makes the AV disappear.


I know XP will be not supported by MS soon, but too many customers has XP, including big hospitals that have not only budget problems (but also sw certifications) problems. So i must support xp for as long as it is possible.

Thanks a lot.

Re: Access Violation on some XP machines

Posted: Fri 21 Mar 2014 11:02
by brace
i investigated more and i realized that in one of my units TMSConnection gives AV, while if i use many TMSQuery.Open in a row all works fine.

Native Client solves the problem, but i must understand why there is a problem.

Could you please give me an hint?

Thanks.

Re: Access Violation on some XP machines

Posted: Fri 21 Mar 2014 11:05
by brace
I paste also the callstack:

Code: Select all

0040736e +006 MyProject.exe System         13025   +1 TObject.Free
0040870e +02a MyProject.exe System         16563  +15 @HandleFinallyInternal
7c93ab7c +103 ntdll.dll                                         RtlUnwind
004085e2 +12e MyProject.exe System         16323 +141 @HandleOnException
7c91e485 +009 ntdll.dll                                         KiUserExceptionDispatcher
0040d1a8 +010 MyProject.exe System         29967  +10 @IntfClear
00b4e9d0 +068 MyProject.exe OLEDBAccess               TOLEDBCommand.ReleaseInterfaces
00b59006 +006 MyProject.exe OLEDBAccess               TOLEDBRecordSet.ReleaseCommandInterfaces
00b59f1d +0f1 MyProject.exe OLEDBAccess               TOLEDBRecordSet.ExecCommand
00408696 +05a MyProject.exe System         16494  +38 @HandleFinally
7c93ab7c +103 ntdll.dll                                         RtlUnwind
004085e2 +12e MyProject.exe System         16323 +141 @HandleOnException
7c91e485 +009 ntdll.dll                                         KiUserExceptionDispatcher
00b5233c +1b8 MyProject.exe OLEDBAccess               OpenOrExec
00b5246a +056 MyProject.exe OLEDBAccess               DoExecute
00b526e6 +04a MyProject.exe OLEDBAccess               TOLEDBCommand.Execute
00b38b34 +010 MyProject.exe CRAccess                  TCRRecordSet.ExecCommand
00b59ea9 +07d MyProject.exe OLEDBAccess               TOLEDBRecordSet.ExecCommand
00b0cdb8 +008 MyProject.exe DBAccess        2500   +0 TCustomDADataSet.InternalExecute
00b8cf86 +006 MyProject.exe MSAccess                  TCustomMSDataSet.InternalExecute
00b0d118 +21c MyProject.exe DBAccess        2500   +0 TCustomDADataSet.Execute
00b883a8 +198 MyProject.exe MSAccess                  TCustomMSConnection.OpenDatasets

Re: Access Violation on some XP machines

Posted: Fri 21 Mar 2014 13:31
by AlexP
Hello,

Try to create a small application demonstrating the problem and send it to us. Unfortunately, without reproducing the problem, we can't help you solve it.

Re: Access Violation on some XP machines

Posted: Fri 21 Mar 2014 16:13
by brace
I am sorry it would be a too big effort making a simple sample of this.

Moreover since it is only about XP (that is about to be discontinued) it makes no sense to lose time on it, for now i found an empiric solution).

By the time i release the next release of my app i will write into readme (winxp users: install native client or don't submit support tickets).

Thanks

Re: Access Violation on some XP machines

Posted: Mon 24 Mar 2014 09:45
by AlexP
Unfortunately, we cannot reproduce the problem without the data and an exact sample.