Dynalon / Rainy

Simple Tomboy/Tomdroid cloud/syncing server. Written in C# with AngularJS web frontend. Supports SQLite & Postgres Backends.
http://dynalon.github.io/Rainy
GNU Affero General Public License v3.0
88 stars 15 forks source link

Crash with Mono 4.0.2.5 #52

Open LOLLeela opened 9 years ago

LOLLeela commented 9 years ago

Hi,

I am getting a crash with Mono 4.0.2.5-1, this is running on Arch.

This is the stdout

15/07/15_01:57:02.148 [DEBUG] Main->SetupLogging - logsystem initialized
15/07/15_01:57:02.183 [DEBUG] Main->SetupLogging - Writing all log messages to file: debug.log

Unhandled Exception:
System.NullReferenceException: A null value was found where an object instance was required.
  at (wrapper managed-to-native) object:__icall_wrapper_mono_ldvirtfn (object,intptr)
  at Rainy.AppHost.Configure (Funq.Container container) [0x00000] in <filename unknown>:0 
  at ServiceStack.WebHost.Endpoints.Support.HttpListenerBase.Init () [0x00000] in <filename unknown>:0 
  at Rainy.RainyStandaloneServer.Start () [0x00000] in <filename unknown>:0 
  at Rainy.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: A null value was found where an object instance was required.
  at (wrapper managed-to-native) object:__icall_wrapper_mono_ldvirtfn (object,intptr)
  at Rainy.AppHost.Configure (Funq.Container container) [0x00000] in <filename unknown>:0 
  at ServiceStack.WebHost.Endpoints.Support.HttpListenerBase.Init () [0x00000] in <filename unknown>:0 
  at Rainy.RainyStandaloneServer.Start () [0x00000] in <filename unknown>:0 
  at Rainy.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0 

It was working fine until an update was applied.

pravsripad commented 9 years ago

Hello,

Facing similar problem with the latest nightly build - rainy-nightly-9ad7a9 with mono version 3.2.8+dfsg-4+rpi1 on Debian GNU/Linux 7.0 (raspberry pi).

Upgraded to the latest version because of issue #44 with the rainy-0.5.0 release. It would be very nice if there is another stable release soon.

Unhandled Exception:
System.NullReferenceException: A null value was found where an object instance was required.
  at (wrapper managed-to-native) object:__icall_wrapper_mono_ldvirtfn (object,intptr)
  at Rainy.AppHost.Configure (Funq.Container container) [0x00000] in <filename unknown>:0 
  at ServiceStack.WebHost.Endpoints.Support.HttpListenerBase.Init () [0x00000] in <filename unknown>:0 
  at Rainy.RainyStandaloneServer.Start () [0x00000] in <filename unknown>:0 
  at Rainy.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: A null value was found where an object instance was required.
  at (wrapper managed-to-native) object:__icall_wrapper_mono_ldvirtfn (object,intptr)
  at Rainy.AppHost.Configure (Funq.Container container) [0x00000] in <filename unknown>:0 
  at ServiceStack.WebHost.Endpoints.Support.HttpListenerBase.Init () [0x00000] in <filename unknown>:0 
  at Rainy.RainyStandaloneServer.Start () [0x00000] in <filename unknown>:0 
  at Rainy.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0

Thank you.

Dynalon commented 9 years ago

I suspect this is due to mono 4.x pulling in and replacing lots of code in the BCL from the .NET 4.6 code drop. ServiceStack (a library that Rainy uses) has had a lot of #if MONO for special mono bugs/behaviours and I bet since mono now switched to MS implemetation those ifdefs still try to workaround issues which now arent there. Unfortunately ServiceStack v3 isn't developed any further, and v4 is proprietary/not compatible with Rainy's License.

I was planning to migrate to WebAPI and remove ServiceStack once the ASP.NET 5 final gets released which is scheduled for January. Till then I suggest you go back to a previous mono version, 3.x should be fine. Debian 8 (jessie) comes with mono 3.2.8 by default which should by fine for rainy.

LOLLeela commented 9 years ago

Thanks,

I will be running an old version of mono for now, I'll stick to it.

pravsripad commented 9 years ago

Thank you. I'm not sure why it's happening with me though.

Dynalon commented 9 years ago

@pravsripad Didn't realize you were on flat debian's mono 3.2.8. Is your raspberry pi the model 2 (quadcore armv7) or the first model (single core, armv6)?

Dynalon commented 9 years ago

I would also help if you could post you settings.conf (please use gist.github.com for this)

pravsripad commented 9 years ago

@Dynalon It's the first model armv6.

pravsripad commented 9 years ago

Here you go - https://gist.github.com/pravsripad/812280fceb56d7244f45

syskill commented 9 years ago

I encountered this issue as well, on CentOS 6 x86_64, using the mono 3.10 packages from http://download.mono-project.com/repo/centos6/ . I did some shotgun debugging and found the cause, introduced in commit 755b50f. At Rainy/AppHost.cs:79, fontshandler is used in the EndpointHostConfig constructor after it has been set to null. The bug will not be triggered if settings.conf has Development: true.