From: Yiannis B. <yia...@gm...> - 2014-01-03 07:56:53
|
I am using version 2.7.7 of the Firebird .NET Provider because I have to support an application running on .NET 2.0. I finally found the root of this error that can cause any application to crash, even if the application handles unhanded exceptions. This error might appear also and in other versions of the provider as other users have reported here: http://tracker.firebirdsql.org/browse/DNET-316and might also be related with bugs reported here: http://tracker.firebirdsql.org/browse/DNET-386 and here: http://tracker.firebirdsql.org/browse/DNET-382 The exact place where the exception is raised is on *line: 835 of FbCommand.cs.* You can download the source code from this link: http://sourceforge.net/projects/firebird/files/firebird-net-provider/2.7.7/. Choose the *NETProvider-2.7.7-src.7z* file. On this line the code is: *this.connection.InnerConnection.RemovePreparedCommand(this);* The exception is raised when the InnerConnection is null. There is a check for null before this line but not for this.connection.InnerConnection. The existing code is this: *// Remove the command from the Prepared commands list* *if (this.connection != null && this.connection.State == ConnectionState.Open) { this.connection.InnerConnection.RemovePreparedCommand(this); }* What we have to add to avoid the null reference exception is a check for null on *this.connection.InnerConnection* so the code should look like this: *// Remove the command from the Prepared commands list* *if (this.connection != null && this.connection.State == ConnectionState.Open && this.connection.InnerConnection != null* *)* * {* * this.connection.InnerConnection.RemovePreparedCommand(this); }* After making this change I deployed my app on a test environment and left it running for 10+ days. Everything looks fine until now and the exception a had before is gone. Before this change my app was crashing after around 24 hours. Can somebody merge this change on source forge, also targeting .NET 2.0? I am sure that many people will benefit from this small change because it will improve the stability of the provider and this is very important. If this is not possible can you tell me how to correctly build the source code of 2.7.7 on VS 2010 targeting only .NET 2.0? Thanks in advance Yiannis |
From: Jiri C. <di...@ci...> - 2014-01-03 11:14:13
|
Hi, can you confirm this happens also in 4.1.0.0 version? Just for test/stage, you don't need to deploy it to production. Also your fix is solution to problem, but I'm not sure the cause. Maybe it's still in 4.1.0.0 and I would really love to solve the cause (maybe even same way). Very often it uncovers some other issues. -- Jiri {x2} Cincura (x2develop.com founder) http://blog.cincura.net/ | http://www.ID3renamer.com |
From: Yiannis B. <yia...@gm...> - 2014-01-03 18:40:54
|
Hi Jiri, yes, I confirm that this error appears in 4.1.0.0 version also, at the same place. 2014/1/3 Jiri Cincura <di...@ci...> > Hi, > > can you confirm this happens also in 4.1.0.0 version? Just for > test/stage, you don't need to deploy it to production. > > Also your fix is solution to problem, but I'm not sure the cause. > Maybe it's still in 4.1.0.0 and I would really love to solve the cause > (maybe even same way). Very often it uncovers some other issues. > > > -- > Jiri {x2} Cincura (x2develop.com founder) > http://blog.cincura.net/ | http://www.ID3renamer.com > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics > Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider > |
From: Jiri C. <di...@ci...> - 2014-01-03 20:09:09
|
On Fri, Jan 3, 2014 at 7:40 PM, Yiannis Bourkelis <yia...@gm...> wrote: > yes, I confirm that this error appears in 4.1.0.0 version also, at the same > place. Great. Can you provide reproducible test-case? -- Jiri {x2} Cincura (x2develop.com founder) http://blog.cincura.net/ | http://www.ID3renamer.com |
From: Yiannis B. <yia...@gm...> - 2014-01-04 07:04:36
|
I am trying to isolate the problem and create a reproducable case but without success until now. I know it it difficult for you to find the root of the problem without a reproducable case but this is the only thing I know for now: The error appears randomly, after 1 minute or after 24 hours, when 2 or more threads access the database tables and perform select and update queries. Each connection object is created inside the thread as it should. 2014/1/3 Jiri Cincura <di...@ci...> > On Fri, Jan 3, 2014 at 7:40 PM, Yiannis Bourkelis <yia...@gm...> > wrote: > > yes, I confirm that this error appears in 4.1.0.0 version also, at the > same > > place. > > Great. Can you provide reproducible test-case? > > -- > Jiri {x2} Cincura (x2develop.com founder) > http://blog.cincura.net/ | http://www.ID3renamer.com > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics > Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider > |
From: Yiannis B. <yia...@gm...> - 2014-01-04 08:20:28
|
Finally I was able to create a reproducible case. I attached FirebirdNullExceptionReproduce.zip in the original bug report here: http://tracker.firebirdsql.org/browse/DNET-316 Run the app and (hopefully) you should be able to see the exception 2014/1/4 Yiannis Bourkelis <yia...@gm...> > I am trying to isolate the problem and create a reproducable case but > without success until now. > > I know it it difficult for you to find the root of the problem without a > reproducable case but this is the only thing I know for now: > > The error appears randomly, after 1 minute or after 24 hours, when 2 or > more threads access the database tables and perform select and update > queries. Each connection object is created inside the thread as it should. > > > 2014/1/3 Jiri Cincura <di...@ci...> > >> On Fri, Jan 3, 2014 at 7:40 PM, Yiannis Bourkelis <yia...@gm...> >> wrote: >> > yes, I confirm that this error appears in 4.1.0.0 version also, at the >> same >> > place. >> >> Great. Can you provide reproducible test-case? >> >> -- >> Jiri {x2} Cincura (x2develop.com founder) >> http://blog.cincura.net/ | http://www.ID3renamer.com >> >> >> ------------------------------------------------------------------------------ >> Rapidly troubleshoot problems before they affect your business. Most IT >> organizations don't have a clear picture of how application performance >> affects their revenue. With AppDynamics, you get 100% visibility into your >> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics >> Pro! >> >> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk >> _______________________________________________ >> Firebird-net-provider mailing list >> Fir...@li... >> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider >> > > |
From: Jiri C. <di...@ci...> - 2014-01-04 16:16:42
|
Great. Will have a look soon. -- Jiri {x2} Cincura (x2develop.com founder) http://blog.cincura.net/ | http://www.ID3renamer.com |