2013-02-14 42 views
0

我在Windows 7 32位系統上編寫了一個程序,並在另一臺機器上的64位Linux系統上運行它。它正如以下所示顯示運行時問題。但是,我們甚至將MONO更新爲最新的穩定版本。在32位操作系統上編譯的.NET程序能否在64位Linux系統下運行,沒有任何問題?

======= 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:     /lib64/libnss_mdns4_minimal.so.2 
7f402e011000-7f402e210000 ---p 00002000 08:     /lib64/libnss_mdns4_minimal.so.2 
7f402e210000-7f402e211000 r--p 00001000 08:     /lib64/libnss_mdns4_minimal.so.2 
7f402e211000-7f402e212000 rw-p 00002000 08:     /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. 
================================================================= 
+2

看起來像你回答自己的問題。你編譯它,它沒有運行,並且有問題... – 2013-02-14 19:34:54

+0

你確定這個程序在MONO下運行在任何環境中嗎? MONO是***不是完美的替代品。 – 2013-02-14 19:37:28

+0

@BaileyS這是過去3個月在線人們所聽到的。我只是想弄清楚自己。我的程序有點複雜。所以,它基本上運行一段時間,然後崩潰。 – ThN 2013-02-14 19:41:51

回答

3

這似乎是一個非常古老的錯誤,尚未關閉。它有雙緩衝做:

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

+0

我確實爲我的一些winforms啓用了雙緩衝屬性。如果你所說的是真的,我必須重寫很多我的代碼。哎喲!!! – ThN 2013-02-15 13:36:32

+1

@digitalanalog您會注意到,在異常調用堆棧中,您調用了WmPaint(),然後調用Control/DoubleBuffer.End。這就是爲什麼我提出了雙緩衝問題。 – Pete 2013-02-15 13:45:44

+0

皮特你是絕對正確的。我剛剛確認你的答案。我只是簡單地運行我的程序,而沒有顯示或加載這些雙緩存winform,並且我的程序長時間運行並且沒有崩潰地運行。然後,我用雙緩衝打開的一個winform運行我的程序,並在運行該程序的10分鐘內崩潰,出現上述錯誤消息。至少現在我知道問題是什麼。謝謝。 – ThN 2013-02-15 20:13:36

2

要回答這個問題,有兩個部分:

  1. 編譯於32B,跑64B:這對.NET或單
  2. 沒有問題
  3. 你可以在沒有問題的情況下在單聲道上運行.NET編譯程序集嗎? :如果你的程序集沒有P/Invoke,並且它使用在單聲道上實現的API,是的,它應該運行沒有問題。有一個工具http://www.mono-project.com/MoMA,可以幫助你檢查你的應用程序是否會運行在單聲道上

現在,針對你的特定問題,看看@Pete說了些什麼。

+0

我的程序確實在我的程序中使用了很少的P/Invoke。 – ThN 2013-02-15 13:37:28

相關問題