Bug 10894 - OpenTK.FrameEventArgs.set_Time crash
Summary: OpenTK.FrameEventArgs.set_Time crash
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: 4.4.x
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Radek Doulik
URL:
Depends on:
Blocks:
 
Reported: 2013-03-04 20:56 UTC by mono.dev.syko
Modified: 2014-06-03 09:00 UTC (History)
9 users (show)

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

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 mono.dev.syko 2013-03-04 20:56:51 UTC

    
Comment 1 mono.dev.syko 2013-03-04 21:08:47 UTC
Application crashes about 10 minutes. ( Use IS04 : Android2.2.2 / IS11SH
 : Android2.3.3)

Here is my log.

03-04 17:19:52.269: I/MonoDroid(10867): UNHANDLED EXCEPTION: System.ArgumentOutOfRangeException: Argument is out of range.
03-04 17:19:52.269: I/MonoDroid(10867): at OpenTK.FrameEventArgs.set_Time (double) <0x00040>
03-04 17:19:52.269: I/MonoDroid(10867): at OpenTK.Platform.Android.AndroidGameView.RunIteration (System.Threading.CancellationToken) <0x001b7>
03-04 17:19:52.269: I/MonoDroid(10867): at OpenTK.Platform.Android.AndroidGameView/<StartThread>c__AnonStorey1.<>m__B (object) <0x00027>
03-04 17:19:52.269: I/MonoDroid(10867): at Android.App.SyncContext/<Send>c__AnonStorey29.<>m__14 () <0x00023>
03-04 17:19:52.269: I/MonoDroid(10867): at Java.Lang.Thread/RunnableImplementor.Run () <0x0003f>
03-04 17:19:52.269: I/MonoDroid(10867): at Java.Lang.IRunnableInvoker.n_Run (intptr,intptr) <0x00037>
03-04 17:19:52.269: I/MonoDroid(10867): at (wrapper dynamic-method) object.d2d2e39c-084a-4054-bd81-e7b0e4dea7ac (intptr,intptr) <0x0003b>
03-04 17:19:52.309: E/mono(10867): Unhandled Exception:
03-04 17:19:52.309: E/mono(10867): System.ArgumentOutOfRangeException: Argument is out of range.
03-04 17:19:52.309: E/mono(10867):   at OpenTK.FrameEventArgs.set_Time (Double value) [0x00000] in <filename unknown>:0 
03-04 17:19:52.309: E/mono(10867):   at OpenTK.Platform.Android.AndroidGameView.RunIteration (CancellationToken token) [0x00000] in <filename unknown>:0 
03-04 17:19:52.309: E/mono(10867):   at OpenTK.Platform.Android.AndroidGameView+<StartThread>c__AnonStorey1.<>m__B (System.Object _) [0x00000] in <filename unknown>:0 
03-04 17:19:52.309: E/mono(10867):   at Android.App.SyncContext+<Send>c__AnonStorey29.<>m__14 () [0x00000] in <filename unknown>:0 
03-04 17:19:52.309: E/mono(10867):   at Java.Lang.Thread+RunnableImplementor.Run () [0x00000] in <filename unknown>:0 
03-04 17:19:52.309: E/mono(10867):   at Java.Lang.IRunnableInvoker.n_Run (IntPtr jnienv, IntPtr native__this) [0x00000] in <filename unknown>:0 
03-04 17:19:52.309: E/mono(10867):   at (wrapper dynamic-method) object:d2d2e39c-084a-4054-bd81-e7b0e4dea7ac (intptr,intptr)
03-04 17:19:52.309: I/mono(10867): [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentOutOfRangeException: Argument is out of range.
03-04 17:19:52.309: I/mono(10867):   at OpenTK.FrameEventArgs.set_Time (Double value) [0x00000] in <filename unknown>:0 
03-04 17:19:52.309: I/mono(10867):   at OpenTK.Platform.Android.AndroidGameView.RunIteration (CancellationToken token) [0x00000] in <filename unknown>:0 
03-04 17:19:52.309: I/mono(10867):   at OpenTK.Platform.Android.AndroidGameView+<StartThread>c__AnonStorey1.<>m__B (System.Object _) [0x00000] in <filename unknown>:0 
03-04 17:19:52.309: I/mono(10867):   at Android.App.SyncContext+<Send>c__AnonStorey29.<>m__14 () [0x00000] in <filename unknown>:0 
03-04 17:19:52.309: I/mono(10867):   at Java.Lang.Thread+RunnableImplementor.Run () [0x00000] in <filename unknown>:0 
03-04 17:19:52.309: I/mono(10867):   at Java.Lang.IRunnableInvoker.n_Run (IntPtr jnienv, IntPtr native__this) [0x00000] in <filename unknown>:0 
03-04 17:19:52.309: I/mono(10867):   at (wrapper dynamic-method) object:d2d2e39c-084a-4054-bd81-e7b0e4dea7ac (intptr,intptr)
Comment 2 randyficker 2013-04-13 15:35:18 UTC
I'm getting this error too. I'm running MFA 4.6, targetting Android 4.2, and referencing OpenTK-1.0.dll.
Comment 3 Roman Margolis 2013-07-17 20:37:10 UTC
Me three. App will randomly crush with same stacktrace.
Could be seconds from load, or minutes.

There are many old references to this issue in IOS and android
https://bugzilla.xamarin.com/show_bug.cgi?id=1366
https://bugzilla.xamarin.com/show_bug.cgi?id=2422

I'm running on Xamarin Studio 4.0.9, Xamarin.Android 4.6.8.
using OpenTK-1.0
Comment 4 Brendan Zagaeski (Xamarin Team, assistant) 2013-09-13 15:32:33 UTC
Update from a user:

The cause of this issue seems to be a disagreement between `OpenTK.Platform.Android.AndroidGameView.RunIteration` and `OpenTK.FrameEventArgs.Time`.

Specifically, OpenTK.Platform.Android.AndroidGameView.RunIteration() allows 0.0 when it sets the Time property:

this.updateEventArgs.Time = ((totalSeconds >= 0.0) ? totalSeconds : 0.0);


... but OpenTK.FrameEventArgs.Time throws an exception if the new value is 0.0:

if (value <= 0.0)
{
	throw new ArgumentOutOfRangeException ();
}



## Version information

Checked on Xamarin.Android 4.8.3. The inconsistency is only present for OpenTK-1.0. In OpenTK 0.9.9.3, OpenTK.FrameEventArgs.Time has: `if (value < 0.0)`
Comment 5 Grigory (Playtika) 2014-01-23 04:15:16 UTC
Guy, what the hell ? 
We have to patch OpenTk library every release and change one instruction ? 
Is it so difficult to fix that ?

Huge money are paid to you for support...
Comment 6 Grigory (Playtika) 2014-01-23 04:15:33 UTC
Fix that please ASAP
Comment 7 Radek Doulik 2014-01-23 11:42:00 UTC
This should be now fixed and will be part of the next alpha release.
Comment 8 Mohit Kheterpal 2014-06-03 09:00:59 UTC
I have tried to verify this issue. But I am not sure about the steps.

Could you please provide some steps? so that I can verify this issue.

Thanks.