[Mono-bugs] [Bug 444817] New: Incorrect line number given in exception report

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Nov 13 15:51:23 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=444817


           Summary: Incorrect line number given in exception report
           Product: Mono: Compilers
           Version: SVN
          Platform: i386
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Basic
        AssignedTo: rkvinge at novell.com
        ReportedBy: ciaran at ciarang.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Exhibit A - the first couple of lines of an exception report:

/home/ciaran/l/<MyGenerator> (1,1) : Error VBNC99999: Unexpected error: There
has been an internal error in the compiler.
  at vbnc.ExternalSubDeclaration.ResolveMember (vbnc.ResolveInfo Info)
[0x0013d] in
/home/ciaran/mono/mono-basic/vbnc/vbnc/source/Members/ExternalSubDeclaration.vb:118 

Exhibit B - the relevant source code:

    Public Overrides Function ResolveMember(ByVal Info As ResolveInfo) As
Boolean
        Dim result As Boolean = True

        result = MyBase.ResolveMember(Info) AndAlso result

        Dim attrib As New Attribute(Me)
        attrib.ResolvedType =
Compiler.TypeCache.System_Runtime_InteropServices_DllImportAttribute
       
attrib.AttributeArguments.PositionalArgumentList.Add(m_LibraryClause.StringLiteral.StringLiteral)
       
attrib.AttributeArguments.VariablePropertyInitializerList.Add("EntryPoint",
Name)
       
attrib.AttributeArguments.VariablePropertyInitializerList.Add("SetLastError",
True)
        Select Case m_CharsetModifier
            Case KS.Auto
               
attrib.AttributeArguments.VariablePropertyInitializerList.Add("CharSet",
System.Runtime.InteropServices.CharSet.Auto)
            Case KS.Unicode
               
attrib.AttributeArguments.VariablePropertyInitializerList.Add("CharSet",
System.Runtime.InteropServices.CharSet.Unicode)
            Case KS.Ansi
               
attrib.AttributeArguments.VariablePropertyInitializerList.Add("CharSet",
System.Runtime.InteropServices.CharSet.Ansi)
            Case Else
                Throw New InternalException
        End Select
        Me.CustomAttributes.Add(attrib)

        Return result
    End Function

The line 118 referred to in the exception report is 'Return result'. However,
the origin of the exception can't be there - presumably it's 'Throw New
InternalException', i.e. line 114. I am reasonably sure that .NET would
generate the correct line number for this.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list