Armo7 Debian 9版本上的Mono libgdiplus崩溃

问题描述 投票:0回答:1

在使用Armv7的Debian 9,内核4.9上使用Mono版本4.6.2(来自apt)运行winforms应用程序时遇到了很多麻烦。我也尝试过Mono install guide的Mono 5.18,但我也有同样的错误。这个项目以前在Debian 7上运行,内核为3.0,运行正常。

每当我尝试运行我的应用程序时,我都会看到以下错误:

未处理的异常:System.ArgumentException:在System.Drawing的<1917aa1c39d94b1a91807b8cd9f03350>中的System.Drawing.GDIPlus.CheckStatus(System.Drawing.Status status)[0x0009b]中找到了空引用或无效值[GDI + status:InvalidParameter] .Bitmap..ctor(System.Int32 width,System.Int32 height,System.Drawing.Imaging.PixelFormat format)[0x00017]在<1917aa1c39d94b1a91807b8cd9f03350>:0中的System.Drawing.Bitmap..ctor(System.Drawing.Image original ,System.Int32 width,System.Int32 height)[0x00000] in <1917aa1c39d94b1a91807b8cd9f03350>:0 in 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),位于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在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,System.Windows.Forms.Cursor.CreateCursor(System.IO.Stream stream)[0x00058] in:0,System.Windows.Forms。 Cursor..ctor(System.Type类型,System.String资源)[0x00021] in:0,System.Windows.Forms.Cursors.get_SizeNWSE()[0x0001a] in:0,System.Windows.Forms.SizeGrip..ctor (System.Windows.Forms.Control CapturedControl)[0x00006] in:0 at(wrapper remoting-invoke-with-check)System.Windows.Fornd.SizeGrip:.ctor(System.Windows.Forms.Control)at System.Windows .Forms.ScrollableControl.CreateScrollbars()[0x000c2] in:0,System.Windows.Forms.ScrollableControl..ctor()[0x000b0] in:0,System.Windows.Forms.ContainerControl..ctor()[0x0000e] in :System.Windows.Forms.Form..ctor()[0x00012]为0 in:0在HelloWorld..ctor()[0x00000] in <6f95f68c33fe4d859a6075a68bb5c47f>:0 at(wrapper remoting-invoke-with-check)HelloWorld:.ctor()at HelloWorld.Main()[0x00000] in <6f95f68c33fe4d859a6075a68bb5c47f>: 0 [错误]致命未处理的异常:System.ArgumentException:在<1917aa1c39d94b1a91807b8cd9f03350>中的System.Drawing.GDIPlus.CheckStatus(System.Drawing.Status status)[0x0009b]中找到了空引用或无效值[GDI + status:InvalidParameter]: System.Drawing.Bitmap ...中的System.Drawing.Bitmap..ctor(System.Int32 width,System.Int32 height,System.Drawing.Imaging.PixelFormat格式)[0x00017]中的值为<1917aa1c39d94b1a91807b8cd9f03350>:0 .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]在<1917aa1c39d94b1a91807b8cd9f03350>:0 at(wrapper remoting-invoke-with-check)System.Drawing.Bitmap:.ctor(Sy System.Windows.Forms.XplatUIX11.DefineCursor(System.Drawing.Bitmap bitmap,System.Drawing.Bitmap mask,System.Drawing.Color cursor_pixel,System.Drawing.Color mask_pixel)中的stem.Drawing.Image,System.Drawing.Size) ,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 in System.Windows.Forms.Cursor.CreateCursor(System.IO.Stream stream)[0x00058] in:0 at System.Windows .Forms.Cursor..ctor(System.Type类型,System.String资源)[0x00021] in:0,System.Windows.Forms.Cursors.get_SizeNWSE()[0x0001a] in:0,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 at System.Windows.Forms.Scrollable Control.CreateScrollbars()[0x000c2] in:0 in 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,HelloWorld..ctor()[0x00000] in <6f95f68c33fe4d859a6075a68bb5c47f>:0 at(wrapper remoting-invoke-with-check)HelloWorld:.ctor( )在<6f95f68c33fe4d859a6075a68bb5c47f>中的HelloWorld.Main()[0x00000]:0

我原本认为这可能是我的应用程序的问题,但我尝试运行以下空白winform应用程序(来自mono website)并收到相同的错误。

using System;
using System.Windows.Forms;

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

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

通过查看错误消息和其他post它似乎是加载光标的问题,但我有点迷失我究竟能解决这个问题。帖子很旧,似乎找不到任何相关的视频驱动程序来修复硬件光标问题。也许我需要调整我的X11配置?

c# winforms mono debian armv7
1个回答
0
投票

通过设置我的视频驱动程序所需的设置的xorg.conf文件,我能够解决这个问题。一旦我做了这个单声道发射没有问题。以下是我使用的配置

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
© www.soinside.com 2019 - 2024. All rights reserved.