Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

vbnc crash when attempting to load an complex ASP.net generic handler through Apache and mod_mono #33

Open
rolfbjarne opened this issue May 22, 2018 · 0 comments

Comments

@rolfbjarne
Copy link
Member

rolfbjarne commented May 22, 2018

Submitted by a community member on 2012-10-27 15:46 UTC

MessHall.bug.tar.gz

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 &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.BinaryAddExpression..ctor (vbnc.ParsedObject Parent, vbnc.Expression LExp, vbnc.Expression RExp) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParsePlusMinus (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseConcat (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseBitshift (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseComparison (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseNot (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseAnd_AndAlso (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseOr_OrElse_Xor (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseExpression (vbnc.ParsedObject Parent) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseBoundList (vbnc.ParsedObject Parent) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseArraySizeInitializationModifer (vbnc.ParsedObject Parent) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseArrayNameModifier (vbnc.ParsedObject Parent) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseArrayCreationExpression (vbnc.ParsedObject Parent) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseNewExpression (vbnc.ParsedObject Parent) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseIdentifier (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseExponent (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseUnaryPlusMinus (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseMultDiv (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseIntDiv (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseMod (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParsePlusMinus (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseConcat (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseBitshift (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseComparison (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseNot (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseAnd_AndAlso (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseOr_OrElse_Xor (vbnc.ExpressionParseInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseExpression (vbnc.ParsedObject Parent) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseThrowStatement (vbnc.ParsedObject Parent) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseCodeBlock (vbnc.ParsedObject Parent, Boolean IsOneLiner) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseCatchStatement (vbnc.ParsedObject Parent, Boolean IsOneLiner) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseTryStatement (vbnc.ParsedObject Parent, Boolean IsOneLiner) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseCodeBlock (vbnc.ParsedObject Parent, Boolean IsOneLiner) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseIfStatement (vbnc.ParsedObject Parent, Boolean IsOneLiner) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseCodeBlock (vbnc.ParsedObject Parent, Boolean IsOneLiner) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseTryStatement (vbnc.ParsedObject Parent, Boolean IsOneLiner) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseCodeBlock (vbnc.ParsedObject Parent, Boolean IsOneLiner) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseSubDeclaration (vbnc.TypeDeclaration Parent, vbnc.ParseAttributableInfo Info) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseTypeMembers (vbnc.TypeDeclaration Parent) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseClassDeclaration (vbnc.ParsedObject Parent, vbnc.Attributes Attributes, System.String Namespace) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseTypeDeclaration (vbnc.ParsedObject Parent, vbnc.Attributes Attributes, System.String Namespace) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseAssemblyMembers (vbnc.AssemblyDeclaration Parent, System.String RootNamespace) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.ParseAssemblyDeclaration (System.String RootNamespace, vbnc.AssemblyDeclaration assembly) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Parser.Parse (System.String RootNamespace, vbnc.AssemblyDeclaration assembly) [0x00000] in &amp;lt;filename unknown&amp;gt;:0 
  at vbnc.Compiler.Compile_Parse () [0x00000] in &amp;lt;filename unknown&amp;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&#64;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.


Xamarin Bugzilla comment 1 by Rolf Bjarne Kvinge [MSFT] on 2012-10-29 09: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


Reference: https://bugzilla.xamarin.com/show_bug.cgi?id=8033

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant