[Mono-bugs] [Bug 540490] New: Port of simple OPenGL ES 1.1 Demo crashes

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Sep 19 02:09:10 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=540490


           Summary: Port of simple OPenGL ES 1.1 Demo crashes
    Classification: Mono
           Product: MonoTouch
           Version: unspecified
          Platform: x86
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: gnorton at novell.com
        ReportedBy: vijay.santhanam at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=318939)
 --> (http://bugzilla.novell.com/attachment.cgi?id=318939)
The monotouch port of the ogles sample

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB;
rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3

I attempted to port the sample available here line by line

http://web.me.com/smaurice/AppleCoder/iPhone_OpenGL/Entries/2009/4/23_OpenGL_ES_11_-_Single_Texture,_Multiple_Looks,_&_Render_to_Texture.html

Except my line by line port crashes the application.

I'm not sure why.

Attached is my MD+MonoTouch port.

Reproducible: Always

Steps to Reproduce:
1. OPen supplied project
2. build+run project
3. watch it crash and spit out 
Actual Results:  
Crash app (simulator stays up)

Expected Results:  
Not crash... I'm hoping to see what the original coder saw, but I may have more
work to do

Here's the crash stack:

Stacktrace:

  at (wrapper managed-to-native)
MonoTouch.CoreGraphics.CGContext.CGContextDrawImage
(intptr,System.Drawing.RectangleF,intptr) <0x00004>
  at (wrapper managed-to-native)
MonoTouch.CoreGraphics.CGContext.CGContextDrawImage
(intptr,System.Drawing.RectangleF,intptr) <IL 0x00025, 0xffffffff>
  at MonoTouch.CoreGraphics.CGContext.DrawImage
(System.Drawing.RectangleF,MonoTouch.CoreGraphics.CGImage) <IL 0x0000d,
0x00039>
  at EAGLView.LoadTexture (string,uint) [0x0008b] in
/Users/Vijay/Documents/Projects/HelloMonoTouch/HelloMonoTouch/Main.cs:214
  at EAGLView..ctor (MonoTouch.Foundation.NSCoder) [0x0018b] in
/Users/Vijay/Documents/Projects/HelloMonoTouch/HelloMonoTouch/Main.cs:164
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object
(object,intptr,intptr,intptr) <IL 0x00045, 0xffffffff>
  at (wrapper managed-to-native)
MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr)
<0x00004>
  at (wrapper managed-to-native)
MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr)
<IL 0x0009f, 0xffffffff>
  at MonoTouch.UIKit.UIApplication.Main (string[],string,string) <IL 0x0003e,
0x00089>
  at MonoTouch.UIKit.UIApplication.Main (string[]) <IL 0x00003, 0x00014>
  at Application.Main (string[]) [0x00011] in
/Users/Vijay/Documents/Projects/HelloMonoTouch/HelloMonoTouch/Main.cs:36
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object
(object,intptr,intptr,intptr) <IL 0x00044, 0xffffffff>

Native stacktrace:

    0   HelloMonoTouch                      0x00092d5a
mono_handle_native_sigsegv + 266
    1   HelloMonoTouch                      0x00006f5a
mono_sigsegv_signal_handler + 298
    2   libSystem.B.dylib                   0x02080bfb _sigtramp + 43
    3   ???                                 0xffffffff 0x0 + 4294967295
    4   CoreGraphics                        0x004f6801 RGBA32_image + 3921
    5   libRIP.A.dylib                      0x08172e78 ripl_Mark + 38
    6   libRIP.A.dylib                      0x081772a6 ripl_BltImage + 1297
    7   libRIP.A.dylib                      0x08160a9b ripc_RenderImage + 269
    8   libRIP.A.dylib                      0x0816fb7a ripc_DrawImage + 4959
    9   CoreGraphics                        0x0049df04 CGContextDrawImage + 397
    10  ???                                 0x0814dc38 0x0 + 135584824
    11  ???                                 0x0814dbda 0x0 + 135584730
    12  ???                                 0x066f8057 0x0 + 107970647
    13  ???                                 0x066f2ef1 0x0 + 107949809
    14  ???                                 0x066f242e 0x0 + 107947054
    15  HelloMonoTouch                      0x0000d25d mono_jit_runtime_invoke
+ 157
    16  HelloMonoTouch                      0x001f32bc
monotouch_ctor_trampoline + 1672
    17  UIKit                               0x00b6fdfc -[UIClassSwapper
initWithCoder:] + 237
    18  Foundation                          0x00718e16 _decodeObjectBinary +
1398
    19  Foundation                          0x0071a707 -[NSKeyedUnarchiver
_decodeArrayOfObjectsForKey:] + 1335
    20  Foundation                          0x0071ab90 -[NSArray(NSArray)
initWithCoder:] + 432
    21  Foundation                          0x00718e16 _decodeObjectBinary +
1398
    22  Foundation                          0x00718815 _decodeObject + 229
    23  UIKit                               0x009d708f -[UIView initWithCoder:]
+ 633
    24  UIKit                               0x009c87ce -[UIWindow
initWithCoder:] + 67
    25  Foundation                          0x00718e16 _decodeObjectBinary +
