Xamarin forms app crashes for unknown reason - xamarin.forms

I have built a Xamarin forms app with PCL.
The application crashes sometimes for unknown reason : either while scrolling though any of the picker on some pages of the application or while resuming the app after some period of inactivity (may be after 10-15 mins).
I am using Crittercism to report crash logs. I am not getting any stack trace or crash log for this crashes.
Details
Xamarin Studio : 5.9.5(biuld 9)
Xamarin.iOS : Version: 8.10.4.46 (Enterprise Edition)
Xamarin.Android : Version: 5.1.5.3 (Enterprise Edition).
Note : When I was checking in debug mode with device connected : I got 2 kinds of crashes which says :
1.
at System.ThrowHelper.ThrowKeyNotFoundException () [0x00000] in /Users/builder/data/lanes/1977/2c66d2fe/source/mono/external/referencesource/mscorlib/system/throwhelper.cs:70
at System.Collections.Generic.Dictionary`2[System.String,Xamarin.Forms.AnimationExtensions+Info].get_Item (System.String key) [0x00000] in :0
at Xamarin.Forms.AnimationExtensions.HandleTweenerUpdated (System.Object o, System.EventArgs args) [0x00012] in :0
at Xamarin.Forms.Tweener.b__0 (Int64 step) [0x00037] in :0
at Xamarin.Forms.Ticker.SendSignals (Int32 timestep) [0x00063] in :0
at Xamarin.Forms.Platform.iOS.CADisplayLinkTicker.b__0 () [0x00000] in :0
at Foundation.NSActionDispatcher.Apply () [0x00000] in /Users/builder/data/lanes/1977/2c66d2fe/source/maccore/src/Foundation/NSAction.cs:56
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in /Users/builder/data/lanes/1977/2c66d2fe/source/maccore/src/UIKit/UIApplication.cs:63
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0001c] in /Users/builder/data/lanes/1977/2c66d2fe/source/maccore/src/UIKit/UIApplication.cs:46
at eRedbook.iOS.Application.Main (System.String[] args) [0x00008] in /Users/s.chandraganesh/Documents/TFS_New/eRedbook/Development/Source/Mobile/iOS/Main.cs:39
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
Please help me to narrow down this issue.

This should be fixed in Xamarin.Forms 1.5.1.6471. Which version are you running on? Upgrading may fix the issue.

Related

Xamarin forms: Plugin.LatestVersion.LatestVersionException: Error comparing current app version number with latest

I am getting the below exception from the Xam.Plugin.LatestVersion plugin on my xamarin forms app:
Plugin.LatestVersion.LatestVersionException: Error comparing current app version number with latest.
I found the same issue reported over here and here on GitHub. Also, the same issue is reported on the stack. I tried the solutions suggested on the above thread, but no luck.
I have updated my plugin version to the latest(2.1.0), but the same exception is showing. Any solution for this issue? The issue is only on the Android platform.
Update:
I have tried the 2.1.1-beta.107 version, now getting another exception.
Plugin.LatestVersion.LatestVersionException: Error parsing content from the Play Store. Url=play store url&hl=en. ---> Jurassic.JavaScriptException: TypeError: undefined cannot be converted to an object
at Jurassic.TypeConverter.ToObject (Jurassic.ScriptEngine engine, System.Object value, System.Int32 lineNumber, System.String sourcePath, System.String functionName) [0x00037] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0
at (wrapper dynamic-method) Jurassic.Compiler.MethodGenerator.anonymous(Jurassic.Compiler.ExecutionContext,object[])
at Jurassic.Library.UserDefinedFunction.CallLateBound (System.Object thisObject, System.Object[] argumentValues) [0x00014] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0
at Jurassic.Library.FunctionInstance.CallWithStackTrace (System.String path, System.String function, System.Int32 line, System.Object thisObject, System.Object[] argumentValues) [0x0000f] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0
at (wrapper dynamic-method) Jurassic.Compiler.MethodGenerator.anonymous(Jurassic.Compiler.ExecutionContext,object[])
at Jurassic.Library.UserDefinedFunction.CallLateBound (System.Object thisObject, System.Object[] argumentValues) [0x00014] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0
at Jurassic.Library.FunctionInstance.CallWithStackTrace (System.String path, System.String function, System.Int32 line, System.Object thisObject, System.Object[] argumentValues) [0x0000f] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0
at (wrapper dynamic-method) Jurassic.Compiler.MethodGenerator.eval(Jurassic.Compiler.ExecutionContext)
at Jurassic.Compiler.GlobalOrEvalMethodGenerator.Execute (Jurassic.ScriptEngine engine, Jurassic.Compiler.RuntimeScope parentScope, System.Object thisObject) [0x00030] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0
at Jurassic.ScriptEngine.Evaluate (Jurassic.ScriptSource source) [0x000a7] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0
at Jurassic.ScriptEngine.Evaluate (System.String code) [0x00007] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0
at Plugin.LatestVersion.LatestVersionImplementation.GetLatestVersionNumber () [0x001ff] in <7361502664264164a28b556feec777a7>:0
--- End of inner exception stack trace ---
at Plugin.LatestVersion.LatestVersionImplementation.GetLatestVersionNumber () [0x0023d] in <7361502664264164a28b556feec777a7>:0

Is it possible to use the dotnet tracing libraries on macOS?

I've gone through the example event-tracing projects located at https://github.com/microsoft/eventtracing-processing-samples and successfully built the projects. I'm running into missing dll's. For instance when running the CountProcesses example, I run into the following stack trace:
mono CountProcesses.exe test.etl
Unhandled Exception:
System.DllNotFoundException: msi.dll assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) Microsoft.Windows.EventTracing.NativeMethods.MsiGetSummaryInformationW(uint,string,uint,uint&)
at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.GetRevisionNumber (System.String msiPath) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.GetOrCreateDefaultToolkitPath (System.IO.TextWriter output) [0x00054] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.Create (System.String path, Microsoft.Windows.EventTracing.ITraceProcessorSettings settings, Microsoft.Windows.EventTracing.ITraceProcessorSettings& effectiveSettings) [0x000a8] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.TraceProcessor.Create (System.String path, Microsoft.Windows.EventTracing.ITraceProcessorSettings settings) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.TraceProcessor.Create (System.String path) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Program.Run (System.String tracePath) [0x00001] in <2e2989aba7be4139841be131a5e978bb>:0
at Program.Main (System.String[] args) [0x00027] in <2e2989aba7be4139841be131a5e978bb>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: msi.dll assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) Microsoft.Windows.EventTracing.NativeMethods.MsiGetSummaryInformationW(uint,string,uint,uint&)
at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.GetRevisionNumber (System.String msiPath) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.GetOrCreateDefaultToolkitPath (System.IO.TextWriter output) [0x00054] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.Create (System.String path, Microsoft.Windows.EventTracing.ITraceProcessorSettings settings, Microsoft.Windows.EventTracing.ITraceProcessorSettings& effectiveSettings) [0x000a8] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.TraceProcessor.Create (System.String path, Microsoft.Windows.EventTracing.ITraceProcessorSettings settings) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.TraceProcessor.Create (System.String path) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Program.Run (System.String tracePath) [0x00001] in <2e2989aba7be4139841be131a5e978bb>:0
at Program.Main (System.String[] args) [0x00027] in <2e2989aba7be4139841be131a5e978bb>:0
Before digging too deeply into the missing libraries, is traceprocessing intended to be cross-platform? Or does it rely on platform dependent libs in Windows?
System Setup:
OS: macOS Catalina 10.15.4
Mono JIT compiler version 6.8.0.105 (2019-10/82fffe07497 Tue Feb 4 10:09:51 EST 2020)
.NET Core SDK (3.1.201)
(I am a developer at Microsoft who works on the TraceProcessor project.)
Currently, the library relies on some Windows-only components and cannot be run on a Mac.

EF Core with SQLite on Mono: e_sqlite3 not found

We are using Entity Framework Core 2.2.4 together with an SQLite database targeting .NET Framework 4.7.2. Following Nuget packages were installed:
Microsoft.Data.Sqlite
Microsoft.EntityFrameworkCore.Sqlite
Microsoft.EntityFrameworkCore.Tools
On my development machine (Windows 10) everything works fine but when trying to run the application with Mono on our 32-bit Linux machine, the following exception occurs:
FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type
initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception.
---> System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. ---> System.DllNotFoundException: e_sqlite3
at (wrapper managed-to-native)
SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods.sqlite3_libversion_number()
at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number () [0x00000] in <61bb3ca1db9c41ea88f280f0b1600d58>:0
at SQLitePCL.raw.SetProvider (SQLitePCL.ISQLite3Provider imp) [0x00008] in <3d4b21fb9c764efbb11f6e3b02efff52>:0
at SQLitePCL.Batteries_V2.Init () [0x00005] in <f5d9c86a14864b5d99b8bdece1b8292c>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <a89b9d7c1a66468eb33312af7ed3a74e>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <a89b9d7c1a66468eb33312af7ed3a74e>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <a89b9d7c1a66468eb33312af7ed3a74e>:0
at Microsoft.Data.Sqlite.Utilities.BundleInitializer.Initialize () [0x0002f] in <b46e232ade014524baa458345f270c50>:0
at Microsoft.Data.Sqlite.SqliteConnection..cctor () [0x00000] in <b46e232ade014524baa458345f270c50>:0
--- End of inner exception stack trace ---
at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteRelationalConnection.CreateDbConnection () [0x00006] in <74192050a4d342039620dc7ef6678f71>:0
at Microsoft.EntityFrameworkCore.Internal.LazyRef`1[T].get_Value () [0x00008] in <adf771f92e754fe1bb85c5850cd0c16b>:0
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.get_DbConnection () [0x00000] in <69f795dffc844780bfcfff4ff8415a92>:0
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open (System.Boolean errorsExpected) [0x00000] in <69f795dffc844780bfcfff4ff8415a92>:0
at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteRelationalConnection.Open (System.Boolean errorsExpected) [0x00000] in <74192050a4d342039620dc7ef6678f71>:0
at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteDatabaseCreator.Exists () [0x0000c] in <74192050a4d342039620dc7ef6678f71>:0
at Microsoft.EntityFrameworkCore.Migrations.HistoryRepository.Exists () [0x0000b] in <69f795dffc844780bfcfff4ff8415a92>:0
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate (System.String targetMigration) [0x00012] in <69f795dffc844780bfcfff4ff8415a92>:0
at Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions.Migrate (Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade) [0x00010] in <69f795dffc844780bfcfff4ff8415a92>:0
at TestEfCorePlusSqlite.Program.Main (System.String[] args) [0x0000e] in <c4fad569c9a241ef887b5b2ddbc0225f>:0
Since the application is built with Any CPU configuration, x86 and x64 folders are created in bin/Debug, both containing an e_sqlite3.dll. I already tried to copy the x86 dll to bin/Debug but the error still occurred.
What I've tried so far:
installing Microsoft.EntityFrameworkCore.Sqlite.Core together with
SQLitePCLRaw.bundle_e_sqlite3 as suggested here
installing Microsoft.EntityFrameworkCore.Sqlite (or
Microsoft.Data.Sqlite or SQLitePCLRaw.bundle_green) as suggested here
different combinations of SQLitePCLRaw.* packages
What do I have to do to get EF Core and SQlite running on Mono?
After a refreshing weekend I took another glance at the problem. I found the official Mono documentation regarding DllNotFoundException and used MONO_LOG_LEVEL=debug mono YourApp.exe to find out which lib Mono is trying to load. It was /usr/lib/libe_sqlite3.so which was not available on my system. All I did was to copy the available /usr/lib/libsqlite3.so and rename it to libe_sqlite3.so. I'm not sure if this is the preferred way but my application works.

