Bug 8033 - vbnc crash when attempting to load an complex ASP.net generic handler through Apache and mod_mono
Summary: vbnc crash when attempting to load an complex ASP.net generic handler through...
Status: RESOLVED UPSTREAM
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: 2012-10-27 15:46 UTC by Maxthon Chan
Modified: 2018-05-22 12:15 UTC (History)
2 users (show)

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


Attachments
All files of my current project, version.ashx worked and produced valid plsts, but register.ashx crashed. (Everything worked under IIS.) (243.64 KB, application/gzip)
2012-10-27 15:46 UTC, Maxthon Chan
Details


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 UPSTREAM

Description Maxthon Chan 2012-10-27 15:46:38 UTC
Created attachment 2804 [details]
All files of my current project, version.ashx worked and produced valid plsts, but register.ashx crashed. (Everything worked under IIS.)

Description of Problem:
When I attempt to load an ASP.net generic handler written in vb.net, vbnc crashed. The problem causing file is slightly complex.

Steps to reproduce the problem:
1. Use the vendor package of mod_mono and Apache provided in Ubuntu 12.04 LTS repository and enable AutoHosting, leave configure files unchanged.
2. To use my example file, install MySql Connector/Net and CE.iPhone.PList assemblies into GAC (the CE.iPhone.PList could be found on Google Code)
3. Drop an ASP.net generic handler with some complexity into the website.

Actual Results:
vbnc crashed. Back trace as found on the resulting page:

[System.Web.HttpException]: Single file build failed.
  at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, Boolean debug) [0x00000] in <filename unknown>:0 
  at System.Web.Compilation.BuildManager.Build (System.Web.VirtualPath vp) [0x00000] in <filename unknown>:0 
  at System.Web.Compilation.BuildManager.GetCompiledType (System.Web.VirtualPath virtualPath) [0x00000] in <filename unknown>:0 
  at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath (System.Web.VirtualPath virtualPath, System.Type requiredBaseType) [0x00000] in <filename unknown>:0 
  at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath (System.String virtualPath, System.Type requiredBaseType) [0x00000] in <filename unknown>:0 
  at System.Web.UI.SimpleHandlerFactory.GetHandler (System.Web.HttpContext context, System.String requestType, System.String virtualPath, System.String path) [0x00000] in <filename unknown>:0 
  at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url, Boolean ignoreContextHandler) [0x00000] in <filename unknown>:0 
  at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url) [0x00000] in <filename unknown>:0 
  at System.Web.HttpApplication+<Pipeline>c__Iterator6.MoveNext () [0x00000] in <filename unknown>:0 
[System.Web.Compilation.CompilationException]: VBNC_CRASH: Visual Basic.Net Compiler version 0.0.0.5943
Copyright (C) 2004-2010 Rolf Bjarne Kvinge. All rights reserved.

/tmp/www-data-temp-aspnet-0/9e4aa5c1/App_Web_5430abd4_0.vb (67,1) : Error VBNC99999: vbnc crashed nearby this location in the source code.<br />Error : VBNC99999: Unexpected error: Object reference not set to an instance of an object<br />  at vbnc.BinaryExpression..ctor (vbnc.ParsedObject Parent, vbnc.Expression LExp, vbnc.Expression RExp) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.BinaryAddExpression..ctor (vbnc.ParsedObject Parent, vbnc.Expression LExp, vbnc.Expression RExp) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParsePlusMinus (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseConcat (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseBitshift (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseComparison (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseNot (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseAnd_AndAlso (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseOr_OrElse_Xor (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseExpression (vbnc.ParsedObject Parent) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseBoundList (vbnc.ParsedObject Parent) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseArraySizeInitializationModifer (vbnc.ParsedObject Parent) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseArrayNameModifier (vbnc.ParsedObject Parent) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseArrayCreationExpression (vbnc.ParsedObject Parent) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseNewExpression (vbnc.ParsedObject Parent) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseIdentifier (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseExponent (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseUnaryPlusMinus (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseMultDiv (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseIntDiv (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseMod (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParsePlusMinus (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseConcat (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseBitshift (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseComparison (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseNot (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseAnd_AndAlso (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseOr_OrElse_Xor (vbnc.ExpressionParseInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseExpression (vbnc.ParsedObject Parent) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseThrowStatement (vbnc.ParsedObject Parent) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseCodeBlock (vbnc.ParsedObject Parent, Boolean IsOneLiner) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseCatchStatement (vbnc.ParsedObject Parent, Boolean IsOneLiner) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseTryStatement (vbnc.ParsedObject Parent, Boolean IsOneLiner) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseCodeBlock (vbnc.ParsedObject Parent, Boolean IsOneLiner) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseIfStatement (vbnc.ParsedObject Parent, Boolean IsOneLiner) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseCodeBlock (vbnc.ParsedObject Parent, Boolean IsOneLiner) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseTryStatement (vbnc.ParsedObject Parent, Boolean IsOneLiner) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseCodeBlock (vbnc.ParsedObject Parent, Boolean IsOneLiner) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseSubDeclaration (vbnc.TypeDeclaration Parent, vbnc.ParseAttributableInfo Info) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseTypeMembers (vbnc.TypeDeclaration Parent) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseClassDeclaration (vbnc.ParsedObject Parent, vbnc.Attributes Attributes, System.String Namespace) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseTypeDeclaration (vbnc.ParsedObject Parent, vbnc.Attributes Attributes, System.String Namespace) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseAssemblyMembers (vbnc.AssemblyDeclaration Parent, System.String RootNamespace) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.ParseAssemblyDeclaration (System.String RootNamespace, vbnc.AssemblyDeclaration assembly) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Parser.Parse (System.String RootNamespace, vbnc.AssemblyDeclaration assembly) [0x00000] in &lt;filename unknown&gt;:0 
  at vbnc.Compiler.Compile_Parse () [0x00000] in &lt;filename unknown&gt;:0 <br />Compilation took 00:00:00.8448970

  at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath, System.CodeDom.Compiler.CompilerParameters options) [0x00000] in <filename unknown>:0 
  at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000] in <filename unknown>:0 
  at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Web.Compilation.BuildProviderGroup group, System.Web.VirtualPath vp, Boolean debug) [0x00000] in <filename unknown>:0 
  at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, Boolean debug) [0x00000] in <filename unknown>:0

Expected Results:
A correct page. As in my code, it should be an Apple property list file containing either an error message or an success confirmation. An example as following (generated on IIS):

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
	<dict>
		<key>errorMessage</key>
		<string>Username technix already taken. Please try login</string>
		<key>uploadData</key>
		<dict>
			<key>username</key>
			<string>technix</string>
			<key>password</key>
			<data>CKJ6c5s1nujPBGGn+3e8ipM3U903E9JMqS6eRHswlz+sdzyswf7VzNEXFtn9j545s3p1u0D30JaRhmR9WDvRhg==</data>
			<key>email</key>
			<string>xcvista@me.com</string>
		</dict>
	</dict>
</plist>

How often does this happen? 
The problem persists.

Additional Information:
Server environment:
OS: Ubuntu 12.04.1 LTS (32-bit) (uname: Linux version 3.2.0-32-generic-pae (buildd@roseapple) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #51-Ubuntu SMP Wed Sep 26 21:54:23 UTC 2012 -- Unix 3.2.0.32)
HTTPd: Apache/2.2.22 (Ubuntu) (vendor package)
Vendor package of Mono and mod_mono used.
The attachment is an tarball of everything I currently am working on and the script register.ashx crashed vbnc. All mentioned libraries that should be placed into GAC is included as well.

I am working on Windows but the website is deployed onto a Linux server.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2012-10-29 09:34:34 UTC
You seem to be using VB9/VB10 features (Mono's VB compiler only supports up to VB8/VS2005).

Error reporting has been improved though, so with the latest compiler I get these errors: https://gist.github.com/8833a98a219b7cc28bbb
Comment 2 Rolf Bjarne Kvinge [MSFT] 2018-05-22 12:15:17 UTC
Moved to: https://github.com/mono/mono-basic/issues/33