1398
    26  Foundation                          0x00718815 _decodeObject + 229
    27  UIKit                               0x00b6fb35 -[UIRuntimeConnection
initWithCoder:] + 181
    28  Foundation                          0x00718e16 _decodeObjectBinary +
1398
    29  Foundation                          0x0071a707 -[NSKeyedUnarchiver
_decodeArrayOfObjectsForKey:] + 1335
    30  Foundation                          0x0071ab90 -[NSArray(NSArray)
initWithCoder:] + 432
    31  Foundation                          0x00718e16 _decodeObjectBinary +
1398
    32  Foundation                          0x00718815 _decodeObject + 229
    33  UIKit                               0x00b6eeab -[UINib
instantiateWithOptions:owner:loadingResourcesFromBundle:] + 786
    34  UIKit                               0x00b70fcb
-[NSBundle(NSBundleAdditions) loadNibNamed:owner:options:] + 148
    35  UIKit                               0x009b00a6 -[UIApplication
_loadMainNibFile] + 160
    36  UIKit                               0x009b982a -[UIApplication
_runWithURL:sourceBundleID:] + 114
    37  UIKit                               0x009b6b88 -[UIApplication
handleEvent:withNewEvent:] + 1532
    38  UIKit                               0x009b26d3 -[UIApplication
sendEvent:] + 71
    39  UIKit                               0x009b90b5
_UIApplicationHandleEvent + 5048
    40  GraphicsServices                    0x02c52ef1 PurpleEventCallback +
1533
    41  CoreFoundation                      0x02286b80 CFRunLoopRunSpecific +
3888
    42  CoreFoundation                      0x02285c48 CFRunLoopRunInMode + 88
    43  UIKit                               0x009b0e69 -[UIApplication _run] +
611
    44  UIKit                               0x009ba003 UIApplicationMain + 1157
    45  ???                                 0x066f11a1 0x0 + 107942305
    46  ???                                 0x066f10da 0x0 + 107942106
    47  ???                                 0x066f09bd 0x0 + 107940285
    48  ???                                 0x0441cf19 0x0 + 71421721
    49  ???                                 0x0441ce93 0x0 + 71421587
    50  HelloMonoTouch                      0x0000d25d mono_jit_runtime_invoke
+ 157
    51  HelloMonoTouch                      0x00159d2b mono_runtime_exec_main +
251
    52  HelloMonoTouch                      0x0015ce55 mono_runtime_run_main +
405
    53  HelloMonoTouch                      0x001f4949 main + 463
    54  HelloMonoTouch                      0x000029f6 start + 54

Debug info from gdb:

warning: Trying to remove a section from the ordered section list that did not
exist at 0x2d4000.
warning: Could not find object file
"/var/folders/sx/sx-Kk0etERSfEnNL1AtcEk+++TI/-Tmp-/tmp3edc9908.tmp/main.o" - no
debug information available for
"/var/folders/sx/sx-Kk0etERSfEnNL1AtcEk+++TI/-Tmp-/tmp3edc9908.tmp/main.m".

Attaching to process 5463.
Reading symbols for shared libraries . done
Reading symbols for shared libraries
........................................... done
0x02025c19 in read$UNIX2003 ()
  6 port# 0x3303 0x0201a8fa in mach_msg_trap ()
  5 port# 0x3003 0x0204882a in __semwait_signal ()
  4 port# 0x2903 0x0201a936 in semaphore_wait_trap ()
  3 port# 0x2503 0x0204882a in __semwait_signal ()
  2 port# 0x1403 0x0201a8fa in mach_msg_trap ()
* 1 port# 0x207  0x02025c19 in read$UNIX2003 ()

Thread 6 (process 5463):
#0  0x0201a8fa in mach_msg_trap ()
#1  0x0201b067 in mach_msg ()
#2  0x02286382 in CFRunLoopRunSpecific ()
#3  0x02285c48 in CFRunLoopRunInMode ()
#4  0x02e67803 in RunWebThread ()
#5  0x02047fe1 in _pthread_start ()
#6  0x02047e66 in thread_start ()

Thread 5 (process 5463):
#0  0x0204882a in __semwait_signal ()
#1  0x020484e6 in _pthread_cond_wait ()
#2  0x0204a178 in pthread_cond_wait$UNIX2003 ()
#3  0x05abe353 in glvmDoWork ()
#4  0x02047fe1 in _pthread_start ()
#5  0x02047e66 in thread_start ()

Thread 4 (process 5463):
#0  0x0201a936 in semaphore_wait_trap ()
#1  0x000fe340 in finalizer_thread (unused=0x0) at
./../../../mono/metadata/gc.c:1014
#2  0x0018f0d6 in start_wrapper (data=0x410b890) at
./../../../mono/metadata/threads.c:657
#3  0x001c3796 in thread_start_routine (args=0x500bc34) at
./../../../mono/io-layer/wthreads.c:286
#4  0x001edd54 in GC_start_routine (arg=0x40e5f60) at
./../../libgc/pthread_support.c:1390
#5  0x02047fe1 in _pthread_start ()
#6  0x02047e66 in thread_start ()