NullReferenceExceptions while using latest mod_mono and xsp4

I need help figuring out what's wrong in my mono setup. I get NullReferenceExceptions when I try to run webforms and mvc3 apps on apache/mod_mono.
Here's the exceptions I get to httpd error log when trying to load pages on a browser:
Accessing a web forms page:
An exception has occurred while generating HttpException page:
System.NullReferenceException: Object reference not set to an instance of an object
at System.Web.Util.HttpEncoder.GetCustomEncoderFromConfig () [0x00000] in <filename unknown>:0
at System.Lazy`1[System.Web.Util.HttpEncoder].InitValue () [0x00000] in <filename unknown>:0
The actual exception which was being reported was:
System.Web.HttpException: ---> System.NullReferenceException: Object reference not set to an instance of an object
at System.Web.HttpApplication.InitOnce (Boolean full_init) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
An exception has occurred while generating HttpException page:
System.NullReferenceException: Object reference not set to an instance of an object
at System.Web.Util.HttpEncoder.GetCustomEncoderFromConfig () [0x00000] in <filename unknown>:0
at System.Lazy`1[System.Web.Util.HttpEncoder].InitValue () [0x00000] in <filename unknown>:0
The actual exception which was being reported was:
System.Web.HttpException: Server cannot flush a completed response
at System.Web.HttpResponse.Flush (Boolean final_flush) [0x00000] in <filename unknown>:0
at System.Web.HttpApplication.OutputPage () [0x00000] in <filename unknown>:0
Accessing a mvc3 page:
An exception has occurred while generating HttpException page:
System.NullReferenceException: Object reference not set to an instance of an object
at System.Web.Util.HttpEncoder.GetCustomEncoderFromConfig () [0x00000] in <filename unknown>:0
at System.Lazy`1[System.Web.Util.HttpEncoder].InitValue () [0x00000] in <filename unknown>:0
The actual exception which was being reported was:
System.Web.HttpException: ---> System.NullReferenceException: Object reference not set to an instance of an object
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.GetCompiledType (System.String virtualPath) [0x00000] in <filename unknown>:0
at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext context) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
Another symptom is similar exceptions when I run xsp4:
xsp4
Exception caught during reading the configuration file:
System.NullReferenceException: Object reference not set to an instance of an object
at Mono.WebServer.XSP.Server+ApplicationSettings..ctor () [0x00000] in <filename unknown>:0
xsp4
Listening on address: 0.0.0.0
Root directory: /usr/local/src
Listening on port: 8080 (non-secure)
Hit Return to stop the server.
Stopping the server will not cause exceptions here. I wonder if the root directory here is correct? Which configuration file is xsp trying to read?
And here's data on versions etc:
Compiled mono, mod_mono and xsp from git using prefix /usr, versions are:
mono -V
Mono JIT compiler version 3.4.1 (master/d3e5522 Fri May 9 20:16:07 MSD 2014)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
mod-mono-server4 --version
mod-mono-server4.exe 3.0.0.0
(c) (c) 2002-2011 Novell, Inc.
Mod_mono backend for XSP
mod-mono-server4 file content:
exec /usr/bin/mono $MONO_OPTIONS "/usr/lib/mono/4.5/mod-mono-server4.exe" "$#"
xsp4 --version
xsp4.exe 3.0.0.0
Copyright (C) 2002-2011 Novell, Inc.
Minimalistic web server for testing System.Web
Can you guys spot anything that's wrong here? What could I do to fix this problem? I haven't found anything usable so far.
I did find this with same kind of exception described, but in my case xsp is not an old version.
https://www.meebey.net/posts/mono_3.0_preview_debian_ubuntu_packages/

In Mono, memcached providers crashes after a few hours with "the socket is not connected" 500 error

I am trying to set up a mono asp.net 4.0 test website that uses memcached providers (http://memcachedproviders.codeplex.com/) using Enyim.Memcached to access memcached. The website and memcachedproviders work fine on a windows server.
I ported over the working asp.net website to mono (Ubuntu 10.10, Mono 2.8), and it runs correctly and pulls sessions from an external server running memcached, but inexplicably, every couple hours or so, the website crashes, and just returns a 500 error saying "The socket is not connected" This only happens when memcachedproviders session state is enabled.
Does anyone have any experience setting up memcachedproveders for a session in mono, or know at least where I should begin looking? While I'm familiar with linux and apache, I'm generally more comfortable with windows so there may be some configuration I'm missing.
As far as i can tell, this is the log from apache from the time the error, even with debugging enabled from mod_mono:
[Tue Nov 09 17:53:17 2010] [notice] caught SIGTERM, shutting down
[Tue Nov 09 17:53:19 2010] [notice] Apache/2.2.14 (Ubuntu) mod_mono/2.8 configured -- resuming normal operations
Listening on: /tmp/mod_mono_server_global
Root directory: /
Listening on: /tmp/mod_mono_server_global
Root directory: /
Error: There's already a server listening on /tmp/mod_mono_server_global
mod-mono-server4
mod-mono-server4
Listening on: /tmp/mod_mono_server_mysite
Root directory: /srv/www/mysite
[Tue Nov 09 17:53:58 2010] [error] (104)Connection reset by peer: read_data failed
[Tue Nov 09 17:53:58 2010] [error] Command stream corrupted, last command was -1
The general memcached configuration in web.config is something like:
<enyim.com>
<memcached>
<servers>
<add address="##.##.##.##" port="11211"/>
</servers>
<socketPool minPoolSize="10" maxPoolSize="100" connectionTimeout="00:00:10" deadTimeout="00:02:00"/>
</memcached>
</enyim.com>
...
<sessionState cookieless="false" regenerateExpiredSessionId="true" mode="Custom" customProvider="MemcachedSessionProvider">
<providers>
<add name="MemcachedSessionProvider" type="MemcachedProviders.Session.SessionStateProvider,MemcachedProviders" dbType="none" writeExceptionsToEventLog="true"/>
</providers>
</sessionState>
And the stack trace:
System.Net.Sockets.SocketException: The socket is not connected
at System.Net.Sockets.Socket.Shutdown (SocketShutdown how) [0x00058] in /home/monoweb/mono-2.8/mcs/class/System/System.Net.Sockets/Socket_2_1.cs:698
at Enyim.Caching.Memcached.PooledSocket.Dispose (Boolean disposing) [0x00000] in <filename unknown>:0
at Enyim.Caching.Memcached.PooledSocket.Destroy () [0x00000] in <filename unknown>:0
at Enyim.Caching.Memcached.MemcachedNode+InternalPoolImpl.ReleaseSocket (Enyim.Caching.Memcached.PooledSocket socket) [0x00000] in <filename unknown>:0
at Enyim.Caching.Memcached.PooledSocket.Dispose (Boolean disposing) [0x00000] in <filename unknown>:0
at Enyim.Caching.Memcached.PooledSocket.System.IDisposable.Dispose () [0x00000] in <filename unknown>:0
at Enyim.Caching.Memcached.ItemOperation.Dispose () [0x00000] in <filename unknown>:0
at Enyim.Caching.Memcached.Operation.System.IDisposable.Dispose () [0x00000] in <filename unknown>:0
at Enyim.Caching.MemcachedClient.Store (Enyim.Caching.Memcached.ServerPool pool, StoreCommand mode, System.String key, System.Object value, UInt64 casValue, TimeSpan validFor, DateTime expiresAt) [0x00000] in <filename unknown>:0
at Enyim.Caching.MemcachedClient.Store (StoreMode mode, System.String key, System.Object value, TimeSpan validFor) [0x00000] in <filename unknown>:0
at MemcachedProviders.Session.SessionStateProvider.SetAndReleaseItemExclusive (System.Web.HttpContext context, System.String id, System.Web.SessionState.SessionStateStoreData item, System.Object lockId, Boolean newItem) [0x00000] in <filename unknown>:0
at System.Web.SessionState.SessionStateModule.OnReleaseRequestState (System.Object o, System.EventArgs args) [0x0003f] in /home/monoweb/mono-2.8/mcs/class/System.Web/System.Web.SessionState_2.0/SessionStateModule.cs:292
at System.Web.HttpApplication+<RunHooks>c__Iterator1.MoveNext () [0x001aa] in /home/monoweb/mono-2.8/mcs/class/System.Web/System.Web/HttpApplication.cs:1026
at System.Web.HttpApplication+<Pipeline>c__Iterator2.MoveNext () [0x00ec9] in /home/monoweb/mono-2.8/mcs/class/System.Web/System.Web/HttpApplication.cs:1385
at System.Web.HttpApplication.Tick () [0x00000] in /home/monoweb/mono-2.8/mcs/class/System.Web/System.Web/HttpApplication.cs:914
I ended up fixing this by first downloading the source for memcachedproviders, and recompiling it to reference enyim.memcached 2.7 (the latest version). This involved some minor changes.
After this, in mono I instead got a different error, within enyim memcached regarding string.IndexOfAny ( http://msdn.microsoft.com/en-us/library/11w09h50.aspx ) where the string being checked was null, and so was throwing an exception. If I'm reading the docs right, I think that it's only supposed to throw an exception if the parameter is null, not if the string is. Either that or mod_mono randomly tries to access session[null], whereas asp.net does not.
To fix this, I downloaded the enyim memcached source, and added a check that would replace a null with an empty string before the function call. memcached sessions have been up for over 24 hours so far without a hitch now.

Resources