OpenBve.exe crashed with SIGABRT in mono_handle_native_sigsegv()

Bug #1296684 reported by Kerron Gordon
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
openbve (Ubuntu)
Confirmed
Medium
Unassigned
openbve-data (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

openbve did not start

terminal output
with openbve -v

Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Drawing.GDIPlus.GdipLoadImageFromFile (string,intptr&) <0xffffffff>
  at System.Drawing.Image.FromFile (string,bool) <0x0005b>
  at System.Drawing.Image.FromFile (string) <0x00013>
  at OpenBve.formMain.LoadImage (string,string) <0x0003b>
  at OpenBve.formMain.formMain_Load (object,System.EventArgs) <0x00d83>
  at System.Windows.Forms.Form.OnLoad (System.EventArgs) <0x00075>
  at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs) <0x0007f>
  at System.Windows.Forms.Form.OnCreateControl () <0x00053>
  at System.Windows.Forms.Control.CreateControl () <0x0011f>
  at System.Windows.Forms.Control.WmShowWindow (System.Windows.Forms.Message&) <0x00167>
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message&) <0x002d3>
  at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message&) <0x0001b>
  at System.Windows.Forms.ContainerControl.WndProc (System.Windows.Forms.Message&) <0x0005b>
  at System.Windows.Forms.Form.WndProc (System.Windows.Forms.Message&) <0x00253>
  at System.Windows.Forms.Control/ControlWindowTarget.OnMessage (System.Windows.Forms.Message&) <0x00025>
  at System.Windows.Forms.Control/ControlNativeWindow.WndProc (System.Windows.Forms.Message&) <0x00036>
  at System.Windows.Forms.NativeWindow.WndProc (intptr,System.Windows.Forms.Msg,intptr,intptr) <0x00310>
  at System.Windows.Forms.XplatUIX11.SendMessage (intptr,System.Windows.Forms.Msg,intptr,intptr) <0x003f3>
  at System.Windows.Forms.XplatUIX11.MapWindow (System.Windows.Forms.Hwnd,System.Windows.Forms.WindowType) <0x001df>
  at System.Windows.Forms.XplatUIX11.CreateWindow (System.Windows.Forms.CreateParams) <0x00bab>
  at System.Windows.Forms.XplatUI.CreateWindow (System.Windows.Forms.CreateParams) <0x0001f>
  at System.Windows.Forms.NativeWindow.CreateHandle (System.Windows.Forms.CreateParams) <0x0003f>
  at System.Windows.Forms.Control.CreateHandle () <0x00069>
  at System.Windows.Forms.Form.CreateHandle () <0x0002b>
  at System.Windows.Forms.Control.CreateControl () <0x00087>
  at System.Windows.Forms.Control.SetVisibleCore (bool) <0x00083>
  at System.Windows.Forms.Form.SetVisibleCore (bool) <0x002ef>
  at System.Windows.Forms.Control.set_Visible (bool) <0x00032>
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control.set_Visible (bool) <0xffffffff>
  at System.Windows.Forms.Application.RunLoop (bool,System.Windows.Forms.ApplicationContext) <0x002fb>
  at System.Windows.Forms.Form.ShowDialog (System.Windows.Forms.IWin32Window) <0x008ab>
  at System.Windows.Forms.Form.ShowDialog () <0x00013>
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Form.ShowDialog () <0xffffffff>
  at OpenBve.formMain.ShowMainDialog () <0x0005f>
  at OpenBve.Program.Main (string[]) <0x00bc7>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

 /usr/bin/cli() [0x4b73d8]
 /usr/bin/cli() [0x50f13b]
 /usr/bin/cli() [0x423d22]
 /lib/x86_64-linux-gnu/libpthread.so.0(+0x10330) [0x7f3220107330]
 /usr/lib/libgdiplus.so.0(+0x415ba) [0x7f3217dda5ba]
 /usr/lib/libgdiplus.so.0(GdipLoadImageFromFile+0x18a) [0x7f3217dbd67a]
 [0x41761a82]

