Bug 1366 - OpenTK.FrameEventArgs.set_Time crash
Summary: OpenTK.FrameEventArgs.set_Time crash
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 5.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2011-10-08 13:59 UTC by Joe Wilcox
Modified: 2011-12-08 09:05 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
updated OpenTK.dll assembly (372.50 KB, application/octet-stream)
2011-10-10 11:56 UTC, Sebastien Pouliot
Details
opentk.dll without negative time spans (clipped to 0) (278.00 KB, application/octet-stream)
2011-11-04 09:12 UTC, Sebastien Pouliot
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Joe Wilcox 2011-10-08 13:59:48 UTC
I'm running in to a somewhat random crash. My versions are:

MonoFramework 2.10.5.0
MonoTouch 4.0.7

Here is the crash log from the console.

Oct  8 13:42:02 unknown com.apple.locationd[23] <Notice>: NOTICE,Time 339788522.00 (timestamped 39915560.50) took 0.00 seconds to arrive; adjusting to 339788522.00
Oct  8 13:42:02 unknown com.apple.locationd[23] <Notice>: NOTICE,Got NITZ time update to 339788522.00
Oct  8 13:42:02 unknown com.apple.locationd[23] <Notice>: NOTICE,Setting system time to 10/08/2011 17:42:02 from Network
Oct  8 13:42:02 unknown com.apple.locationd[23] <Notice>: NOTICE,Got NITZ timezone update to -240 minutes (-4.00)
Oct  8 13:42:02 unknown com.apple.locationd[23] <Notice>: NOTICE,Got NITZ DST active update to active
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: Unhandled Exception: System.ArgumentOutOfRangeException: Argument is out of range.
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>:   at OpenTK.FrameEventArgs.set_Time (Double value) [0x00000] in <filename unknown>:0 
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>:   at OpenTK.Platform.iPhoneOS.iPhoneOSGameView.RunIteration () [0x00000] in <filename unknown>:0 
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>:   at MonoTouch.Foundation.NSActionDispatcher.Apply () [0x00000] in <filename unknown>:0 
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>:   at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00000] in <filename unknown>:0 
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>:   at SuicideKings.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentOutOfRangeException: Argument is out of range.
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>:   at OpenTK.FrameEventArgs.set_Time (Double value) [0x00000] in <filename unknown>:0 
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>:   at OpenTK.Platform.iPhoneOS.iPhoneOSGameView.RunIteration () [0x00000] in <filename unknown>:0 
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>:   at MonoTouch.Foundation.NSActionDispatcher.Apply () [0x00000] in <filename unknown>:0 
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>:   at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00000] in <filename unknown>:0 
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>:   at SuicideKings.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: Terminating runtime due to unhandled exception
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: Stacktrace:
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: Native stacktrace:
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	0   SuicideKings                        0x0082d320 SuicideKings + 8569632
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	1   SuicideKings                        0x00853b74 SuicideKings + 8727412
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	2   libsystem_c.dylib                   0x3379872f _sigtramp + 42
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	3   libsystem_c.dylib                   0x3378d3bb pthread_kill + 58
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	4   libsystem_c.dylib                   0x33785bff abort + 78
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	5   SuicideKings                        0x00967e74 SuicideKings + 9858676
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	6   SuicideKings                        0x00967f08 SuicideKings + 9858824
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	7   SuicideKings                        0x0080edc0 SuicideKings + 8445376
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	8   SuicideKings                        0x0082c768 SuicideKings + 8566632
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	9   SuicideKings                        0x0082d050 SuicideKings + 8568912
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	10  SuicideKings                        0x00851b88 SuicideKings + 8719240
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	11  SuicideKings                        0x006b4ba4 SuicideKings + 7027620
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	12  SuicideKings                        0x00089340 SuicideKings + 557888
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	13  SuicideKings                        0x002b70c8 SuicideKings + 2842824
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	14  SuicideKings                        0x00680710 SuicideKings + 6813456
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	15  SuicideKings                        0x00812e64 SuicideKings + 8461924
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	16  SuicideKings                        0x009004b4 SuicideKings + 9434292
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	17  SuicideKings                        0x009860ec SuicideKings + 9982188
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	18  Foundation                          0x3523d7cd __NSFireTimer + 136
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	19  CoreFoundation                      0x3683ca47 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 14
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	20  CoreFoundation                      0x3683eecb __CFRunLoopDoTimer + 850
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	21  CoreFoundation                      0x3683f845 __CFRunLoopRun + 1088
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	22  CoreFoundation                      0x367cfec3 CFRunLoopRunSpecific + 230
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	23  CoreFoundation                      0x367cfdcb CFRunLoopRunInMode + 58
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	24  GraphicsServices                    0x361ef41f GSEventRunModal + 114
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	25  GraphicsServices                    0x361ef4cb GSEventRun + 62
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	26  UIKit                               0x36436d69 -[UIApplication _run] + 404
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	27  UIKit                               0x36434807 UIApplicationMain + 670
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	28  SuicideKings                        0x002f3310 SuicideKings + 3089168
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	29  SuicideKings                        0x0071b290 SuicideKings + 7447184
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	30  SuicideKings                        0x00680710 SuicideKings + 6813456
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	31  SuicideKings                        0x00812e64 SuicideKings + 8461924
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	32  SuicideKings                        0x009004b4 SuicideKings + 9434292
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	33  SuicideKings                        0x00903464 SuicideKings + 9446500
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	34  SuicideKings                        0x009024c8 SuicideKings + 9442504
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	35  SuicideKings                        0x0081a614 SuicideKings + 8492564
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	36  SuicideKings                        0x0080d540 SuicideKings + 8439104
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: 	37  SuicideKings                        0x000021d4 SuicideKings + 4564
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: Debug info from gdb:
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: =================================================================
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: Got a SIGABRT while executing native code. This usually indicates
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: a fatal error in the mono runtime or one of the native libraries 
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: used by your application.
Oct  8 13:42:02 unknown UIKitApplication:com.digitalleprechaun.suicidekings[0x1311][663] <Notice>: =================================================================
Oct  8 13:42:02 unknown ReportCrash[667] <Notice>: Formulating crash report for process SuicideKings[663]
Oct  8 13:42:02 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.digitalleprechaun.suicidekings[0x1311]) Job appears to have crashed: Abort trap: 6
Oct  8 13:42:02 unknown SpringBoard[31] <Warning>: Application 'Suicide Kings' exited abnormally with signal 6: Abort trap: 6
Oct  8 13:42:02 unknown ReportCrash[667] <Error>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/SuicideKings_2011-10-08-134202_Overthruster.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
Oct  8 13:42:05 unknown com.apple.locationd[23] <Notice>: NOTICE,Not setting time zone to America/New_York
Comment 1 Sebastien Pouliot 2011-10-10 09:28:22 UTC
This is a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=686045 which Chris Toshok as fixed in 'master' (d93b5bc9c06daef8870e0d09c893a1da7b23c41e) but is not yet available in any released version of MonoTouch.

