monodevelop 突然莫名其妙的将 warning 全部标记为 error
2015-12-03 17:54
549 查看
这是一个关于 monodevelop 的“坑”
我们在用 monodevelop 编译游戏脚本时, 通常会有一些警告,一般这些警告都是无害的,
不影响游戏运行。可是突然有一天, monodevelop 发神经将一些警告标记为错误,导致unity
无法运行游戏。查看 monodevelop 的输出信息, 发现以下信息:
Unhandled Exception:
Mono.CSharp.InternalErrorException: /Player/PlayerAnimationController.cs(89,17): <ErrorIllustration>c__Iterator39 ---> System.ArgumentException: Label not marked
at System.Reflection.Emit.ILGenerator.label_fixup () [0x00000] in <filename unknown>:0
at System.Reflection.Emit.MethodBuilder.fixup () [0x00000] in <filename unknown>:0
...
恩, ErrorIllustration 是我们自己写的一个函数, 查看一下该函数的代码
View Code
这里面有一段 unreachable code , 难道是这里出的问题?
尝试着把这段代码删除掉, monodevelop 居然恢复正常了,
看来如果携程中有一段 unreachable code, 将会导致 monodevelop 产生内部异常。
我们在用 monodevelop 编译游戏脚本时, 通常会有一些警告,一般这些警告都是无害的,
不影响游戏运行。可是突然有一天, monodevelop 发神经将一些警告标记为错误,导致unity
无法运行游戏。查看 monodevelop 的输出信息, 发现以下信息:
Unhandled Exception:
Mono.CSharp.InternalErrorException: /Player/PlayerAnimationController.cs(89,17): <ErrorIllustration>c__Iterator39 ---> System.ArgumentException: Label not marked
at System.Reflection.Emit.ILGenerator.label_fixup () [0x00000] in <filename unknown>:0
at System.Reflection.Emit.MethodBuilder.fixup () [0x00000] in <filename unknown>:0
...
恩, ErrorIllustration 是我们自己写的一个函数, 查看一下该函数的代码
IEnumerator ErrorIllustration () { yield return null; if ( false ) { yield return null; } yield break; }
View Code
这里面有一段 unreachable code , 难道是这里出的问题?
尝试着把这段代码删除掉, monodevelop 居然恢复正常了,
看来如果携程中有一段 unreachable code, 将会导致 monodevelop 产生内部异常。
相关文章推荐
- Remove Nth Node From End of List 从链表中删除倒数第N的节点
- Node.js 安装配置
- nodejs+express+jade创建新文件
- nodejs笔记杂谈
- Node.js 学习一(Node.js 安装)
- 开发日记——LastWord
- nodejs事件循环
- Node.js REPL(交互式解释器) Node.js 回调函数
- Zookeeper管理工具node-zk-browser
- How do I get started with Node.js
- Node.js 环境配置记录
- Notepad++ 配置 Node.js 开发环境
- node.js
- [Leetcode] Swap Nodes in Pairs
- Node.js + Express + Ubuntu
- Leetcode177: Count Complete Tree Nodes
- node js 调试
- nodeJs+jquery实现聊天插入表情功能
- leetcode 237 Delete Node in a Linked List C++
- 解决Jenkins自动构建nodejs项目无法完成的问题