Thread 3 (process 5463):
#0  0x0204882a in __semwait_signal ()
#1  0x02074681 in nanosleep$UNIX2003 ()
#2  0x001a5a60 in collection_thread (unused=0x0) at
./../../../mono/io-layer/collection.c:34
#3  0x02047fe1 in _pthread_start ()
#4  0x02047e66 in thread_start ()

Thread 2 (process 5463):
#0  0x0201a8fa in mach_msg_trap ()
#1  0x0201b067 in mach_msg ()
#2  0x000c61aa in mach_exception_thread (arg=0x0) at
./../../../mono/mini/mini-darwin.c:131
#3  0x001edd54 in GC_start_routine (arg=0x40e5f60) at
./../../libgc/pthread_support.c:1390
#4  0x02047fe1 in _pthread_start ()
#5  0x02047e66 in thread_start ()

Thread 1 (process 5463):
#0  0x02025c19 in read$UNIX2003 ()
#1  0x00092e9a in mono_handle_native_sigsegv (signal=11, ctx=0xbfffb9b4) at
./../../../mono/mini/mini-exceptions.c:1560
#2  0x00006f5a in mono_sigsegv_signal_handler (_dummy=11, info=0xbfffb974,
context=0xbfffb9b4) at ../../../../mono/mini/mini.c:4586
#3  <signal handler called>
#4  0x0058aa70 in CGSConvertRGB888toRGBA8888 ()
#5  0x004f6801 in RGBA32_image ()
#6  0x08172e78 in ripl_Mark ()
#7  0x081772a6 in ripl_BltImage ()
#8  0x08160a9b in ripc_RenderImage ()
#9  0x0816fb7a in ripc_DrawImage ()
#10 0x0049df04 in CGContextDrawImage ()
#11 0x0814dc38 in ?? ()
#12 0x0814dbda in ?? ()
#13 0x066f8057 in ?? ()
#14 0x066f2ef1 in ?? ()
#15 0x066f242e in ?? ()
#16 0x0000d25d in mono_jit_runtime_invoke (method=0x5019af4, obj=0x671bf00,
params=0xbfffc910, exc=0x0) at ../../../../mono/mini/mini.c:4490
#17 0x001f32bc in monotouch_ctor_trampoline ()
#18 0x00b6fdfc in -[UIClassSwapper initWithCoder:] ()
#19 0x00718e16 in _decodeObjectBinary ()
#20 0x0071a707 in -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] ()
#21 0x0071ab90 in -[NSArray(NSArray) initWithCoder:] ()
#22 0x00718e16 in _decodeObjectBinary ()
#23 0x00718815 in _decodeObject ()
#24 0x009d708f in -[UIView initWithCoder:] ()
#25 0x009c87ce in -[UIWindow initWithCoder:] ()
#26 0x00718e16 in _decodeObjectBinary ()
#27 0x00718815 in _decodeObject ()
#28 0x00b6fb35 in -[UIRuntimeConnection initWithCoder:] ()
#29 0x00718e16 in _decodeObjectBinary ()
#30 0x0071a707 in -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] ()
#31 0x0071ab90 in -[NSArray(NSArray) initWithCoder:] ()
#32 0x00718e16 in _decodeObjectBinary ()
#33 0x00718815 in _decodeObject ()
#34 0x00b6eeab in -[UINib
instantiateWithOptions:owner:loadingResourcesFromBundle:] ()
#35 0x00b70fcb in -[NSBundle(NSBundleAdditions) loadNibNamed:owner:options:] ()
#36 0x009b00a6 in -[UIApplication _loadMainNibFile] ()
#37 0x009b982a in -[UIApplication _runWithURL:sourceBundleID:] ()
#38 0x009b6b88 in -[UIApplication handleEvent:withNewEvent:] ()
#39 0x009b26d3 in -[UIApplication sendEvent:] ()
#40 0x009b90b5 in _UIApplicationHandleEvent ()
#41 0x02c52ef1 in PurpleEventCallback ()
#42 0x02286b80 in CFRunLoopRunSpecific ()
#43 0x02285c48 in CFRunLoopRunInMode ()
#44 0x009b0e69 in -[UIApplication _run] ()
#45 0x009ba003 in UIApplicationMain ()
#46 0x066f11a1 in ?? ()
#47 0x066f10da in ?? ()
#48 0x066f09bd in ?? ()
#49 0x0441cf19 in ?? ()
#50 0x0441ce93 in ?? ()
#51 0x0000d25d in mono_jit_runtime_invoke (method=0x5019e84, obj=0x0,
params=0xbffff0fc, exc=0x0) at ../../../../mono/mini/mini.c:4490
#52 0x00159d2b in mono_runtime_exec_main (method=0x5019e84, args=0x44d1100,
exc=0x0) at ../../../../mono/metadata/object.c:3466
#53 0x0015ce55 in mono_runtime_run_main (method=0x5019e84, argc=0,
argv=0xbffff1a8, exc=0x0) at ../../../../mono/metadata/object.c:3246
#54 0x001f4949 in main ()

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

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list