Git Product home page Git Product logo

Comments (11)

yfakariya avatar yfakariya commented on July 18, 2024

Thank you for your report and suggestion.

I tested with Mono 2.8.10 and it was fine, but didn't do with 3.0.x. I'll investigate and fix this issue.

In addition, I agree that MsgPack.dll should be unified for .NET Framework and Mono. The difference is little performance optimization as you see except some unit test code does not work on Mono because of it uses minor Code Access Security API.

from msgpack-cli.

Algorithman avatar Algorithman commented on July 18, 2024

Wow, you're fast :)

Thanks four your work on this phenomenal project!

from msgpack-cli.

yfakariya avatar yfakariya commented on July 18, 2024

I tried Mono 3.0.6 on Windows, and TypeInitializationException was not thrown.
Would you tell me actual version/platform when you faced this issue? Or, would you give me a stack trace when you repro this issue? I'm afraid this issue is MacOS platform specific because I don't have mac.

from msgpack-cli.

Algorithman avatar Algorithman commented on July 18, 2024

It was a openSuse 13.1 XFCE with the mono-complete packet installed

from msgpack-cli.

Algorithman avatar Algorithman commented on July 18, 2024

Stacktrace:
System.TypeInitializationException: An exception was thrown by the type initializer for MsgPack.MessagePackString ---> System.Exception: The requested feature is not implemented.
at System.Reflection.MethodBase.get_IsSecuritySafeCritical () [0x00000] in /home/abuild/rpmbuild/BUILD/mono-3.0.6/mcs/class/corlib/System.Reflection/MethodBase.cs:269
at MsgPack.MessagePackString..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
at MsgPack.MessagePackObject..ctor (System.String value) [0x00000] in :0
at MsgPack.MessagePackObject.FromObject (System.Object boxedValue) [0x00000] in :0
at testmsgpack.MainClass.Main (System.String[] args) [0x00001] in /home/chris/testmsgpack/testmsgpack/Main.cs:11

Main method pretty much has one line in it: MessagePackObject.FromObject("test")

from msgpack-cli.

yfakariya avatar yfakariya commented on July 18, 2024

I remember that it is known mono issue when I saw your stack trace. Mono does not fully implement Code Access Security API, so MessagePackString does not determine security restriction that whether it can use memcpy native function or not.

Would you ensure that you compile MsgPack.dll from MsgPack.mono.sln or just specifying compiler constants "Mono"?

from msgpack-cli.

Algorithman avatar Algorithman commented on July 18, 2024

It works fine with the MsgPack.mono.sln. I get the error only with the NuGet package 0.4.0.

from msgpack-cli.

yfakariya avatar yfakariya commented on July 18, 2024

Sorry, I misunderstood your edit "Works fine with your source compiled into my project."

from msgpack-cli.

Algorithman avatar Algorithman commented on July 18, 2024

Sorry for the late answer.
I think this can be closed. I should have read your wiki pages more carefully, it clearly states that on mono it needs to be built.

from msgpack-cli.

yfakariya avatar yfakariya commented on July 18, 2024

I unified Mono source on 0.5 line except some unit testing codes which are not available in Mono because of API incompatibilities.

https://github.com/msgpack/msgpack-cli/tree/0.5

Thank you for your suggestion.

from msgpack-cli.

yfakariya avatar yfakariya commented on July 18, 2024

Close because 0.5.0 support it.

from msgpack-cli.

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.