I'll look into having it into MonoTouch 4.2.3+
Comment 2 Sebastien Pouliot 2011-10-10 11:56:14 UTC
Created attachment 659 [details]
updated OpenTK.dll assembly

Here's an updated OpenTK.dll assembly (built against MonoTouch 4.2 branch) that you can try to see if it solve your issue. 

To use the attached assembly (on top of your MonoTouch 4.0.x) do:
1) backup your /Developer/MonoTouch/usr/lib/mono/2.1/OpenTK.dll and /Developer/MonoTouch/usr/lib/mono/2.1/OpenTK.dll.mdb files
2) copy the attached file to /Developer/MonoTouch/usr/lib/mono/2.1/OpenTK.dll
3) remove the /Developer/MonoTouch/usr/lib/mono/2.1/OpenTK.dll.mdb symbols (they won't match anymore)
4) clean, rebuild and test your application

Please let us know about the results, thanks!
Comment 3 Joe Wilcox 2011-10-13 15:34:18 UTC
The DLL seemed to have fixed the problem.  Testers have not reported any crashes related to the timing reset.
Comment 4 Joe Wilcox 2011-10-13 15:35:05 UTC
This seems to work for me.
Comment 5 Sebastien Pouliot 2011-11-04 08:21:46 UTC
OSX (and iOS) don't support CLOCK_MONOTONIC which can make our Stopwatch report negative numbers if the clock is changed
Comment 6 Sebastien Pouliot 2011-11-04 08:27:37 UTC
We'll need to update the mono runtime to use mach_absolute_time for both:
OSX: http://developer.apple.com/library/mac/#qa/qa1398/_index.html
iOS: http://iosdeveloperzone.com/2011/05/03/quick-performance-measurements/
Comment 7 Sebastien Pouliot 2011-11-04 09:12:44 UTC
Created attachment 821 [details]
opentk.dll without negative time spans (clipped to 0)

see earlier description on how to install
Comment 8 Sebastien Pouliot 2011-11-04 13:44:48 UTC
Fixed. It should be in 4.2.3+ and 5.0.3+ and 5.x (whenever released). Meanwhile the attached OpenTK.dll (which replace negative timespans with 0) can be used on 5.0-5.0.2.
Comment 9 Warren Burch 2011-12-08 01:27:29 UTC
This is happening in MonoDroid too (latest 4.0 version included)

here is my log

12-04 19:26:13.527: DEBUG/AlarmManagerService(1241): Kernel timezone updated
to 480 minutes west of GMT
12-04 19:26:13.528: ERROR/mono(10469): Unhandled Exception:
System.ArgumentOutOfRangeException: Argument is out of range.
12-04 19:26:13.528: ERROR/mono(10469):   at OpenTK.FrameEventArgs.set_Time
(Double value) [0x00000] in <filename unknown>:0 
12-04 19:26:13.528: ERROR/mono(10469):   at
OpenTK.Platform.Android.AndroidGameView.RunIteration () [0x00000] in
<filename unknown>:0 
12-04 19:26:13.528: ERROR/mono(10469):   at
OpenTK.Platform.Android.RepeatTimerTask.Run () [0x00000] in <filename
unknown>:0 
12-04 19:26:13.528: ERROR/mono(10469):   at Java.Util.TimerTask.n_Run
(IntPtr jnienv, IntPtr native__this) [0x00000] in <filename unknown>:0 
12-04 19:26:13.528: ERROR/mono(10469):   at (wrapper dynamic-method)
object:471a68b4-99d6-4090-9cfd-02875fff5ba9 (intptr,intptr)
12-04 19:26:13.534: DEBUG/SystemClock(1334): Setting time of day to
sec=1323055573
12-04 19:26:13.645: DEBUG/AudioHardwareMot(1138):
AudioStreamOutMot::setParameters() fm_attenuate=0;fm_mute=0
12-04 19:26:13.653: WARN/Parcel(1138): **** enforceInterface() expected
'android.media.IAudioTrack' but read '䂀^'

Can I get a rebuilt OpenTK for Android with this bug addressed? It is preventing me from releasing my application.
Thanks
Comment 10 Rolf Bjarne Kvinge [MSFT] 2011-12-08 09:05:00 UTC
Can you please open up a new bug report for the android issue?