CE 6.0 / .NET CF 3.5 Application has encountered a serious error (MC3100)

后端 未结 8 1217
别那么骄傲
别那么骄傲 2021-02-09 06:45

When exiting my .NET CF 3.5 application on the Motorola MC3100 (CE 6.0 version only) I get the error message \"Application xxx has encountered a serious error and needs to shut

相关标签:
8条回答
  • 2021-02-09 07:20

    Application.Exit() is not recommended way to close applications. Close all opened forms in order to close application.

    http://blogs.msdn.com/b/tom_krueger/archive/2005/02/24/379678.aspx

    0 讨论(0)
  • 2021-02-09 07:22

    I had the same problem on a Motorola 9190-G using the .NET Compact Framework 3.5. At times I would have to warm boot the device because it would freeze after closing my application.

    I was able to workaround the issue by specifying the font of the form the ListView was contained in in the Constructor to be Arial, 10pt, Regular. I then programmatically set the font to my desired font. For example, myListView.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Bold);.

    If I had the font set to any other font/font style/size combination, I would receive the "program encountered a serious problem and must shutdown" error message when closing the application on the mobile device.

    0 讨论(0)
  • 2021-02-09 07:24

    We experienced this issue with Motorola MC3190 devices running Windows CE 6.0 / .NET 3.5 CF. For months we were encountering an intermittent fatal error dialog upon closing our application. Every possible option was explored from ThreadAbort exceptions to making sure every single resource was properly disposed.

    Normally, if a device doesn't have a particular font or is trying to access one that happens to be unrecognized, it will default to Arial. With the MC3190 however, if a font isn't recognized, the device will display a fatal error dialog and freeze after exiting an application. This results in the user having to warm boot (sometimes cold boot).

    We came up with two solutions to this problem:

    1. Set the application-wide font to something that is supported (replace Tahoma with Arial)
    2. Reset any global Font objects either by instantiating with a supported font OR setting to null.
    0 讨论(0)
  • 2021-02-09 07:32

    I faced exactly the same problem. Tried the following (none solved the issue):

    • Remove all the new Font() statements
    • Use Form.Close() instead of Application.Exit()
    • Move the whole application to .NET CF 3.5
    • Attempt to remove SQLite dependencies

    The only solution that finally worked for our case, (however it is not a "pretty" solution), has been the following command in the MainForm.Closed()

    Process.GetCurrentProcess().Kill()
    
    0 讨论(0)
  • 2021-02-09 07:34

    We encountered the same problem and solved with this line of code in the MainForm.Closed()

    Process.GetCurrentProcess().Kill()
    
    0 讨论(0)
  • 2021-02-09 07:42

    You should make a Form and run your code in Application.Run() context. At the end of Run, many resources are disposed "by magic". Otherwise you must dispose every resources that need to be disposed.

    0 讨论(0)
提交回复
热议问题