[Mono-list] Getting Strange Exceptions
Christian Papauschek
cp at inode.at
Wed Oct 29 09:02:25 EDT 2008
I have encountered strange Exceptions with my spamfilter core application.
[1] 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]
[2] 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 [2] 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
corruption.
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 [1]. 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-tp20226582p20226582.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list