Bug 41802 - Unexpected "failed to get 100ns ticks" in program output (mono-4.4.0.142,Windows)
Summary: Unexpected "failed to get 100ns ticks" in program output (mono-4.4.0.142,Wind...
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
Version: 4.4.0 (C7)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: johan.lorensson
URL:
Depends on:
Blocks:
 
Reported: 2016-06-14 15:04 UTC by Andrey Akinshin
Modified: 2017-10-26 13:38 UTC (History)
5 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 GitHub or Developer Community 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 Andrey Akinshin 2016-06-14 15:04:45 UTC
*** Repro ***

using System;
using System.CodeDom.Compiler;
using Microsoft.CSharp;

namespace MyApplication
{
    class Program
    {
        static void Main()
        {
            var src = @"public class MyClass { public string Execute() { return ""Hooray!""; } }";
            var result = new CSharpCodeProvider()
                .CompileAssemblyFromSource(new CompilerParameters {GenerateInMemory = true}, src);
            var type = result.CompiledAssembly.GetType("MyClass");            
            var instance = Activator.CreateInstance(type);
            var method = type.GetMethod("Execute");
            var hooray = method.Invoke(instance, null);
            Console.WriteLine(hooray);
        }
    }
}

*** Expected Results ***
Hooray!

*** Actual Results ***
failed to get 100ns ticks
failed to get 100ns ticks
failed to get 100ns ticks
failed to get 100ns ticks
Hooray!

*** Environment ***
Windows 10 (Microsoft Windows [Version 10.0.10586])
mono-4.4.0.142 (downloaded from http://download.mono-project.com/archive/4.4.0/windows-installer/mono-4.4.0.142-gtksharp-2.12.38-win32-0.msi)
Comment 1 Nathan Phillip Brink (binki) 2016-08-03 19:01:44 UTC
Maybe it’s fixed in https://github.com/mono/mono/commit/cfc1228c9ba5c89188785332bf29af9183d34a43 which isn’t in mono-4.4.2.11 but is in mono-4.6.0.125.

I also see this message when running the bundled nuget in mono-4.4.1 amd64.
Comment 2 Jon Purdy 2016-09-07 18:35:47 UTC
Repro’d with 4.4 and confirmed fixed in 4.6. We should probably backport it; assigning Johan.
Comment 3 johan.lorensson 2017-10-26 13:38:27 UTC
Closing this out since it was fixed 1.5 years ago and no urgent need to backport to old releases.