Bug 2669 - Last vbnc doesn't work with last stable or git
Summary: Last vbnc doesn't work with last stable or git
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: VisualBasic ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2011-12-28 13:27 UTC by Jorge Bastos
Modified: 2012-07-16 11:22 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Jorge Bastos 2011-12-28 13:27:33 UTC
Howdy,

Since last versions, vbnc with profile 4.0 doesn't work.
A simple:

---
<%@ Page Language="VB" %>
<script runat="server">
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        lblVersion.Text = "Your server is running ASP.NET and the version is " & System.Environment.Version.ToString()
    End Sub
</script>

<html>
<head>
    <title>ASP.NET Version</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:Label ID="lblVersion" runat="server"></asp:Label>
    </form>
</body>
</html>
---

Produces this error using xsp4 directly, or with mod_mono:

http://pastebin.com/YqvVASR9

I think the vbnc need's an update to work with the latest mono, maybe 'cause of that uninitialized reference/object:

vbnc: Command line : error VBNC99999: Unexpected error: Object reference not set to an instance of an object

What can I do?
Comment 1 Jorge Bastos 2011-12-28 13:31:52 UTC
Forgot to say, compiling a simple code from the console results in the same error:


---
Imports System

' This module houses the application's entry point.
Public Module modmain
   ' Main is the application's entry point.
   Sub Main()
     ' Write text to the console.
     Console.WriteLine ("Hello World using Visual Basic!")
   End Sub
End Module
---
Comment 2 Jorge Bastos 2011-12-28 13:37:34 UTC
Forgot one other thing, not so important but with it's own importance.

After compiling the script file:

/usr/local/bin/vbnc

doesn't include the SDK directory, and stays with:

--
#!/bin/sh
exec mono --debug $MONO_OPTIONS /usr/local/lib/mono/4.0/vbnc.exe "$@"
--

I've added manually the SDK dir to avoid the file not found problem:

--
vbnc k.vb
Visual Basic.Net Compiler version 0.0.0.5943 (Mono 2.11 - master/6bb2ca6)
Copyright (C) 2004-2010 Rolf Bjarne Kvinge. All rights reserved.

vbnc: Command line : error VBNC2017: The library 'Microsoft.VisualBasic.dll' could not be found.
There were 1 errors and 0 warnings.
Compilation took 00:00:00.1185510
--

with:

--
#!/bin/sh
exec mono --debug $MONO_OPTIONS /usr/local/lib/mono/4.0/vbnc.exe /sdkpath:/usr/local/lib/mono/4.0/ "$@"
--
Comment 3 Rolf Bjarne Kvinge [MSFT] 2012-07-04 19:26:32 UTC
Fixed (master: 36ac5b635aaeaca285dbc4519e4ebdf83156711f).
Comment 4 Jorge Bastos 2012-07-14 16:19:53 UTC
Howdy,

For some reason I still have some exeptions using this with mod_mono.
I'm not sure if this errors are from vbnc now or XSP.
I don't see any update for md_mono and xsp for about 2 years.


--
  at Mono.WebServer.BaseApplicationHost.EndOfRequest (Mono.WebServer.MonoWorkerRequest mwr) [0x00000] in <filename unknown>:0
  at Mono.WebServer.ModMonoApplicationHost.ProcessRequest (Int32 reqId, System.String verb, System.String queryString, System.String path, System.String protocol, System.String localAddress, Int32 serverPort, System.String remoteAddress, Int32 remotePort, System.String remoteName, System.String[] headers, System.String[] headerValues, System.Object worker) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) Mono.WebServer.ModMonoApplicationHost:ProcessRequest (int,string,string,string,string,string,int,string,int,string,string[],string[],object)
  at Mono.WebServer.ModMonoWorker.InnerRun (System.Object state) [0x00000] in <filename unknown>:0
  at Mono.WebServer.ModMonoWorker.Run (System.Object state) [0x00000] in <filename unknown>:0
  at Mono.WebServer.BaseApplicationHost.EndOfRequest (Mono.WebServer.MonoWorkerRequest mwr) [0x00000] in <filename unknown>:0
  at Mono.WebServer.ModMonoApplicationHost.ProcessRequest (Int32 reqId, System.String verb, System.String queryString, System.String path, System.String protocol, System.String localAddress, Int32 serverPort, System.String remoteAddress, Int32 remotePort, System.String remoteName, System.String[] headers, System.String[] headerValues, System.Object worker) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) Mono.WebServer.ModMonoApplicationHost:ProcessRequest (int,string,string,string,string,string,int,string,int,string,string[],string[],object)
  at Mono.WebServer.ModMonoWorker.InnerRun (System.Object state) [0x00000] in <filename unknown>:0
  at Mono.WebServer.ModMonoWorker.Run (System.Object state) [0x00000] in <filename unknown>:0
--
Comment 5 Rolf Bjarne Kvinge [MSFT] 2012-07-16 11:22:12 UTC
Jorge, what's the exact error you're getting? The stack trace by itself doesn't reveal much.