zoukankan      html  css  js  c++  java
  • MonoSymbolFileException in CheckLineNumberTable

    Mono.CompilerServices.SymbolWriter.MonoSymbolFileException: Exception of type 'Mono.CompilerServices.SymbolWriter.MonoSymbolFileException' was thrown.
    at Mono.CompilerServices.SymbolWriter.MethodEntry.CheckLineNumberTable (Mono.CompilerServices.SymbolWriter.LineNumberEntry[] line_numbers) [0x00000] in <filename unknown>:0
    at Mono.CompilerServices.SymbolWriter.MethodEntry..ctor (Mono.CompilerServices.SymbolWriter.MonoSymbolFile file, Mono.CompilerServices.SymbolWriter.CompileUnitEntry comp_unit, Int32 token, Mono.CompilerServices.SymbolWriter.ScopeVariable[] scope_vars, Mono.CompilerServices.SymbolWriter.LocalVariableEntry[] locals, Mono.CompilerServices.SymbolWriter.LineNumberEntry[] lines, Mono.CompilerServices.SymbolWriter.CodeBlockEntry[] code_blocks, System.String real_name, Flags flags, Int32 namespace_id) [0x00000] in <filename unknown>:0
    at Mono.CompilerServices.SymbolWriter.SourceMethodBuilder.DefineMethod (Mono.CompilerServices.SymbolWriter.MonoSymbolFile file, Int32 token) [0x00000] in <filename unknown>:0
    at Mono.CompilerServices.SymbolWriter.SourceMethodBuilder.DefineMethod (Mono.CompilerServices.SymbolWriter.MonoSymbolFile file) [0x00000] in <filename unknown>:0
    at Mono.CompilerServices.SymbolWriter.MonoSymbolWriter.WriteSymbolFile (Guid guid) [0x00000] in <filename unknown>:0
    at Mono.Cecil.Mdb.MdbWriter.Dispose () [0x00000] in <filename unknown>:0
    at Mono.Cecil.ModuleWriter.Write (Mono.Cecil.ModuleDefinition module, Disposable`1 stream, Mono.Cecil.WriterParameters parameters) [0x00000] in <filename unknown>:0
    at Mono.Cecil.ModuleWriter.WriteModule (Mono.Cecil.ModuleDefinition module, Disposable`1 stream, Mono.Cecil.WriterParameters parameters) [0x00000] in <filename unknown>:0
    at Mono.Cecil.ModuleDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x00000] in <filename unknown>:0
    at Mono.Cecil.AssemblyDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x00000] in <filename unknown>:0

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    暖更新IL注入抛错, 但是只在Release编译上出现, Dev版本没问题. 看到是写Assembly时检查代码行出了错. 怀疑是部分代码导致的, 根据二分法, 不断定位出错的注入类型, 定位到一个类. 打开后发现有这样的函数:

    bool XXX()

    {

      return false;

      CodeLine....

    }

    看起来是这个函数的处理逻辑废弃了, 直接return 了false. 下面的代码行作废, 但是没有注释掉.

    根据异常源自代码行校验, 判断是该函数的IL注入异常导致的写入Assembly错误. 

    把return false后的CodeLine全部注释后, 果然没有了异常. 

    结论: IL注入逻辑没有处理好这种特殊的代码. dev版本和release版本的编译在这种代码上有区别(可以打开IL确认)

  • 相关阅读:
    【力扣】两个数组的交集
    【编译原理课程设计】词法分析程序设计
    【力扣14】最长公共前缀
    【力扣20】有效的括号
    【力扣26】删除排序数组中的重复项
    【力扣13】罗马数字转整数
    【力扣9】回文数
    【力扣7】整数反转
    【力扣1】两数之和
    golang micro client 报错500 {"id":"go.micro.client","code":408,"detail":"call timeout: context deadline exceeded","status":"Request Timeout"}
  • 原文地址:https://www.cnblogs.com/wmalloc/p/11589210.html
Copyright © 2011-2022 走看看