[Mono-list] crash in Mono runtime related to GdipDeleteGraphics

jrjr jresnick at gmail.com
Sat Feb 16 21:49:58 UTC 2013


Hi,
I am porting a program originally written for .net/windows to mono/linux.
The program is a long-running application that has been running solidly on
Windows for months, but on mono/linux it will not run for more than about 18
hours before it crashes with the stack trace below, or a similar (the stack
trace isn't always identical, but GdipDeleteGraphics always seems to be the
culprit).  I am running it on an ubuntu 12.10 VM, using Mono 2.10.8.1.

Any idea what might be causing the problem and/or how I might work around
it?


mono: /build/buildd/cairo-1.12.2/src/cairo-hash.c:506:
_cairo_hash_table_lookup_exact_key: Assertion `!"reached"' failed.
Stacktrace:

  at (wrapper managed-to-native) System.Drawing.GDIPlus.GdipDeleteGraphics
(intptr) <0xffffffff>
  at System.Drawing.Graphics.Dispose () <0x00063>
  at (wrapper remoting-invoke-with-check) System.Drawing.Graphics.Dispose ()
<0xffffffff>
  at System.Drawing.Bitmap..ctor (System.Drawing.Image,int,int) <0x0005f>
  at System.Drawing.Bitmap..ctor (System.Drawing.Image,System.Drawing.Size)
<0x0001b>
  at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap..ctor
(System.Drawing.Image,System.Drawing.Size) <0xffffffff>
  at PhotoMontage.ImageUtils.Scale
(System.Drawing.Bitmap,System.Drawing.Size) <0x00037>
  at PhotoMontage.ImageFactory.ScaleBitmap
(System.Drawing.Bitmap,System.Drawing.Size) <0x00063>
  at PhotoMontage.ImageFactory/DefaultImage.Scale (System.Drawing.Size)
<0x0002f>
  at PhotoMontage.ImageTransform/Scale.ApplyCore (PhotoMontage.IImage)
<0x0003b>
  at PhotoMontage.ImageTransform.Apply (PhotoMontage.IImage) <0x00014>
  at PhotoMontage.Tile.Create
(PhotoMontage.IImage,System.Drawing.Size,PhotoMontage.ImageResizeMode)
<0x0008b>
  at FM.ImageSearchTileSet.MoveNext () <0x0009f>
  at PhotoMontage.MontageEngine.Run () <0x00073>
  at FM.Generator.Session.Execute () <0x0010f>
  at FM.Generator.Engine.<OnTimer>m__60 (object) <0x00017>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object
(object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	mono() [0x80e6431]
	[0xb772640c]
	[0xb7726424]
	/lib/i386-linux-gnu/libc.so.6(gsignal+0x4f) [0xb753e1df]
	/lib/i386-linux-gnu/libc.so.6(abort+0x175) [0xb7541825]
	/lib/i386-linux-gnu/libc.so.6(+0x27085) [0xb7537085]
	/lib/i386-linux-gnu/libc.so.6(+0x27137) [0xb7537137]
	/usr/lib/i386-linux-gnu/libcairo.so.2(+0x2c888) [0xb3a01888]
	/usr/lib/i386-linux-gnu/libcairo.so.2(+0x771c3) [0xb3a4c1c3]
	/usr/lib/i386-linux-gnu/libcairo.so.2(cairo_font_face_destroy+0x4f)
[0xb39fa3cf]
	/usr/lib/i386-linux-gnu/libcairo.so.2(+0x286ce) [0xb39fd6ce]
	/usr/lib/i386-linux-gnu/libcairo.so.2(+0x247da) [0xb39f97da]
	/usr/lib/i386-linux-gnu/libcairo.so.2(+0x24862) [0xb39f9862]
	/usr/lib/i386-linux-gnu/libcairo.so.2(cairo_destroy+0x39) [0xb39efa39]
	/usr/lib/libgdiplus.so(GdipDeleteGraphics+0x80) [0xb4998cb0]
	[0xb4d36fd0]
	[0xb4d36f54]
	[0xb4d36ec0]
	[0xb4d36458]
	[0xb4d363e4]
	[0xb4d363a0]
	[0xb4d36330]
	[0xb4d3a93c]
	[0xb4d3a890]
	[0xb4d3a854]
	[0xb4d3a7ed]
	[0xb4d3a2d4]
	[0xb4d4b6d8]
	[0xb2a8bdbc]
	[0xb2a8ba08]
	[0xb2a8b8c8]
	[0xb67fccad]
	mono() [0x8066dcc]

Debug info from gdb:

Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
No threads.

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

Aborted (core dumped)




--
View this message in context: http://mono.1490590.n4.nabble.com/crash-in-Mono-runtime-related-to-GdipDeleteGraphics-tp4658612.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list