简体   繁体   English

Mono libgdiplus在Armv7 Debian 9构建上崩溃

[英]Mono libgdiplus crash on Armv7 Debian 9 build

I'm having a lot of trouble getting a winforms application running with Mono version 4.6.2 (from apt) on Debian 9, Kernel 4.9 with Armv7. 我在使用Armv7在Debian 9,Kernel 4.9上运行以Mono版本4.6.2(来自apt)运行winforms应用程序时遇到很多麻烦。 I have also tried with Mono 5.18 from the Mono install guide , but I had the same error. 我也尝试过Mono安装指南中的 Mono 5.18,但是我遇到了同样的错误。 This project was previously running on Debian 7 with a 3.0 Kernel and it ran fine. 该项目以前在带有3.0内核的Debian 7上运行,并且运行良好。

Any time I try to run my application I see the following error: 每当我尝试运行应用程序时,都会看到以下错误:

Unhandled Exception: System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter] at System.Drawing.GDIPlus.CheckStatus (System.Drawing.Status status) [0x0009b] in <1917aa1c39d94b1a91807b8cd9f03350>:0 at System.Drawing.Bitmap..ctor (System.Int32 width, System.Int32 height, System.Drawing.Imaging.PixelFormat format) [0x00017] in <1917aa1c39d94b1a91807b8cd9f03350>:0 at System.Drawing.Bitmap..ctor (System.Drawing.Image original, System.Int32 width, System.Int32 height) [0x00000] in <1917aa1c39d94b1a91807b8cd9f03350>:0 at System.Drawing.Bitmap..ctor (System.Drawing.Image original, System.Drawing.Size newSize) [0x00010] in <1917aa1c39d94b1a91807b8cd9f03350>:0 at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor (System.Drawing.Image,System.Drawing.Size) at System.Windows.Forms.XplatUIX11.DefineCursor (System.Drawing.Bitmap bitmap, System.Drawing.Bitmap mask, System.Drawing.Color cursor_pixel, System.Drawing.Color mask_pixel, System.Int 未处理的异常:System.ArgumentException:在System.Drawing.GDIPlus.CheckStatus的<1917aa1c39d94b1a91807b8cd9f03350>:0的System.Drawing.GDIPlus.CheckStatus(System.Drawing.Status状态)[0x0009b]中发现了[GDI +状态:InvalidParameter]。 .map.ctor(System.Int32宽度,System.Int32高度,System.Drawing.Imaging.PixelFormat格式)[0x00017]在System.Drawing.Bitmap..ctor中的<1917aa1c39d94b1a91807b8cd9f03350>:0(System.Drawing.Image原始,System.Int32宽度,System.Int32高度)[0x00000]在<1917aa1c39d94b1a91850b中的System.Drawing.Bitmap..ctor中的<0x00000](System.Drawing.Bitmap..ctor(System.Drawing.Image original,System.Drawing.Size newSize)[0x00010]中>:0在(包装器远程调用检查)System.Drawing.Bitmap:.ctor(System.Drawing.Image,System.Drawing.Size)在System.Windows.Forms.XplatUIX11.DefineCursor(System.Drawing。位图位图,System.Drawing.Bitmap蒙版,System.Drawing.Color cursor_pixel,System.Drawing.Color mask_pixel,System.Int 32 xHotSpot, System.Int32 yHotSpot) [0x0004e] in :0 at System.Windows.Forms.XplatUI.DefineCursor (System.Drawing.Bitmap bitmap, System.Drawing.Bitmap mask, System.Drawing.Color cursor_pixel, System.Drawing.Color mask_pixel, System.Int32 xHotSpot, System.Int32 yHotSpot) [0x00000] in :0 at System.Windows.Forms.Cursor.CreateCursor (System.IO.Stream stream) [0x00058] in :0 at System.Windows.Forms.Cursor..ctor (System.Type type, System.String resource) [0x00021] in :0 at System.Windows.Forms.Cursors.get_SizeNWSE () [0x0001a] in :0 at System.Windows.Forms.SizeGrip..ctor (System.Windows.Forms.Control CapturedControl) [0x00006] in :0 at (wrapper remoting-invoke-with-check) System.Windows.Forms.SizeGrip:.ctor (System.Windows.Forms.Control) at System.Windows.Forms.ScrollableControl.CreateScrollbars () [0x000c2] in :0 at System.Windows.Forms.ScrollableControl..ctor () [0x000b0] in :0 at System.Windows.Forms.ContainerControl..ctor () [0x0000e] in :0 at System.Windows.Forms.Form..ctor () [0x00012] 32 xHotSpot,System.Int32 yHotSpot [0x0004e]在System.Windows.Forms.XplatUI.DefineCursor(System.Drawing.Bitmap位图,System.Drawing.Bitmap蒙版,System.Drawing.Color cursor_pixel,System.Drawing)处:0。在System.Windows.Forms.Cursor.CreateCursor(System.IO.Stream流)的0中的color mask_pixel,System.Int32 xHotSpot,System.Int32 yHotSpot [0x00000]在System.Windows.Forms的:0中为[0x00058]。 Cursor..ctor(System.Type类型,System.String资源)在System.Windows.Forms.Cursors.get_SizeNWSE中为0的[0x00021]在System.Windows.Forms.SizeGrip..ctor中为0的[0x0001a] (System.Windows.Forms.Control CapturedControl)[0x00006]在(包装检查远程调用时):0处位于System.Windows上的System.Windows.Forms.SizeGrip:.ctor(System.Windows.Forms.Control) .Forms.ScrollableControl.CreateScrollbars()在[System.Windows.Forms.ScrollableControl..ctor()中为0的[0x000c2]()在[0x000b0]在System.Windows.Forms.ContainerControl..ctor()中为0的[0x000b0]在System.Windows.Forms.Form..ctor()处为:0:[0x00012] in :0 at HelloWorld..ctor () [0x00000] in <6f95f68c33fe4d859a6075a68bb5c47f>:0 at (wrapper remoting-invoke-with-check) HelloWorld:.ctor () at HelloWorld.Main () [0x00000] in <6f95f68c33fe4d859a6075a68bb5c47f>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter] at System.Drawing.GDIPlus.CheckStatus (System.Drawing.Status status) [0x0009b] in <1917aa1c39d94b1a91807b8cd9f03350>:0 at System.Drawing.Bitmap..ctor (System.Int32 width, System.Int32 height, System.Drawing.Imaging.PixelFormat format) [0x00017] in <1917aa1c39d94b1a91807b8cd9f03350>:0 at System.Drawing.Bitmap..ctor (System.Drawing.Image original, System.Int32 width, System.Int32 height) [0x00000] in <1917aa1c39d94b1a91807b8cd9f03350>:0 at System.Drawing.Bitmap..ctor (System.Drawing.Image original, System.Drawing.Size newSize) [0x00010] in <1917aa1c39d94b1a91807b8cd9f03350>:0 at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor (Sy 在:0处的HelloWorld..ctor()在[6f95f68c33fe4d859a6075a68bb5c47f>中的[0x00000]>:0处(包装带检查的远程调用)HelloWorld:.ctor()在<6f95f68c33fe4d859a607547>在HelloWorld.Main()在[0x00000]处0 [错误]致命异常情况:System.ArgumentException:在<1917aa1c39d94b1a91807b8cd9f03350>中的System.Drawing.GDIPlus.CheckStatus(System.Drawing.Status状态)[0x0009b]处找到空引用或无效值[GDI +状态:InvalidParameter]。在System.Drawing.Bitmap..ctor处为0(System.Int32宽度,System.Int32高度,System.Drawing.Imaging.PixelFormat格式)[0x00017]在<1917aa1c39d94b1a91807b8cd9f03350>:0处在System.Drawing.Bitmap..ctor(系统.Drawing.Image原始文件,System.Int32宽度,System.Int32高度)[0x00000]在System.Drawing.Bitmap.ctor的<1917aa1c39d94b1a91807b8cd9f03350>:0中(System.Drawing.Image原始图像,System.Drawing.Size newSize)[ <1917aa1c39d94b1a91807b8cd9f03350>:0中的(0x00010]在(包装器远程调用并检查)System.Drawing.Bitmap:.ctor(Sy stem.Drawing.Image,System.Drawing.Size) at System.Windows.Forms.XplatUIX11.DefineCursor (System.Drawing.Bitmap bitmap, System.Drawing.Bitmap mask, System.Drawing.Color cursor_pixel, System.Drawing.Color mask_pixel, System.Int32 xHotSpot, System.Int32 yHotSpot) [0x0004e] in :0 at System.Windows.Forms.XplatUI.DefineCursor (System.Drawing.Bitmap bitmap, System.Drawing.Bitmap mask, System.Drawing.Color cursor_pixel, System.Drawing.Color mask_pixel, System.Int32 xHotSpot, System.Int32 yHotSpot) [0x00000] in :0 at System.Windows.Forms.Cursor.CreateCursor (System.IO.Stream stream) [0x00058] in :0 at System.Windows.Forms.Cursor..ctor (System.Type type, System.String resource) [0x00021] in :0 at System.Windows.Forms.Cursors.get_SizeNWSE () [0x0001a] in :0 at System.Windows.Forms.SizeGrip..ctor (System.Windows.Forms.Control CapturedControl) [0x00006] in :0 at (wrapper remoting-invoke-with-check) System.Windows.Forms.SizeGrip:.ctor (System.Windows.Forms.Control) at System.Windows.Forms.Scrollable System.Windows.Forms.XplatUIX11.DefineCursor(System.Drawing.Bitmap位图,System.Drawing.Bitmap蒙版,System.Drawing.Color cursor_pixel,System.Drawing.Color mask_pixel)中的stem.Drawing.Image,System.Drawing.Size) ,System.Int32 xHotSpot,System.Int32 yHotSpot [0x0004e]在System.Windows.Forms.XplatUI.DefineCursor(System.Drawing.Bitmap位图,System.Drawing.Bitmap蒙版,System.Drawing.Color cursor_pixel,System处为:0) .Drawing.Color mask_pixel,System.Int32 xHotSpot,System.Int32 yHotSpot)[0x00000]在System.Windows.Forms.Cursor.CreateCursor(System.IO.Stream流)中为[0x00058]在0。 .Forms.Cursor..ctor(System.Type类型,System.String资源)[0x00021]在System.Windows.Forms.Cursors.get_SizeNWSE()中为0,在System.Windows.Forms.SizeGrip中为:0 ..ctor(System.Windows.Forms.Control CapturedControl)[0x00006]在:0处(包装器远程调用并检查)System.Windows.Forms.SizeGrip:.ctor(System.Windows.Forms.Control)在System.Windows.Forms.Scrollable Control.CreateScrollbars () [0x000c2] in :0 at System.Windows.Forms.ScrollableControl..ctor () [0x000b0] in :0 at System.Windows.Forms.ContainerControl..ctor () [0x0000e] in :0 at System.Windows.Forms.Form..ctor () [0x00012] in :0 at HelloWorld..ctor () [0x00000] in <6f95f68c33fe4d859a6075a68bb5c47f>:0 at (wrapper remoting-invoke-with-check) HelloWorld:.ctor () at HelloWorld.Main () [0x00000] in <6f95f68c33fe4d859a6075a68bb5c47f>:0 System.Windows.Forms.ScrollableControl..ctor():0处的Control.CreateScrollbars()[0x000c2]()System.Windows.Forms.ContainerControl..ctor():0处的[0x000b0] [0x000e0]:0处于0处System.Windows.Forms.Form..ctor()在[0x处位于HelloWorld..ctor()在[6f95f68c33fe4d859a6075a68bb5c47f>]中的[0x00000]在(wrapper远程调用检查)(0) )在<6f95f68c33fe4d859a6075a68bb5c47f>:0中的HelloWorld.Main()[0x00000]

I originally believed this may be a problem with my application, but I have tried running the following blank winform application (from the mono website ) and receive the same error. 我最初认为这可能是我的应用程序出现的问题,但是我尝试运行以下空白winform应用程序(来自mono网站 )并收到相同的错误。

using System;
using System.Windows.Forms;

public class HelloWorld : Form
{
    static public void Main ()
    {
        Application.Run (new HelloWorld ());
    }

    public HelloWorld ()
    {
        Text = "Hello Mono World";
    }
}

By looking at the error message and this other post it seems to be an issue with loading the cursor, but I'm a bit lost on how exactly I can fix that problem. 通过查看错误信息,这等职位似乎是与装载光标一个问题,但我对究竟如何,我可以解决这个问题有点失落。 The post is pretty old and can't seem to find any relevant video drivers to fix the hardware cursor problem. 该帖子很老,似乎找不到任何相关的视频驱动程序来解决硬件光标问题。 Perhaps I need to make an adjustment to my X11 configuration? 也许我需要对X11配置进行调整?

I was able to get this resolved by setting up an xorg.conf file with the settings I needed for my video driver. 通过使用视频驱动程序所需的设置来设置xorg.conf文件,可以解决此问题。 Once I did this mono launched without issue. 一旦我做了这个单声道发行没有问题。 Below is the configuration I used 下面是我使用的配置

Section "Monitor"
    Identifier      "Builtin Default Monitor"
EndSection

Section "Device"
        Identifier      "Builtin Default fbdev Device 0"
        Driver          "fbdev"
        Option          "fbdev"         "/dev/fb0"
        Option          "Rotate"        "UD"
EndSection

Section "Screen"
        Identifier      "Builtin Default fbdev Screen 0"
        Device          "Builtin Default fbdev Device 0"
        Monitor         "Builtin Default Monitor"
        DefaultDepth    24
EndSection

Section "ServerLayout"
        Identifier      "Builtin Default Layout"
        Screen          "Builtin Default fbdev Screen 0"
EndSection

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM