Comments (3)
嗯,这里返回-1说明函数已经执行完,但是报了异常,非正常退出,异常信息会存在exc内(也就是c#的Exception对象),跟进后面check_mono_exception内会有详细的信息和堆栈,如果方便可以把这些信息发下。
这种情况往往是dll依赖没有加载成功,也可能是绑定代码不匹配,导致调用接口时抛异常,绑定代码会在导出工程时重新生成,Unity版本也提供下,我这调试下看看。
另外文档我会抽空完善下,因为最近在换工作,所以这边耽误了,抱歉。
from purescript.
dll依赖说的是ScriptEngine.dll依赖mono-2.0-sgen.dll吧,这个开始也让我找了一段时间,后来用depends查了之后把mono-2.0-sgen.dll拷到ScriptEngine.dll的目录就行了。然后在找不到依赖时我还尝试了用ScriptEngine.dll静态链接libmono-static-sgen.lib也就不用依赖mono-2.0-sgen.dll,两种方式我都试过了。
然后还是会报错:
output_log.txt
看上去是调用到Adapter.wrapper.dll里的这句:
Type type = assembly.GetType("MonoEntry");
MethodInfo mi = type.GetMethod("Main");
时报的错,但是原因不明。
另外windows下能用interpret模式跑mono测试吗?我看现在还是用的jit,iOS的设置似乎也不能直接用到windows上。
Unity用的是2018.4.15
from purescript.
感谢反馈并认真排查问题,
@quicklyslow已经排查到了问题原因:
是因为 mono/mono@4a15e73 这个修改里面改了 StringToUtf8 对应的 c 实现和绑定,但是修改了 SafeStringMarshal.cs 之后, 如果对应的 mscorlib.dll 不修改的话,函数调用就对不上,于是就异常了。
目前已解决:
mono版本和mscorlib.dll有绑定关系,按Unity的习惯最好固定一个Mono版本和mscorlib.dll,后续如需升级mono,待测试过没问题再提交到此项目中,目前
mono-2.0-sgen.lib 已提交到ScriptEngine\lib目录
mono-2.0-sgen.dll 已提交到DemoProject * Plugins\PureScript\x86_64 目录
from purescript.
Related Issues (10)
- 新功能沟通 HOT 5
- MonoPInvokeCallbackAttribute会被strip
- class内定义的delegate如果作为此class的构造函数的参数传入,会导致生成的UnityBind有语法错误,并且wrapper class的处理也有误
- 在生成UnityBind时对generic delegate parameter进行UnBox没有展开非泛型的参数类型
- 如果classA继承自System及其子命名空间下的classB,那么classA无法继承自WObject,不能导出为wrapper class
- class的field不会导出在wrapper class中,如果这个field在mono内被引用,导出和构建过程不会有问题,但是运行之后才发现crash
- 请问支持Unity的版本有哪些呢? HOT 1
- 有没有什么交流群
- Google Play现在强制要求arm64,必须IL2CPP了 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from purescript.