Debug info from gdb:

ptrace: Operation not permitted.
No threads.

=================================================================
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.
=================================================================

Aborted (core dumped)

ProblemType: Crash
DistroRelease: Ubuntu 14.04
Package: openbve 1.4.0.9-1
ProcVersionSignature: Ubuntu 3.13.0-19.39-generic 3.13.6
Uname: Linux 3.13.0-19-generic x86_64
ApportVersion: 2.13.3-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Mar 24 08:02:56 2014
ExecutablePath: /usr/lib/openbve/OpenBve.exe
InstallationDate: Installed on 2014-03-20 (3 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20140307)
InterpreterPath: /usr/bin/mono-sgen
PackageArchitecture: all
ProcCmdline: /usr/bin/cli /usr/lib/openbve/OpenBve.exe /filesystem=/etc/openbve/filesystem.cfg
ProcEnviron:
 LANGUAGE=en_US
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
Signal: 6
SourcePackage: openbve
StacktraceTop:
 ?? () from /usr/lib/libgdiplus.so.0
 GdipLoadImageFromFile () from /usr/lib/libgdiplus.so.0
 ?? ()
 ?? ()
 ?? ()
Title: OpenBve.exe crashed with SIGABRT in GdipLoadImageFromFile()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
Kerron Gordon (kerrongordon) wrote :
information type: Private → Public
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 mono_handle_native_sigsegv (signal=signal@entry=11, ctx=ctx@entry=0x7fe99994dc40) at mini-exceptions.c:2335
 mono_arch_handle_altstack_exception (sigctx=sigctx@entry=0x7fe99994dc40, fault_addr=<optimized out>, stack_ovf=stack_ovf@entry=0) at exceptions-amd64.c:908
 mono_sigsegv_signal_handler (_dummy=11, info=0x7fe99994dd70, context=0x7fe99994dc40) at mini.c:6769
 ?? () from /tmp/apport_sandbox_zQ3Ltq/lib/x86_64-linux-gnu/libpthread.so.0
 ?? ()

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in openbve (Ubuntu):
importance: Undecided → Medium
summary: - OpenBve.exe crashed with SIGABRT in GdipLoadImageFromFile()
+ OpenBve.exe crashed with SIGABRT in mono_handle_native_sigsegv()
tags: removed: need-amd64-retrace
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openbve (Ubuntu):
status: New → Confirmed
Revision history for this message
Balassa Máté (balassa-mm) wrote :

I have separated the bug (in the most recent source, not that of the package):
It is caused by the native libgdiplus, which (as confirmed by http://stackoverflow.com/questions/7915646/isolating-unmanaged-crashes-under-mono) causes crashes if it encounters an image it can't load.
All images are in the package openbve-data.
I was able to run openBVE with the function LoadImage always returning null. There were no pictures in the menu, but it wored fine.

Then, I replaced the function, so it would print the name of the image before loading it. This way, I was able to narrow down the crash to these two image files:
Data/Menu/icon_parent.png
Data/Menu/icon_folder.png

Upon loading them in GIMP, I realized the source of the error: the images are in indexed color. So, I converted the image to RGB color, exported it, and magically, the game worked.

Therefore, I conclude that this is not an error with openBVE, but rather a bug in GDIPlus. I am attaching the fixed images below, for someone to patch the openbve-data project.

Revision history for this message
Balassa Máté (balassa-mm) wrote :

And, I posted the fix in the wrong bug.
I'm just going to stop now. Sorry.

Revision history for this message
swamytk (swamytk) wrote :

The workaround given by Balassa Máté (balassa-mm) works fine in Ubuntu 14.04. Thanks.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openbve-data (Ubuntu):
status: New → Confirmed
Revision history for this message
Aidan Fell (islandmonkey) wrote :

While we cannot say that this reflects the fault of the original bug, the original author did not add any GDB info. Therefore I have attached a backtrace for this bug here.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.