Background Thread Unhandled AccessViolationException

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
crazypit
Posts: 163
Joined: Wed 15 Apr 2009 08:43

Post by crazypit » Mon 31 Oct 2011 07:39

Got the test build.

How do i use it?

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Mon 31 Oct 2011 16:00

The test build includes the changes which may fix the problem with unhandled AccessViolationExceptions (these are the only changes compared to the original 2.50.30 build). Please try using this build in the highly loaded application and tell us whether access violation exceptions occur in this case.

crazypit
Posts: 163
Joined: Wed 15 Apr 2009 08:43

Post by crazypit » Wed 04 Jan 2012 07:36

After a long testing of this personalized version in out heavy-duty production system, i still get these errors but with a lot less frequency. Now, i get them maybe 1 every week or something. You are definitely seem to be on the right track but not quite there yet. Can you do something better?

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Tue 10 Jan 2012 11:22

Sorry for the delay. Please specify whether the stack trace of the exceptions is the same as before. If not, please specify the stack trace of the errors you are getting now.

crazypit
Posts: 163
Joined: Wed 15 Apr 2009 08:43

Post by crazypit » Wed 11 Jan 2012 08:09

Exception Info: System.AccessViolationException
Stack:
at Devart.Data.Linq.Provider.DataProvider.ExecuteQuery(CompiledQuery, System.Object[], System.Object[], System.Object)
at Devart.Data.Linq.Provider.DataProvider.ExecuteAllQueries(CompiledQuery, System.Object[])

Exception Info: System.InvalidOperationException
Stack:
at Devart.Common.DbConnectionInternal.d(System.Object)
at Devart.Common.DbConnectionPoolGroup.a(Devart.Common.DbConnectionPool)
at Devart.Common.DbConnectionPoolGroup.a(System.Object)
at System.Threading.ExecutionContext.runTryCode(System.Object)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading._TimerCallback.PerformTimerCallback(System.Object)


Exception Info: System.AccessViolationException
Stack:
at Devart.Data.Linq.Provider.ObjectReader`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].k()
at Devart.Data.Linq.Provider.k+a.d()
at Devart.Data.Linq.Provider.k.e()
at Devart.Data.Linq.Provider.DataProvider.Dispose(Boolean)
at Devart.Data.Linq.DataContext.Dispose()

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Mon 16 Jan 2012 15:32

We are investigating the possible ways of resolving these issues. We will post here when any new information is available.

goethals.f
Posts: 60
Joined: Mon 18 May 2009 13:17

Post by goethals.f » Wed 29 Feb 2012 08:24

StanislavK wrote:We are investigating the possible ways of resolving these issues. We will post here when any new information is available.
Hello all,


I do have some similar issues concerning AccessViolationException when trying to dispose an oracleCommand.

You can easily similate this kind of exception when you do the following

1) create connection
2) create command + execute
3) do not dispose the connection/command
4) unplug your pc from the network, wait some time, plug back in
5) try to execute same command again --> this will indeed result in error

6) catch the error, and try to do the clean-up --> meaning try to dispose the oracleCommand now (which is in debug-mode still some valid object)

--> the oracleCommand.Dispose() throws AccessViolationException, and most strange thing --> it is not catchable ????

Code: Select all

            try
            {

                //Clean up oracleCommand
                if (this.oracleCommand != null)
                {
                    this.oracleCommand.Dispose();
                }
            }
            catch (AccessViolationException AccessViolex)
            {
                //not possible to catch anything, and silently swallow exception
            }
            catch (Exception ex)
            {
                //not possible to catch anything, and silently swallow exception
            }

I do understand that there could be strange things because of the network unplugged (but the code itself it just to handle this kind of network-loss, where we try to clean up everythind and recreate things)

--> if I just could catch the "AccessViolationException" in my case, everything should be ok.

Do i do something wrong in the code to try catching this exception.


Currently i do not have the exacte exception message, but it mentioned certainly some oracle client dll's.

my set-up was the next

*) oracle client 10.2
*) oci-mode (not direct mode)
*) oracle server 11
*) windows XP, vs.net 2010, .NET 4.0
*) Devart.Data.Oracle: v 6.60.258.0


thx
Fred

Post Reply