[Mono-bugs] [Bug 81552][Maj] New - Crash after call Bitmap.LockBits

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon May 7 10:45:08 EDT 2007


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 smalcom at ukr.net.

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

--- shadow/81552	2007-05-07 10:45:07.000000000 -0400
+++ shadow/81552.tmp.29677	2007-05-07 10:45:08.000000000 -0400
@@ -0,0 +1,167 @@
+Bug#: 81552
+Product: Mono: Class Libraries
+Version: 1.2
+OS: other
+OS Details: Slackware 11.0
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: libgdiplus
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: smalcom at ukr.net               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Crash after call Bitmap.LockBits
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem: SIGSEGV
+
+
+Steps to reproduce the problem:
+1. call BitmapData bitmapdata = map.LockBits(rectangle,
+ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
+2. or call BitmapData bitmapdata = map.LockBits(rectangle,
+ImageLockMode.ReadOnly, PixelFormat.Format32bppRgb);
+
+Actual Results:
+SIGSEGV
+
+Expected Results:
+everything ok
+
+How often does this happen? 
+always
+
+Additional Information:
+libgdiplus/src/bitmap.c
+line 1780
+srcData - 140081592
+palette - 0
+pixel - 0
+, after that crash with
+Stacktrace:
+
+  at (wrapper managed-to-native) System.Drawing.GDIPlus.GdipBitmapLockBits
+(intptr,System.Drawing.Rectangle&,System.Drawing.Imaging.ImageLockMode,System.Drawing.Imaging.PixelFormat,System.Drawing.Imaging.BitmapData)
+<0x00004>
+  at (wrapper managed-to-native) System.Drawing.GDIPlus.GdipBitmapLockBits
+(intptr,System.Drawing.Rectangle&,System.Drawing.Imaging.ImageLockMode,System.Drawing.Imaging.PixelFormat,System.Drawing.Imaging.BitmapData)
+<0xffffffff>
+  at System.Drawing.Bitmap.LockBits
+(System.Drawing.Rectangle,System.Drawing.Imaging.ImageLockMode,System.Drawing.Imaging.PixelFormat,System.Drawing.Imaging.BitmapData)
+<0x0001d>
+  at System.Drawing.Bitmap.LockBits
+(System.Drawing.Rectangle,System.Drawing.Imaging.ImageLockMode,System.Drawing.Imaging.PixelFormat)
+<0x0004a>
+  at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap.LockBits
+(System.Drawing.Rectangle,System.Drawing.Imaging.ImageLockMode,System.Drawing.Imaging.PixelFormat)
+<0xffffffff>
+  at k0sm.OpenGL.Texture.UploadTexture () <0x00089>
+  at k0sm.OpenGL.TextBitmap2D.Create
+(string,uint,uint,uint,single,single,single) <0x0004d>
+  at k0sm.OpenGL.Render.CreateWindow () <0x00227>
+  at testsuite.Program.Main () <0x000b9>
+  at (wrapper runtime-invoke) System.Object.runtime_invoke_void
+(object,intptr,intptr,intptr) <0xffffffff>
+
+Native stacktrace:
+
+	/usr/bin/mono [0x8153df5]
+	/usr/bin/mono [0x813ea0f]
+	[0xb7f78440]
+	/usr/lib/libgdiplus.so(GdipBitmapLockBits+0x1e1) [0xb59a6a71]
+	[0xb5b20edc]
+	[0xb5b20d86]
+	[0xb5b20d33]
+	[0xb5b20ca8]
+	[0xb5b2072a]
+	[0xb5b1e8d6]
+	[0xb7aa2120]
+	[0xb7aa1332]
+	[0xb7aa105e]
+	/usr/bin/mono(mono_runtime_exec_main+0x4f) [0x808dc9f]
+	/usr/bin/mono(mono_runtime_run_main+0x213) [0x808dff3]
+	/usr/bin/mono(mono_main+0xf8d) [0x8058fcd]
+	/usr/bin/mono [0x8057b99]
+	/lib/tls/libc.so.6(__libc_start_main+0xd4) [0xb7d73e14]
+	/usr/bin/mono [0x8057ac1]
+
+Debug info from gdb:
+
+Using host libthread_db library "/lib/tls/libthread_db.so.1".
+[Thread debugging using libthread_db enabled]
+[New Thread -1210755392 (LWP 13974)]
+[New Thread -1219257424 (LWP 13980)]
+[New Thread -1213518928 (LWP 13979)]
+0xb7e20d57 in ___newselect_nocancel () from /lib/tls/libc.so.6
+  3 Thread -1213518928 (LWP 13979)  0xb7ebb99c in __nanosleep_nocancel ()
+   from /lib/tls/libpthread.so.0
+  2 Thread -1219257424 (LWP 13980)  0xb7eb8b11 in
+pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
+  1 Thread -1210755392 (LWP 13974)  0xb7e20d57 in ___newselect_nocancel ()
+   from /lib/tls/libc.so.6
+
+Thread 3 (Thread -1213518928 (LWP 13979)):
+#0  0xb7ebb99c in __nanosleep_nocancel () from /lib/tls/libpthread.so.0
+#1  0x080ee36b in collection_thread (unused=0x0) at collection.c:34
+#2  0xb7eb620e in start_thread () from /lib/tls/libpthread.so.0
+#3  0xb7e280de in clone () from /lib/tls/libc.so.6
+
+Thread 2 (Thread -1219257424 (LWP 13980)):
+#0  0xb7eb8b11 in pthread_cond_wait@@GLIBC_2.3.2 ()
+   from /lib/tls/libpthread.so.0
+#1  0x080f2dcd in timedwait_signal_poll_cond (cond=0xb7a131dc, 
+    mutex=0xb7a131c4, timeout=0x0, alertable=0) at handles.c:1413
+#2  0x080f2f0e in _wapi_handle_timedwait_signal_handle (handle=0x0, 
+    timeout=0x0, alertable=0) at handles.c:1493
+#3  0x080f3072 in _wapi_handle_wait_signal_handle (handle=0x404, alertable=0)
+    at handles.c:1453
+#4  0x08102bbd in WaitForSingleObjectEx (handle=0x404, timeout=4294967295, 
+    alertable=0) at wait.c:200
+#5  0x080a2f10 in finalizer_thread (unused=0x0) at gc.c:835
+#6  0x080bce78 in start_wrapper (data=0x82595e0) at threads.c:309
+#7  0x08101f35 in thread_start_routine (args=0xb78bf3c0) at threads.c:253
+#8  0x081169eb in GC_start_routine (arg=0x22f40) at pthread_support.c:1362
+#9  0xb7eb620e in start_thread () from /lib/tls/libpthread.so.0
+#10 0xb7e280de in clone () from /lib/tls/libc.so.6
+
+Thread 1 (Thread -1210755392 (LWP 13974)):
+#0  0xb7e20d57 in ___newselect_nocancel () from /lib/tls/libc.so.6
+#1  0xb7f1e1e8 in g_spawn_sync () from /usr/lib/libglib-2.0.so.0
+#2  0xb7f1e595 in g_spawn_command_line_sync () from /usr/lib/libglib-2.0.so.0
+#3  0x08153e7f in mono_handle_native_sigsegv (signal=11, ctx=0xbffa521c)
+    at mini-exceptions.c:1065
+#4  0x0813ea0f in sigsegv_signal_handler (_dummy=11, info=0xbffa519c, 
+    context=0xbffa521c) at mini.c:11162
+#5  <signal handler called>
+#6  0xb59a67fb in gdip_bitmap_change_rect_pixel_format (srcData=0x85979b8, 
+    srcRect=0xbffa5710, destData=0xbffa5670, destRect=0x85979b8)
+    at bitmap.c:1783
+#7  0xb59a6a71 in GdipBitmapLockBits (bitmap=0x0, srcRect=0xbffa5710, 
+    flags=1, format=PixelFormat24bppRgb, locked_data=0xbffa5670)
+    at bitmap.c:1975
+#8  0xb5b20edc in ?? ()
+#9  0x0855b2d8 in ?? ()
+#10 0xbffa5710 in ?? ()
+#11 0x00000001 in ?? ()
+#12 0x00021808 in ?? ()
+#13 0xbffa5670 in ?? ()
+#14 0x00000100 in ?? ()
+#15 0x00000100 in ?? ()
+#16 0x00000300 in ?? ()
+#17 0x00021808 in ?? ()
+#18 0xb5693008 in ?? ()
+#19 0x00000d00 in ?? ()
+#20 0x00000000 in ?? ()
+#0  0xb7e20d57 in ___newselect_nocancel () from /lib/tls/libc.so.6
+
+
+=================================================================
+Got a SIGSEGV while executing native code. This usually indicates
+a fatal error in the mono runtime or one of the native libraries 
+used by your application.
+=================================================================


More information about the mono-bugs mailing list