using System;
using System.IO;
using WasmerSharp; // 0.7.0
public class Program
{
static void Main()
{
var mem = Memory.Create(minPages: 1, maxPages: 3); // run with maxPages of 3, then re-run with 2
var memImport = new Import("env", "mem", mem);
var wasm = File.ReadAllBytes("run_me.wasm");
var inst = new Instance(wasm, memImport);
foreach (var exp in inst.Exports)
{
Console.WriteLine("name: '{0}', kind: '{1}'", exp.Name, exp.Kind); // line 16
}
}
}
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
at System.Text.UTF8Encoding.GetCharCount (System.Byte* bytes, System.Int32 count, System.Text.DecoderNLS baseDecoder) [0x000ff] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/Text/UTF8Encoding.cs:1418
at System.String.CreateStringFromEncoding (System.Byte* bytes, System.Int32 byteLength, System.Text.Encoding encoding) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/String.cs:484
at System.Text.Encoding.GetString (System.Byte* bytes, System.Int32 byteCount) [0x00033] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/text/encoding.cs:1366
at WasmerSharp.WasmerByteArray.ToString () [0x0003f] in <d3625c313af7497fafb9fb2a435e5680>:0
at WasmerSharp.Export.get_Name () [0x0000c] in <d3625c313af7497fafb9fb2a435e5680>:0
at Program.Main () [0x00051] in wasm-in-dotnet-frmwrk/src/Program.cs:16
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
at System.Text.UTF8Encoding.GetCharCount (System.Byte* bytes, System.Int32 count, System.Text.DecoderNLS baseDecoder) [0x000ff] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/Text/UTF8Encoding.cs:1418
at System.String.CreateStringFromEncoding (System.Byte* bytes, System.Int32 byteLength, System.Text.Encoding encoding) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/String.cs:484
at System.Text.Encoding.GetString (System.Byte* bytes, System.Int32 byteCount) [0x00033] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/text/encoding.cs:1366
at WasmerSharp.WasmerByteArray.ToString () [0x0003f] in <d3625c313af7497fafb9fb2a435e5680>:0
at WasmerSharp.Export.get_Name () [0x0000c] in <d3625c313af7497fafb9fb2a435e5680>:0
at Program.Main () [0x00051] in wasm-in-dotnet-frmwrk/src/Program.cs:16
System Information