Bug #55187 | NullReferenceException | ||
---|---|---|---|
Submitted: | 12 Jul 2010 20:42 | Modified: | 31 May 2011 13:23 |
Reporter: | asmcad asmcad | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / NET | Severity: | S1 (Critical) |
Version: | 6.2.3 | OS: | Windows |
Assigned to: | Julio Casal | CPU Architecture: | Any |
[12 Jul 2010 20:42]
asmcad asmcad
[12 Jul 2010 20:53]
asmcad asmcad
i think i solved it by disposing mysql objects after using.. at leaset i havent got any error till now.. i wasn't disposing but this wasn't a problem when i was using "mssql".
[12 Jul 2010 23:38]
asmcad asmcad
:S it still gives the error..
[13 Jul 2010 17:19]
Vladislav Vaintroub
Looks like duplicate of Bug#53457 Should be fixed (or best effort is made to fix it) in the upcoming Connector versions.
[13 Jul 2010 19:15]
asmcad asmcad
so if i use 6.3.2 development version problem ll be solved? i ll try.. thanks
[14 Jul 2010 10:18]
Tonci Grgin
Asmcad, please do and inform us of the outcome.
[15 Jul 2010 9:41]
asmcad asmcad
yes the development verison works on my computer and it solves the problem. BUT if i upload new mysql.data.dll which is 6.3.2. to my host i get an error like : The type initializer for 'MySql.Data.MySqlClient.MySqlTrace' threw an exception. it only works for my local. so , development verison doesn't work on my server. should i do something to get work development version on server? what's the difference between relased version and development version? thanks
[15 Jul 2010 11:08]
Vladislav Vaintroub
TypeInitializationException typically indicates DLL loading problems. The real exception is given in InnerException, according to http://msdn.microsoft.com/en-us/library/ms242144(VS.80).aspx Maybe if you print that exception you'll find our more.
[15 Jul 2010 12:11]
asmcad asmcad
i did get the innerexception and here it is: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at MySql.Data.MySqlClient.MySqlTrace..cctor() The action that failed was: LinkDemand The type of the first permission that failed was: System.Security.Permissions.SecurityPermission The Zone of the assembly that failed was: MyComputer thanks.
[15 Jul 2010 12:53]
Vladislav Vaintroub
I'm not too much with this type of issues. This sounds like this is about trust levels, perhaps signing with valid certificate, or maybe assembly being in GAC. In other words, .NET security. Distribution installs assemblies to GAC, signs with valid certificate and registers providers machine-wide. Some of these factors will probably matter in your case. This is all I know about the difference of distribution vs self-built assemblies.
[15 Jul 2010 13:02]
asmcad asmcad
yes, you r right what you say ; it's about permission. but in this case mysql .net connector 6.2.3 version works fine. mysql .net connector 6.3.2 doesn't so what i m trying to say: it's not just about my case. there are something related to this api versions. there must be some differences to cause to this error."maybe some of developers of this api should pay attention to these stiuation..
[15 Jul 2010 13:07]
asmcad asmcad
tonight i ll try new project from begining which tests this stiuation. by doing this it ll be clear is it really about my case or there is something with these versions. thans
[20 Jul 2010 16:14]
Vladislav Vaintroub
Is there any news? also, if original exception has disappeared and you're fighting with the new one, it makes sense to close the bug and perhaps(?) create a new one.
[20 Aug 2010 23:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
[25 May 2011 19:54]
d deedee
Hello, I have the same bug with the 6.3.6 connector. Any news please to resolve this problem? Thank you. MySql.Data.MySqlClient.NativeDriver.FetchDataRow(Int32 statementId, Int32 columns) MySql.Data.MySqlClient.Driver.FetchDataRow(Int32 statementId, Int32 columns) MySql.Data.MySqlClient.Driver.SkipDataRow() MySql.Data.MySqlClient.ResultSet.Close() MySql.Data.MySqlClient.MySqlDataReader.NextResult() MySql.Data.MySqlClient.MySqlDataReader.Close() MySql.Data.MySqlClient.MySqlConnection.Close() MySql.Data.MySqlClient.MySqlConnection.Dispose(Boolean disposing) System.ComponentModel.Component.Finalize()
[26 May 2011 17:41]
Julio Casal
Please provide reproduction steps for this issue and a sample project that shows the error.
[26 May 2011 19:55]
d deedee
I tryed to reproduce this bug with an easy sample website with a connection to Mysql, but nothing was wrong. It occurs just like asmcad said, by few clicks. I put some breakpoints, but it seems to be random sometimes the bug occurs early and sometimes no and I can't figure out where it is exactly just for this reason. Visual Studio 2008, framework 3.5, mysql connector 6.3.6, IIS 6, win 7. In the event viewer application at 15:30:44, I found this warning. An unhandled exception occurred and the process was stopped. Application ID: / LM/W3SVC/1/ROOT Process ID: 4724 Exception: System.NullReferenceException Message: Object reference not set to an instance of an object. StackTrace: at MySql.Data.MySqlClient.NativeDriver.FetchDataRow (statementId Int32, Int32 columns) to MySql.Data.MySqlClient.Driver.FetchDataRow (statementId Int32, Int32 columns) to MySql.Data.MySqlClient.Driver.SkipDataRow () to MySql.Data.MySqlClient.ResultSet.Close () to MySql.Data.MySqlClient.MySqlDataReader.NextResult () to MySql.Data.MySqlClient.MySqlDataReader.Close () to MySql.Data.MySqlClient.MySqlConnection.Close () to MySql.Data.MySqlClient.MySqlConnection.Dispose (Boolean disposing) to System.ComponentModel.Component.Finalize () In the event viewer system, at 15:31:04. A process of application pool 'DefaultAppPool' has encountered a fatal communication error with the service activation process of Windows. The process id was '4724 '. The data field contains the error number. Do you have any idea? Thanks!
[30 May 2011 14:46]
Julio Casal
It is still not easy to reproduce this scenario without more info. I can recommend getting the source code for the Connector/Net version you are using and reference the MySql.Data project instead of the dll. This can provide more details around what is happening here. Please post all the additional details you get.
[31 May 2011 13:19]
d deedee
Hello Julio! There is now no more bug! I did like you suggested. I deleted the reference MySql.data.dll, added the project Mysql.Data to the solution, added the reference to this project, created the connectornet.snk and it works! It means there is probably a difference between the dll and the source code of the dll. Then, I checked the version and indeed, the original dll version was 6.2.2 and not 6.3.6. The dll has not been replaced automatically when I installed the new connector. Thank you for your help!
[31 May 2011 13:23]
Julio Casal
Thank you d deedee. Please let us know if you see this behavior again in the current release.
[31 May 2011 13:25]
Julio Casal
Fixed in 6.3.6+.