SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Unhandled Exception converting C# to VB...

Last post 11-13-2005 4:34 PM by Blue Ninja. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 11-12-2005 9:46 AM

    Unhandled Exception converting C# to VB...

    So there I was, playing with the Slider Puzzle sample that comes with the .NET Framework 2.0 SDK (this sample is for the Compact Framework), which is a C# sample, and it runs fine, Though I did find a bug in the MS code, even though I don't know C# (BoardForm.CS line 107, should be @"/" instead of @"\" apparently).

    Anyhow, I was playing around with the "Convert buffer C# to VB.NET". The Tile.cs and Puzzle.cs files converted fine, then I tried to convert the Boardform.cs file. This is the error that came up. As the exception window indicated, I figured you guys might like to know about it!


    .NET Version         : 2.0.50727.42
    OS Version           : Microsoft Windows NT 5.1.2600 Service Pack 2
    Current culture      : English (United States)
    Working Set Memory   : 55656kb
    SharpDevelop Version : 2.0.0.724

    Exception thrown:
    System.NullReferenceException: Object reference not set to an instance of an object.
       at ICSharpCode.NRefactory.Parser.CSharpToVBNetConvertVisitor.ConvertForStatement(ForStatement forStatement)
       at ICSharpCode.NRefactory.Parser.CSharpToVBNetConvertVisitor.ConvertForStatements()
       at ICSharpCode.NRefactory.Parser.CSharpToVBNetConvertVisitor.Visit(TypeDeclaration td, Object data)
       at ICSharpCode.NRefactory.Parser.AST.TypeDeclaration.AcceptVisitor(IASTVisitor visitor, Object data)
       at ICSharpCode.NRefactory.Parser.AST.AbstractNode.AcceptChildren(IASTVisitor visitor, Object data)
       at ICSharpCode.NRefactory.Parser.AbstractASTVisitor.Visit(NamespaceDeclaration namespaceDeclaration, Object data)
       at ICSharpCode.NRefactory.Parser.AST.NamespaceDeclaration.AcceptVisitor(IASTVisitor visitor, Object data)
       at ICSharpCode.NRefactory.Parser.AST.AbstractNode.AcceptChildren(IASTVisitor visitor, Object data)
       at ICSharpCode.NRefactory.Parser.AbstractASTVisitor.Visit(CompilationUnit compilationUnit, Object data)
       at ICSharpCode.SharpDevelop.Commands.VBConvertBuffer.Run()
       at ICSharpCode.Core.MenuCommand.OnClick(EventArgs e)
       at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
       at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
       at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
       at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
       at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
       at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ToolStrip.WndProc(Message& m)
       at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  • 11-13-2005 1:31 AM In reply to

    • MarkusPalme
    • Top 25 Contributor
    • Joined on 09-06-2005
    • Schwabmünchen, Germany
    • Posts 90
    • Team Members

    Re: Unhandled Exception converting C# to VB...

    Can you please post the code you tried to convert?
  • 11-13-2005 1:48 AM In reply to

    Re: Unhandled Exception converting C# to VB...

    Sure thing. I didn't bother originally, figuring everyone probably had the SDK stuff on the machines already.

    This is a ZIP of the project directory. Let me know if there's anything else I can do to help... My background is VB-heavy, but I'm picking up .NET and jumping ship from MS to SD at the same time - I do enjoy a good challenge :-)


    I can't see how to attach a file here, so I'll just link it:

    CS.zip

    EDIT: I don't know if it helps, but the online code converter in the blog (here) crashes also.
  • 11-13-2005 3:10 PM In reply to

    • MarkusPalme
    • Top 25 Contributor
    • Joined on 09-06-2005
    • Schwabmünchen, Germany
    • Posts 90
    • Team Members

    Re: Unhandled Exception converting C# to VB...

    This bug has been fixed in a recent version. Thanks for your report.
  • 11-13-2005 4:34 PM In reply to

    Re: Unhandled Exception converting C# to VB...

    Thanks for the bug report? More like thank YOU for #Develop :-)
    Just trying to do my little part!
Page 1 of 1 (5 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.