[Mono-bugs] [Bug 78379][Nor] New - Tao.Sdl crashes with glibc detected free() only on Linux

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri May 12 09:27:00 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by jan.reitz at lanxess.com.

http://bugzilla.ximian.com/show_bug.cgi?id=78379

--- shadow/78379	2006-05-12 09:27:00.000000000 -0400
+++ shadow/78379.tmp.21199	2006-05-12 09:27:00.000000000 -0400
@@ -0,0 +1,65 @@
+Bug#: 78379
+Product: Mono: Runtime
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details: Gentoo 64bit / Ubuntu 32bit
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: interop
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: jan.reitz at lanxess.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Tao.Sdl crashes with glibc detected free() only on Linux
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+when calling Sdl.SDL_GetError() in Tao.Sdl that should return a string but
+Linux-Mono Crashes with:
+*** glibc detected *** free(): invalid pointer: 0x560326a0 *** 
+
+it works on Windows-Mono and MSFT.NET
+the Original SDL_GetError function does work too, i tried it in C++ for myself.
+
+snip from the Wrapper Class in Tao.Sdl:
+		/// <summary>
+		///     Gets an SDL error string.
+		/// </summary>
+		/// <returns>
+		///     A string containing information about the last internal SDL error.
+		/// </returns>
+		/// <remarks>
+		/// <p>Binds to C-function call in SDL_error.h:
+		///     <code>extern DECLSPEC char * SDLCALL SDL_GetError(void)</code>
+		///     </p>
+		/// </remarks>
+		[DllImport(SDL_NATIVE_LIBRARY, CallingConvention=CALLING_CONVENTION),
+SuppressUnmanagedCodeSecurity]
+		public static extern string SDL_GetError();
+
+SDL_NATIVE_LIBRARY = "SDL.dll"; // wich i have mapped via /etc/mono/config
+CALLING_CONVENTION = CallingConvention.Cdecl;
+
+Steps to reproduce the problem:
+1. maybe u need to: Tao.Sdl.SDL_Init(Sdl.SDL_INIT_EVERYTHING);
+2. call Tao.Sdl.SDL_GetError();
+3. watch it crash
+
+Actual Results:
+*** glibc detected *** free(): invalid pointer: 0x560326a0 ***
+or something very similar on an AMD64
+
+Expected Results:
+empty string or error text
+
+How often does this happen? 
+everytime
+
+Additional Information:
+SDL used was 1.2.8 and 1.2.9
+Mono 1.1.13.* (tryed some versions)


More information about the mono-bugs mailing list