Forums

-v (verbose) Crashes Compiler

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

-v (verbose) Crashes Compiler

Postby drissel » Tue Nov 22, 2011 1:03 pm

Windows XP, msys, MinGW, newbie at the helm ... program copied from Cobra getting started ... compiled ok w/o -v then see triple quoted section after the code.
Regards,
Bill Drissel
Grand Prairie, TX, USA


class Fib

def compute(count as int) is shared # ?? global
a, b = 0, 1
for i in count
print b
a, b = b, a + b

class Program

def main
Fib.compute(10)


"""

$ cobra 992-compute.cobra -v
Cobra Command Line 0.8.0 post-release
Copyright (C) 2003-2011 by Cobra Language LLC.

OS Version: Microsoft Windows NT 5.1.2600 Service Pack 3
CLR Platform: .NET
CLR Version: 2.0.50727.3625
Current Directory: c:\Program Files\Cobra\Cobra-2010-10-18\HowTo
Current Exe: c:\Cobra\Cobra-0.8.0-post\bin\cobra.exe
Option Dictionary:
verbosity: 1
back-end: 'none'
contracts: 'inline'
correct-source: Set<of String>['none']
debugging-tips: true
embed-run-time: false
include-asserts: true
include-nil-checks: true
include-tests: true
include-traces: true
native-compiler: 'auto'
number: 'decimal'
test-runner: 'Cobra.Lang.CobraCore.runAllTests'
testify-results: 'r-testify'
Paths:
992-compute.cobra
Phase: Binding Cobra run-time library
Adding reference to Cobra.Lang.dll
Phase: Reading libraries
Reading assembly: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
at: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
Reading assembly: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
at: C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll
Loading reference: Cobra.Lang.dll
Reading assembly: Cobra.Lang, Version=0.8.0.1, Culture=neutral, PublicKeyToken=0a4783a5c7c9616e
at: C:\WINDOWS\assembly\GAC_MSIL\Cobra.Lang\0.8.0.1__0a4783a5c7c9616e\Cobra.Lang.dll
Phase: Parsing source code
Phase: Binding use directives
Phase: Binding inheritance
Phase: Binding interface
Phase: Computing matching base members
Phase: Binding implementation
Phase: Identifying .main
Phase: Generating C# code
Phase: Compiling C# code
Compiling to produce 992-compute.exe
Deleting intermediate files.
Phase: Checking if a default number type should be suggested
Running: 992-compute
An unhandled exception has occurred.

Cobra debugging tips:
To get file name and line number information for the stack frames, use:
cobra -debug foo.cobra
To get a post-mortem, HTML-formatted report with more details about your objects:
cobra -debug -exception-report foo.cobra
For even more information, try:
cobra -debug -exception-report -detailed-stack-trace foo.cobra
Or use the abbreviations:
cobra -d -er -dst foo.cobra


Unhandled Exception: System.IO.IOException: The handle is invalid.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded)
at System.Console.get_BufferWidth()
at CommandLine.get_VerboseLineSeparator()
at CommandLine.DoRun(List`1 paths)
at CommandLine.Run(List`1 args)
at CommandLine.Run()
at CobraMain.Main()
(null)


"""
drissel
 
Posts: 2

Re: -v (verbose) Crashes Compiler

Postby Charles » Tue Nov 22, 2011 9:44 pm

That's a new one. You may be the first person running Cobra on Windows+MinGW+msys. I'm unable to reproduce (without installing MinGW), but have checked in a fix nonetheless: changeset:2627
Charles
 
Posts: 2515
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: No registered users and 36 guests