简体   繁体   English

可以在32位操作系统上编译的.NET程序在mono下在64位Linux系统上运行而不会出现任何问题吗?

[英]Can a .NET program compiled on 32bit OS be run on 64bit Linux System under mono without any issues?

I wrote a program on Windows 7 32bit system and test running it on 64bit linux system on another machine. 我在Windows 7 32位系统上编写了一个程序,并测试了在另一台计算机上的64位linux系统上运行它的程序。 It is showing runtime issues just as it follows. 它正在显示运行时问题,如下所示。 However, we even updated our MONO to the latest stable release. 但是,我们甚至将MONO更新为最新的稳定版本。

======= Backtrace: =========                                                                         
/lib64/libc.so.6(+0x73476)[0x7f40404ca476]                                                           
/usr/lib64/libgdiplus.so.0(+0x34352)[0x7f403d9d5352]                                                 
/usr/lib64/libgdiplus.so.0(GdipCombineRegionRect+0xc8)[0x7f403d9d6b08]                               
/usr/lib64/libgdiplus.so.0(GdipCombineRegionRectI+0x4f)[0x7f403d9d6c7f]                              
[0x41868dd7]                                                                                         
======= Memory map: ========                                                                         
00400000-006e0000 r-xp 00000000 08:05 524278                             /usr/bin/mono               
008e0000-008e1000 r--p 002e0000 08:05 524278                             /usr/bin/mono               
008e1000-008ea000 rw-p 002e1000 08:05 524278                             /usr/bin/mono               
008ea000-00924000 rw-p 00000000 00:00 0                                                              
00b9a000-04038000 rw-p 00000000 00:00 0                                  [heap]
40027000-40038000 rwxp 00000000 00:00 0 
400f2000-40103000 rwxp 00000000 00:00 0 
401b0000-401d2000 rwxp 00000000 00:00 0 
4023f000-40250000 rwxp 00000000 00:00 0 
402f1000-40313000 rwxp 00000000 00:00 0 
4039b000-403bd000 rwxp 00000000 00:00 0 
40495000-404a6000 rwxp 00000000 00:00 0 
405fb000-4060c000 rwxp 00000000 00:00 0 
40627000-40638000 rwxp 00000000 00:00 0 
4078e000-4079f000 rwxp 00000000 00:00 0 
407a4000-407b5000 rwxp 00000000 00:00 0 
40965000-40976000 rwxp 00000000 00:00 0 
40a6d000-40a7e000 rwxp 00000000 00:00 0 
40ad6000-40ae7000 rwxp 00000000 00:00 0 
40b52000-40b63000 rwxp 00000000 00:00 0 
40b7b000-40b8c000 rwxp 00000000 00:00 0 
40c35000-40c46000 rwxp 00000000 00:00 0 
40dda000-40deb000 rwxp 00000000 00:00 0 
40ebd000-40ece000 rwxp 00000000 00:00 0 
40ee1000-40ef2000 rwxp 00000000 00:00 0 
40f48000-40f49000 r--p 00000000 00:00 0 
40f49000-40f5a000 rwxp 00000000 00:00 0 
40fca000-40fdb000 rwxp 00000000 00:00 0 
410f2000-410f3000 ---p 00000000 00:00 0 
411fa000-4120b000 rwxp 00000000 00:00 0 
4122f000-41240000 rwxp 00000000 00:00 0 
412d3000-412e4000 rwxp 00000000 00:00 0 
413ab000-413bc000 rwxp 00000000 00:00 0 
413c4000-413d5000 rwxp 00000000 00:00 0 
41456000-41478000 rwxp 00000000 00:00 0 
414a0000-414b1000 rwxp 00000000 00:00 0 
41698000-416a9000 rwxp 00000000 00:00 0 
416d3000-416e4000 rwxp 00000000 00:00 0 
416f6000-41707000 rwxp 00000000 00:00 0 
41808000-41819000 rwxp 00000000 00:00 0 
41868000-4188a000 rwxp 00000000 00:00 0 
419b2000-419c3000 rwxp 00000000 00:00 0 
41ae8000-41af9000 rwxp 00000000 00:00 0 
41bc8000-41bd9000 rwxp 00000000 00:00 0 
41cc2000-41cd3000 rwxp 00000000 00:00 0 
41d75000-41d86000 rwxp 00000000 00:00 0 
41ddb000-41dec000 rwxp 00000000 00:00 0 
41e0c000-41e1d000 rwxp 00000000 00:00 0 
41e91000-41ea2000 rwxp 00000000 00:00 0 
41ecd000-41ede000 rwxp 00000000 00:00 0 
41f41000-41f52000 rwxp 00000000 00:00 0 
41fbf000-41fd0000 rwxp 00000000 00:00 0 
7f4028000000-7f402804b000 rw-p 00000000 00:00 0 
7f402804b000-7f402c000000 ---p 00000000 00:00 0 
7f402cf2e000-7f402cf32000 rw-p 00000000 00:00 0 
7f402cf32000-7f402cf3b000 ---p 00000000 00:00 0 
7f402cf3b000-7f402d653000 rw-p 00000000 00:00 0                          [stack:23710]
7f402d653000-7f402d6f9000 r-xp 00000000 08:05 396413                     /usr/lib64/libsqlite3.so.0.8.6
7f402d6f9000-7f402d8f9000 ---p 000a6000 08:05 396413                     /usr/lib64/libsqlite3.so.0.8.6
7f402d8f9000-7f402d8fb000 r--p 000a6000 08:05 396413                     /usr/lib64/libsqlite3.so.0.8.6
7f402d8fb000-7f402d8fe000 rw-p 000a8000 08:05 396413                     /usr/lib64/libsqlite3.so.0.8.6
7f402d900000-7f402d910000 rw-p 00000000 00:00 0 
7f402d910000-7f402d966000 r--p 00000000 08:05 397875                     /usr/lib/mono/gac/System.Web.Services/2.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll
7f402d966000-7f402d9ae000 r--p 00000000 08:05 397360                     /usr/lib/mono/gac/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
7f402d9ae000-7f402dfc6000 r--p 00000000 08:05 139939                     /home/smathers/Millennia/Microsoft.ReportViewer.Common.dll
7f402dfc6000-7f402dfed000 r--p 00000000 08:05 139936                     /home/smathers/Millennia/System.Data.SQLite.dll
7f402dfed000-7f402e00f000 r--p 00000000 08:05 6198                       /usr/share/fonts/TTF/liberation/LiberationSans-BoldItalic.ttf
7f402e00f000-7f402e011000 r-xp 00000000 08:05 143210                     /lib64/libnss_mdns4_minimal.so.2
7f402e011000-7f402e210000 ---p 00002000 08:05 143210                     /lib64/libnss_mdns4_minimal.so.2
7f402e210000-7f402e211000 r--p 00001000 08:05 143210                     /lib64/libnss_mdns4_minimal.so.2
7f402e211000-7f402e212000 rw-p 00002000 08:05 143210                     /lib64/libnss_mdns4_minimal.so.2
7f402e214000-7f402eacd000 rw-p 00000000 00:00 0 
7f402eacd000-7f402eade000 r-xp 00000000 08:05 396211                     /usr/lib64/libp11-kit.so.0.0.0
7f402eade000-7f402ecdd000 ---p 00011000 08:05 396211                     /usr/lib64/libp11-kit.so.0.0.0
7f402ecdd000-7f402ecde000 r--p 00010000 08:05 396211                     /usr/lib64/libp11-kit.so.0.0.0
7f402ecde000-7f402ecdf000 rw-p 00011000 08:05 396211                     /usr/lib64/libp11-kit.so.0.0.0
7f402ecdf000-7f402ed44000 r-xp 00000000 08:05 395617                     /usr/lib64/libgmp.so.10.0.4
7f402ed44000-7f402ef43000 ---p 00065000 08:05 395617                     /usr/lib64/libgmp.so.10.0.4
7f402ef43000-7f402ef44000 r--p 00064000 08:05 395617                     /usr/lib64/libgmp.so.10.0.4
7f402ef44000-7f402ef4d000 rw-p 00065000 08:05 395617                     /usr/lib64/libgmp.so.10.0.4
7f402ef4d000-7f402ef5f000 r-xp 00000000 08:05 395791                     /usr/lib64/libhogweed.so.2.1
7f402ef5f000-7f402f15e000 ---p 00012000 08:05 395791                     /usr/lib64/libhogweed.so.2.1
7f402f15e000-7f402f15f000 r--p 00011000 08:05 395791                     /usr/lib64/libhogweed.so.2.1
7f402f15f000-7f402f160000 rw-p 00012000 08:05 395791                     /usr/lib64/libhogweed.so.2.1
7f402f160000-7f402f185000 r-xp 00000000 08:05 396140                     /usr/lib64/libnettle.so.4.3
7f402f185000-7f402f385000 ---p 00025000 08:05 396140                     /usr/lib64/libnettle.so.4.3
7f402f385000-7f402f386000 r--p 00025000 08:05 396140                     /usr/lib64/libnettle.so.4.3
7f402f386000-7f402f387000 rw-p 00026000 08:05 396140                     /usr/lib64/libnettle.so.4.3
7f402f387000-7f402f397000 r-xp 00000000 08:05 396445                     /usr/lib64/libtasn1.so.3.2.0
7f402f397000-7f402f596000 ---p 00010000 08:05 396445                     /usr/lib64/libtasn1.so.3.2.0
7f402f596000-7f402f597000 r--p 0000f000 08:05 396445                     /usr/lib64/libtasn1.so.3.2.0
7f402f597000-7f402f598000 rw-p 00010000 08:05 396445                     /usr/lib64/libtasn1.so.3.2.0
7f402f598000-7f402f5a0000 r-xp 00000000 08:05 395995                     /usr/lib64/libkrb5support.so.0.1
7f402f5a0000-7f402f79f000 ---p 00008000 08:05 395995                     /usr/lib64/libkrb5support.so.0.1Stacktrace:

  at (wrapper managed-to-native) System.Drawing.GDIPlus.GdipCombineRegionRectI (intptr,System.Drawing.Rectangle&,System.Drawing.Drawing2D.CombineMode) <0xffffffff>
  at System.Drawing.Region.Exclude (System.Drawing.Rectangle) <0x00027>
  at (wrapper remoting-invoke-with-check) System.Drawing.Region.Exclude (System.Drawing.Rectangle) <0xffffffff>
  at System.Windows.Forms.Control/DoubleBuffer.End (System.Windows.Forms.PaintEventArgs) <0x0016f>
  at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message&) <0x0016f>
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message&) <0x001e7>
  at System.Windows.Forms.DataGridView.WndProc (System.Windows.Forms.Message&) <0x00013>
  at System.Windows.Forms.Control/ControlWindowTarget.OnMessage (System.Windows.Forms.Message&) <0x00024>
  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) <0x002bc>
  at System.Windows.Forms.XplatUIX11.DispatchMessage (System.Windows.Forms.MSG&) <0x0001f>
  at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG&) <0x00024>
  at System.Windows.Forms.Application.RunLoop (bool,System.Windows.Forms.ApplicationContext) <0x00c73>
  at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext) <0x0005f>
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form) <0x00033>
  at Millennia.Program.Main (string[]) <0x001c7>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        mono() [0x491db2]
        /lib64/libpthread.so.0(+0xef70) [0x7f40407f1f70]
        /lib64/libc.so.6(gsignal+0x35) [0x7f404048b245]
        /lib64/libc.so.6(abort+0x17b) [0x7f404048c7cb]
        /lib64/libc.so.6(+0x6d5be) [0x7f40404c45be]
        /lib64/libc.so.6(+0x73476) [0x7f40404ca476]
        /usr/lib64/libgdiplus.so.0(+0x34352) [0x7f403d9d5352]
        /usr/lib64/libgdiplus.so.0(GdipCombineRegionRect+0xc8) [0x7f403d9d6b08]
        /usr/lib64/libgdiplus.so.0(GdipCombineRegionRectI+0x4f) [0x7f403d9d6c7f]
        [0x41868dd7]

