Hi fellow developer

I'm currently working on a strategic game addon, for the upcoming danish
title "Heroes & Generals". We use a CATiledLayer to update and render the
tiles of a "google maps" alike european WW2 map, but when rendering objects
for all the european cities, I get a SIGSEGV error, that i unfortunately
cannot solve ...

The error happends when trying to render a string:

test.DrawString(titleRect, UIFont.FromName("FetteEngDOT", fontSize),
UILineBreakMode.MiddleTruncation, UITextAlignment.Center);

I debug the values of titleRect and the test string itself, and everything
seems okay.

(debug: test = Cmd_Odense_US (titleRect:
{X=402,4781,Y=165,4276,Width=1,484375,Height=0,390625}

The stacktrace i get is this :

Stacktrace:

  at (wrapper managed-to-native)
MonoTouch.ObjCRuntime.Messaging.SizeF_objc_msgSend_RectangleF_IntPtr_int_int
(intptr,intptr,System.Drawing.RectangleF,intptr,int,int) <IL 0x0002c,
0xffffffff>
  at MonoTouch.Foundation.NSString.DrawString
(System.Drawing.RectangleF,MonoTouch.UIKit.UIFont,MonoTouch.UIKit.UILineBreakMode,MonoTouch.UIKit.UITextAlignment)
[0x0003c] in
/Developer/MonoTouch/Source/monotouch/src/Foundation/NSString.g.cs:232
  at HGMobileIOS.WarMapTileLayer.DrawCommandNode
(single,single,single,single,single,MonoTouch.CoreGraphics.CGContext,HGDataBaseModels.dboCommandNode,int,single)
[0x00228] in
/Users/kent/Projects/HGMobile/HGMobileIOS/views/map/WarMapTileLayer.cs:420
  at HGMobileIOS.WarMapTileLayer.RenderOverlay
(MonoTouch.CoreGraphics.CGContext,System.Drawing.RectangleF,System.Drawing.RectangleF,int,int,single)
[0x00623] in
/Users/kent/Projects/HGMobile/HGMobileIOS/views/map/WarMapTileLayer.cs:352
  at HGMobileIOS.WarMapTileLayer.Draw (System.Drawing.RectangleF) [0x00240]
in
/Users/kent/Projects/HGMobile/HGMobileIOS/views/map/WarMapTileLayer.cs:168
  at (wrapper runtime-invoke)
<Module>.runtime_invoke_void__this___RectangleF
(object,intptr,intptr,intptr) <IL 0x0005c, 0xffffffff>
  at (wrapper managed-to-native)
MonoTouch.ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr
(intptr,intptr,intptr) <IL 0x00025, 0xffffffff>
  at MonoTouch.CoreAnimation.CALayer.DrawInContext
(MonoTouch.CoreGraphics.CGContext) [0x00026] in
/Developer/MonoTouch/Source/monotouch/src/CoreAnimation/CALayer.g.cs:498
  at HGMobileIOS.NoFadeTiledLayer.DrawInContext
(MonoTouch.CoreGraphics.CGContext) [0x00000] in
/Users/kent/Projects/HGMobile/HGMobileIOS/views/map/WarMapTileLayer.cs:34
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object
(object,intptr,intptr,intptr) <IL 0x00052, 0xffffffff>

Native stacktrace:

        0   HGMobileIOS                         0x0009524c
mono_handle_native_sigsegv + 284
        1   HGMobileIOS                         0x0000c158
mono_sigsegv_signal_handler + 248
        2   libSystem.B.dylib                   0x9557d05b _sigtramp + 43
        3   ???                                 0xffffffff 0x0 + 4294967295
        4   libicucore.A.dylib                  0x0325b78f
_ZN3icu22RuleBasedBreakIterator10isBoundaryEi + 159
        5   libicucore.A.dylib                  0x0325b6eb ubrk_isBoundary + 24
        6   WebCore                             0x058df1a8
_ZN7WebCore11isTextBreakEPNS_17TextBreakIteratorEi + 24
        7   WebCore                             0x05835333
_ZN7WebCoreL22centerTruncateToBufferERKNS_6StringEjjPtb + 99
        8   WebCore                             0x0583598c
_ZN7WebCoreL14truncateStringERKNS_6StringEfRKNS_4FontEPFjS2_jjPtbEbPfbfb +
716
        9   WebCore                             0x05835d84
_ZN7WebCore15StringTruncator14centerTruncateERKNS_6StringEfRKNS_4FontEbRfbf
+ 84
        10  WebCore                             0x05922336
_ZL18applyEllipsisStyleRKN7WebCore6StringE16WebEllipsisStylefRKNS_4FontEbPfbfb
+ 678
        11  WebCore                             0x05924b22
-[NSString(WebStringDrawing)
__web_drawInRect:withFont:ellipsis:alignment:letterSpacing:lineSpacing:includeEmoji:truncationRect:measureOnly:renderedStringOut:]
+ 5058
        12  WebCore                             0x059217ce
-[NSString(WebStringDrawing)
__web_drawInRect:withFont:ellipsis:alignment:letterSpacing:lineSpacing:includeEmoji:truncationRect:measureOnly:]
+ 158
        13  WebCore                             0x059214a9
-[NSString(WebStringDrawing)
_web_drawInRect:withFont:ellipsis:alignment:lineSpacing:includeEmoji:truncationRect:measureOnly:]
+ 153
        14  WebCore                             0x059213fc
-[NSString(WebStringDrawing)
_web_drawInRect:withFont:ellipsis:alignment:lineSpacing:includeEmoji:truncationRect:]
+ 140
        15  UIKit                               0x01c5cb22
-[NSString(UIStringDrawing)
_drawInRect:withFont:lineBreakMode:alignment:lineSpacing:includeEmoji:truncationRect:]
+ 145
        16  UIKit                               0x01c5c3ce
-[NSString(UIStringDrawing)
drawInRect:withFont:lineBreakMode:alignment:lineSpacing:includeEmoji:] + 109
        17  UIKit                               0x01c5c49f
-[NSString(UIStringDrawing) drawInRect:withFont:lineBreakMode:alignment:] +
99
        18  ???                                 0x127f3f28 0x0 + 310329128
        19  ???                                 0x127f3de0 0x0 + 310328800
        20  ???                                 0x10f67e9c 0x0 + 284589724
        21  ???                                 0x127efe30 0x0 + 310312496
        22  ???                                 0x1279a144 0x0 + 309961028
        23  ???                                 0x1279a650 0x0 + 309962320
        24  HGMobileIOS                         0x000104c2 
mono_jit_runtime_invoke
+ 722
        25  HGMobileIOS                         0x001721fe mono_runtime_invoke +
126
        26  HGMobileIOS                         0x00220bdc monotouch_trampoline 
+
3372
        27  UIKit                               0x01c76187
-[UIView(CALayerDelegate) drawLayer:inContext:] + 426
        28  QuartzCore                          0x0311bb5e -[CALayer
drawInContext:] + 143
        29  ???                                 0x10bbb2ac 0x0 + 280736428
        30  ???                                 0x12798e8c 0x0 + 309956236
        31  ???                                 0x12798cf8 0x0 + 309955832
        32  ???                                 0x10be5596 0x0 + 280909206
        33  HGMobileIOS                         0x000104c2 
mono_jit_runtime_invoke
+ 722
        34  HGMobileIOS                         0x001721fe mono_runtime_invoke +
126
        35  HGMobileIOS                         0x00220bdc monotouch_trampoline 
+
3372
        36  QuartzCore                          0x03132283
_ZL18tiled_layer_renderP16_CAImageProviderjjjjPv + 1648
        37  QuartzCore                          0x0307aeb2
_ZL21CAImageProviderThreadPjb + 475
        38  libSystem.B.dylib                   0x9553c781 _pthread_wqthread + 
390
        39  libSystem.B.dylib                   0x9553c5c6 start_wqthread + 30

=================================================================
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.
=================================================================

I really, really hope that someone to help pointing me in the right
direction ...

Thanks in advance,
Kent Fonager, netcoders aps

--
View this message in context: 
http://monotouch.2284126.n4.nabble.com/Strange-SIGSEGV-error-please-help-me-tp4364967p4364967.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to