question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception: System.Exception

See original GitHub issue

Area of Cosmos - What area of Cosmos are we dealing with?

Editing the kernel.cs file, using functions like DateTime.Now.ToString(), et cetera.

Expected Behaviour - What do you think that should happen?

Console should print the date and time

Actual Behaviour - What unexpectedly happens?

Exception: System Exception

Reproduction - How did you get this error to appear?

By using DateTime.Now.ToString() and Math.Pow()

Version - Were you using the User Kit or Dev Kit? And what User Kit version or Dev Kit commit (Cosmos, IL2CPU, X#)?

Devkit commit 2c14f60 image

Error Log: 1>------ Build started: Project: Apokalipse, Configuration: Debug Any CPU ------ 1>Apokalipse -> C:\Users\Chandra\source\repos\Apokalipse\Apokalipse\bin\Debug\netcoreapp2.0\cosmos\Apokalipse.dll 1>Message: Executing IL2CPU on assembly 1>Message: Kernel Base: Cosmos.System.Kernel 1>Message: Checking target assembly: C:\Users\Chandra\source\repos\Apokalipse\Apokalipse\bin\Debug\netcoreapp2.0\cosmos\Apokalipse.dll 1>IL2CPU : error : Exception: System.Exception: 1>Native code encountered, plug required. 1> DO NOT REPORT THIS AS A BUG. 1> Please see http://www.gocosmos.org/docs/plugs/missing/ 1> Need plug for: System.Void System.Threading.Interlocked._CompareExchange(System.TypedReference, System.TypedReference, System.Object). 1> Called from : 1>System.Threading.Interlocked::System.Globalization.NumberFormatInfo CompareExchange[NumberFormatInfo](System.Globalization.NumberFormatInfo ByRef, System.Globalization.NumberFormatInfo, System.Globalization.NumberFormatInfo) 1>System.Globalization.CultureInfo::System.Globalization.NumberFormatInfo get_NumberFormat() 1>System.Globalization.CultureInfo::System.Object GetFormat(System.Type) 1>System.Globalization.DateTimeFormatInfo::System.Globalization.DateTimeFormatInfo get_CurrentInfo() 1>System.DateTime::System.String ToString(System.String) 1>Apokalipse.Kernel::Void Run() 1>Cosmos.System.Kernel::Void Run() 1> 1> 1> at Cosmos.IL2CPU.ILScanner.ScanMethod(MethodBase aMethod, Boolean aIsPlug, String sourceItem) in E:\Cosmos\IL2CPU\source\Cosmos.IL2CPU\ILScanner.cs:line 616 1> at Cosmos.IL2CPU.ILScanner.ScanQueue() in E:\Cosmos\IL2CPU\source\Cosmos.IL2CPU\ILScanner.cs:line 769 1> at Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod, IEnumerable 1 plugsAssemblies) in E:\Cosmos\IL2CPU\source\Cosmos.IL2CPU\ILScanner.cs:line 260 1> at Cosmos.IL2CPU.CompilerEngine.Execute() in E:\Cosmos\IL2CPU\source\Cosmos.IL2CPU\CompilerEngine.cs:line 176 1>IL2CPU task took 00:00:03.1690537 1>Done building project "Apokalipse.csproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
fanoIcommented, Jun 22, 2018

@zarlo Math.Pow() is already plugged with - I think - the most efficient way to do it in software mode: https://github.com/CosmosOS/Cosmos/blob/master/source/Cosmos.System2_Plugs/System/MathImpl.cs#855

0reactions
zarlocommented, Jun 22, 2018

my Math.Pow() is the best


int pow(int x, int y)
{

    if(y = 1)
    {
        return 0;
    }
    
    if(y = 0)
    {
        return 1;
    }
    
    int output = x;
    
    for(int count = y; count < y ; count++)
    {
        output = output * x;
    }
    
    return output;
}


Read more comments on GitHub >

github_iconTop Results From Across the Web

Exception Class (System)
A system failure is a run-time error that cannot be handled programmatically in a meaningful way. For example, any method can throw an...
Read more >
SystemException Class (System)
This class is provided as a means to differentiate between system exceptions and application exceptions. It is the base class of such exceptions...
Read more >
%Exception.SystemException - InterSystems IRIS Data ...
The %Exception.SystemException class provides access to information about the most recent system error. It is the type of object assigned to the CATCH...
Read more >
Understanding the .NET System.Exception Class
An exception is a runtime error in a program that violates a system or application constraint, or a condition that is not expected...
Read more >
Complete List of Exception Class in C#
System Exception is predefined Exception class in C# that is ready to use in programming. Just choose which exception may occur in your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found