Debug info from gdb:


=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

This appears to be a very old bug in Mono that hasn't been closed out yet. 这似乎是Mono中的一个非常老的错误,尚未被关闭。 It has to do with double buffering: 它与双重缓冲有关:

https://bugzilla.novell.com/show_bug.cgi?id=446341 https://bugzilla.novell.com/show_bug.cgi?id=446341

To answer the question, there's 2 parts: 要回答这个问题,有两个部分:

  1. Compiled on 32b, ran on 64b: That's no issue for .NET or mono 在32b上编译,在64b上运行:.NET或mono没问题
  2. can you run a .NET compiled assembly on mono without problems ? 您可以在Mono上运行.NET编译的程序集而不会出现问题吗? : If your assembly does not P/Invoke and if it uses API implemented on mono, yes, it should run without problems. :如果您的程序集不进行P / Invoke,并且使用的是在Mono上实现的API,则可以运行,而不会出现问题。 There's a tool http://www.mono-project.com/MoMA that can help you check if your app will run on mono 有一个工具http://www.mono-project.com/MoMA可以帮助您检查您的应用是否可以在Mono上运行

now, for your particular issue, look at what @Pete said. 现在,对于您的特定问题,请查看@Pete所说的内容。

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

相关问题 有没有办法强制“任何 CPU”编译的应用程序在 64 位操作系统上以 32 位模式运行? - Is there a way to force an "Any CPU" compiled app to run in 32bit mode on 64bit OS? 为什么.NET将不支持32位的SSE(而ryujit支持64位),而Mono同时支持32位和64位呢? - Why .NET will does not support SSE in 32bit (while ryujit 64bit can) while Mono supports both 32bit and 64bit? 如何以编程方式检测DLL是在.NET中编译为32位还是64位? - How can I detect, programmatically, whether a DLL is compiled 32bit or 64bit in .NET? .NET应用程序如何运行32位和64位Office? - How can .NET app run with 32bit and 64bit Office? 在64位操作系统中运行32位.NET应用程序,真的很糟糕吗? - Running 32bit .NET application in 64bit OS, is it really bad? 在64位操作系统上运行32位.NET应用程序速度较慢 - Running 32bit .NET application in 64bit OS slow ODP.NET适用于32位和64位 - ODP.NET for both 32bit and 64bit CorFlags说我的.NET程序以64位运行,而DumpBin则是32位 - CorFlags says my .NET-Program runs as 64bit while DumpBin means it is 32bit 从64位.NET程序使用32位COM服务器 - Use 32bit COM Server from a 64bit .NET Program 我可以从64位应用程序运行C#程序集(dll)为32位吗? - Can I run a C# assembly (dll) as 32bit from a 64bit application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM