Issue Details (XML | Word | Printable)

Key: DNET-684
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jiri Cincura
Reporter: André Ziegler
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
.NET Data provider

System.NullReferenceException in FirebirdSql.Data.Common.Extensions.TryGetTarget

Created: 12/Jun/16 02:59 PM   Updated: 21/Feb/17 07:47 AM
Component/s: ADO.NET Provider
Affects Version/s: 5.0.5.0
Fix Version/s: 5.8.0.0

Environment: Windows 8 (x64), .Net 4.5.2
Issue Links:
Relate


 Description  « Hide
While testing my app I got a crash and analyzing the dmp shows a System.NullReferenceException in FirebirdSql.Data.Common.Extensions.TryGetTarget:


PROBLEM_CLASSES:

CLR_EXCEPTION
    Tid [0x2]
    Frame [0x00]

    String [System.NullReferenceException]
    Failure Bucketing
    Data Bucketing

FINALIZER
    Tid [0x2348]
    Frame [0x0b]: clr!FastCallFinalize
    Failure Bucketing


BUGCHECK_STR: CLR_EXCEPTION_FINALIZER_System.NullReferenceException

DEFAULT_BUCKET_ID: CLR_EXCEPTION_FINALIZER_System.NullReferenceException

STACK_TEXT:
049ff1bc 51f20f89 firebirdsql_data_firebirdclient_ni!FirebirdSql.Data.Common.Extensions.TryGetTarget[[System.__Canon,_mscorlib]]+0x25
049ff1d4 51f3faee firebirdsql_data_firebirdclient_ni!FirebirdSql.Data.FirebirdClient.FbConnectionInternal.RemovePreparedCommand+0x6e
049ff20c 51f41751 firebirdsql_data_firebirdclient_ni!FirebirdSql.Data.FirebirdClient.FbCommand.Release+0x4d
049ff21c 51f409fc firebirdsql_data_firebirdclient_ni!FirebirdSql.Data.FirebirdClient.FbCommand.Dispose+0x50


FAILURE_IMAGE_NAME: FirebirdSql.Data.FirebirdClient.ni.dll

FAILURE_FUNCTION_NAME: FirebirdSql.Data.Common.Extensions.TryGetTarget[[System.__Canon,_mscorlib]]

BUCKET_ID_FUNCTION_STR: FirebirdSql.Data.Common.Extensions.TryGetTarget[[System.__Canon,_mscorlib]]

FAILURE_SYMBOL_NAME: FirebirdSql.Data.FirebirdClient.ni.dll!FirebirdSql.Data.Common.Extensions.TryGetTarget[[System.__Canon,_mscorlib]]

FAILURE_BUCKET_ID: CLR_EXCEPTION_FINALIZER_System.NullReferenceException_80004003_FirebirdSql.Data.FirebirdClient.ni.dll!FirebirdSql.Data.Common.Extensions.TryGetTarget[[System.__Canon,_mscorlib]]


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Jiri Cincura added a comment - 12/Jun/16 03:08 PM
Can you replicate it (i.e. under some stress)?

André Ziegler added a comment - 12/Jun/16 03:49 PM
I'll try to repro it tomorrow. I did a long term run on parsing ETL files (generated by xperf/WPR.exe) and storing my interesting data in a database because parsing the ETL files is slow.

André Ziegler added a comment - 13/Jun/16 07:03 AM
ok, I repeated the same long term run and today it works and I haven't seen a crash.

Hennadii Zabula added a comment - 13/Jun/16 04:25 PM
Jiri, it's all same old problem when managed objects is used on a finalizer path.

Jiri Cincura added a comment - 13/Jun/16 04:27 PM
I know. But I need to replicate it to fix the root cause. Band aiding doesn't help.

Kraus Matthias added a comment - 28/Jul/16 07:00 AM
I think we ran in the same issue, our error handling show the following informations.

Error: (callProcedure) Object reference not set to an instance of an object. - at FirebirdSql.Data.Common.Extensions.TryGetTarget[T](WeakReference weakReference, T& target) in C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\Common\Extensions.cs:line 75
   at FirebirdSql.Data.FirebirdClient.FbConnectionInternal.TransactionCompleted() in C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbConnectionInternal.cs:line 281
   at FirebirdSql.Data.FirebirdClient.FbTransaction.CompleteTransaction() in C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbTransaction.cs:line 305
   at FirebirdSql.Data.FirebirdClient.FbTransaction.Commit() in C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbTransaction.cs:line 143
   at FirebirdSql.Data.FirebirdClient.FbCommand.CommitImplicitTransaction() in C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbCommand.cs:line 745
   at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteNonQuery() in C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbCommand.cs:line 499
   at SIMON.SQLDBHandling.callProcedure(BlockingCollection`1 stackList) in c:\_dev\SiMon3\SiMon_DLL\SQLDBHandling.vb:line 8314

André Ziegler added a comment - 21/Aug/16 07:12 PM
after removing the EF cache package I no longer see the issue:

https://www.nuget.org/packages/EntityFramework.Cache