[Mono-list] Getting Strange Exceptions
cp at inode.at
Sun Nov 2 08:57:13 EST 2008
I was able to reproduce the error on Mono 2.0.1 Win32, it seems that it is
some kind of threading problem. Mono starts throwing strange exceptions from
the core library methods (like the Dictionary or Hashtable Exceptions),
which my program prints into a debug log file. Then the mono runtime crashes
The output when mono crashes differs - sometimes for example it seems to
crash allocating memory for a String. I need so simplify my application in
order to get an idea whats causing this.
Has anyone an idea where to start debugging a threading related problem? My
application heavily uses database connections (MySql) and IO (File and Tcp
Networking). I am not sure where to start simplifying.
Christian Papauschek wrote:
> I have encountered strange Exceptions with my spamfilter core application.
>  System.IndexOutOfRangeException: Array index is out of range.
> at System.Collections.Generic.Dictionary`2[System.String,System.Byte].Add
> (System.String key, Byte value) [0x00000]
>  MySql.Data.MySqlClient.MySqlException: You have an error in your SQL
> syntax; check the manual that corresponds to your MySQL server version for
> the right syntax to use near 'Fragen Sie sich, welches Kasino seinen
> Mitgliedern den h chsten Bonus auszahlt? ' at line 1
> Now  is obviously not a correct SQL Query, but this is NOT what I pass
> to the MySqlClient as Query in my application! This String is used at a
> different place in my application - it must be some kind of memory
> At first the Exceptions look like problems coming from multithreading,
> however I looked at the code again and it seems impossible that multiple
> threads access the object where the errors occur.
> It is the same with the Dictionary Exception . This usually happens if
> one thread modifies a Dictionary, and another tries to read from it.
> However, in this case the Dictionary is a local variable and is never
> passed to another Thread, and no other Thread access to this Object! The
> section of code that uses this Dictionary is overlookable and i am very
> sure that no threading is involved.
> I am using a self-compiled Mono-2.0.1 on Debian/Linux
> I am not using any native libraries, only the MySql connector which is
> written completely in C#
> Thanks to anyone who can point me into the right direction of looking for
> the real problem. I have worked with .NET since many years, and on Mono a
> few months, and really dont know where to start.
> -- Chris
View this message in context: http://www.nabble.com/Getting-Strange-Exceptions-tp20226582p20289964.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list