You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code snippet crashes when run in both executable mode and as a shared library, being build for linux-bionic-arm with native aot.
var timer = new Timer(_ =>
{
}, null, TimeSpan.FromMilliseconds(60), Timeout.InfiniteTimeSpan);
The crash log;
Unhandled exception. System.ArgumentOutOfRangeException: period ('-10000') must be greater than or equal to '-1'. (Parameter 'period')
Actual value was -10000.
at System.ArgumentOutOfRangeException.ThrowLess[T](T, T, String) + 0x103
at System.ArgumentOutOfRangeException.ThrowIfLessThan[T](T, T, String) + 0x43
at System.Threading.Timer..ctor(TimerCallback, Object, TimeSpan, TimeSpan) + 0xdb
at Program.Main(String[] args) + 0x301
Using the Timer constructor that accepts a long as value for period works.
Configuration
Runtime version: 9.0.0-preview.4.24174.6
OS: Android 13
Arch: ARM on ARM64
Other information
Though not being able to reproduce, I also encounter a bug where (TimeSpan.Zero).TotalMilliseconds >= 0.0 is false. This is in a very large project, but doesn't happen in the repro provided above. The above repro is running on an ARM64 OS in ARM mode.
The text was updated successfully, but these errors were encountered:
Description
The following code snippet crashes when run in both executable mode and as a shared library, being build for linux-bionic-arm with native aot.
The crash log;
Reproduction Steps
Reproduction can be found here, https://github.com/emmauss/test-aot/blob/main/Program.cs
Publish with linux-bionic-arm as rid and run in termux.
Expected behavior
No crash.
Actual behavior
Crashes with the reported exception.
Regression?
No response
Known Workarounds
Using the Timer constructor that accepts a long as value for period works.
Configuration
Runtime version: 9.0.0-preview.4.24174.6
OS: Android 13
Arch: ARM on ARM64
Other information
Though not being able to reproduce, I also encounter a bug where
(TimeSpan.Zero).TotalMilliseconds >= 0.0
isfalse
. This is in a very large project, but doesn't happen in the repro provided above. The above repro is running on an ARM64 OS in ARM mode.The text was updated successfully, but these errors were encountered: