GithubHelp home page GithubHelp logo

Comments (5)

pardeike avatar pardeike commented on September 23, 2024

I need more details. Add Harmony.DEBUG = true at the start and run it once. Then post the resulting harmony.log.txt from your Desktop.

from harmony.

651467417 avatar 651467417 commented on September 23, 2024

Harmony id=com.your.unique.id, version=2.3.3.0, location=C:\Users\KURO\Downloads\ConsoleApp1\ConsoleApp1\bin\Debug\net8.0\0Harmony.dll, env/clr=8.0.2, platform=Win32NT

Started from static System.Int32 Program::Main(System.String[] args), location C:\Users\KURO\Downloads\ConsoleApp1\ConsoleApp1\bin\Debug\net8.0\ConsoleApp1.dll

At 2024-05-21 09.34.51

Patch: static System.DateTime System.DateTime::get_UtcNow()

Replacement: static System.DateTime System.DateTime::System.DateTime.get_UtcNow_Patch1()

IL_0000: Local var 0: System.UInt64
IL_0000: Local var 1: System.UInt64
IL_0000: Local var 2:
IL_0000: Local var 3: System.DateTime/LeapSecondCache
IL_0000: Local var 4: System.UInt64
IL_0000: Local var 5: System.DateTime
IL_0000: ldloca 5 (System.DateTime)
IL_0004: initobj System.DateTime
IL_000A: // start original
IL_000A: ldsfld System.LeapSecondCache::s_pfnGetSystemTimeAsFileTime
IL_000F: stloc.2
IL_0010: ldloca.s 0 (System.UInt64)
IL_0012: conv.u
IL_0013: ldloc.2
IL_0014: calli System.Void modopt(System.Runtime.CompilerServices.CallConvSuppressGCTransition) (System.UInt64*)
IL_0019: ldloc.0
IL_001A: stloc.1
IL_001B: ldsfld System.Boolean System.LeapSecondCache::s_systemSupportsLeapSeconds
IL_0020: brfalse => Label0
IL_0025: ldsfld System.LeapSecondCache System.LeapSecondCache::s_leapSecondCache
IL_002A: stloc.3
IL_002B: ldloc.1
IL_002C: ldloc.3
IL_002D: ldfld System.UInt64 System.LeapSecondCache::OSFileTimeTicksAtStartOfValidityWindow
IL_0032: sub
IL_0033: stloc.s 4 (System.UInt64)
IL_0035: ldloc.s 4 (System.UInt64)
IL_0037: ldc.i4 -1294967296
IL_003C: conv.u8
IL_003D: bge.un => Label1
IL_0042: ldloc.3
IL_0043: ldfld System.UInt64 System.LeapSecondCache::DotnetDateDataAtStartOfValidityWindow
IL_0048: ldloc.s 4 (System.UInt64)
IL_004A: add
IL_004B: newobj System.Void System.DateTime::.ctor(System.UInt64 dateData)
IL_0050: br => Label2
IL_0055: Label1
IL_0055: call static System.DateTime System.DateTime::UpdateLeapSecondCacheAndReturnUtcNow()
IL_005A: br => Label3
IL_005F: Label0
IL_005F: ldloc.1
IL_0060: ldc.i8 5116597250427387904
IL_0069: add
IL_006A: newobj System.Void System.DateTime::.ctor(System.UInt64 dateData)
IL_006F: // end original
IL_006F: Label2
IL_006F: Label3
IL_006F: stloc 5 (System.DateTime)
IL_0073: ldloca 5 (System.DateTime)
IL_0077: call static System.Void Program::PostNow(System.DateTime& __result)
IL_007C: ldloc 5 (System.DateTime)
IL_0080: ret
DONE

here is harmony.log.txt

from harmony.

651467417 avatar 651467417 commented on September 23, 2024

it seems var2's type not get.
cause utcNow is a unsafe function. #

from harmony.

pardeike avatar pardeike commented on September 23, 2024

If a type cannot be used it usually means that your runtime is missing a dependency. That utcnow is unsafe has nothing to do with your problem. Either way this is not a bug in Harmony.

from harmony.

651467417 avatar 651467417 commented on September 23, 2024

thank u

from harmony.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.