CE 6.0 / .NET CF 3.5 Detected Serious Error (MC3100)

When I exit my .NET CF 3.5 application on the Motorola MC3100 (CE version 6.0 only), I get the error message "The xxx application has detected a serious error and needs to be disabled." Then I need to warm up the device boot so that the application works again.

This code works fine until the application shuts down and it fails if the font is installed in the control in the application. Everything also works fine on .NET CF 2.0 and all other Motorola, Intermec, Psion, HHC devices that I tried with .NET CF 3.5.

Here is my current test code:

[MTAThread] static void Main() { Control oCtrl = new Control(); oCtrl.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Bold); // Setting the controls font to null works // oCtrl.Font = null; Works // Setting the Control to null does not work, still get error // oCtrl = null; Doesn't work // Setting a font, not on a control, also works fine. // System.Drawing.Font font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Bold); } 

I saw several links that seem to be related:

But for now, the only recommendation I have found is to eliminate fonts in the application. In this case, there are too many places where fonts are installed, including related assemblies, which would be impossible.

Has anyone else seen something like this. Something seems to be related to the fact that the controls do not correctly place the fonts in these versions.

+6
source share
8 answers

I faced the same problem. Tried the following (no one solved the problem):

  • Delete all new Font() statements
  • Use Form.Close() instead of Application.Exit()
  • Move entire application to .NET CF 3.5
  • Trying to remove SQLite dependencies

The only solution that finally worked for our case (but this is not a “beautiful” solution) was the next command in MainForm.Closed()

 Process.GetCurrentProcess().Kill() 
+2
source

I ran into the same problem: Motorola MC3100 with wince6, only crash when the application exits when it starts offline and no crash when working with the VS debugger. when the OS crashed, it was HS, and the only solution was to cool the device.

And I manage to handle this with the following solution.

My application used Application.exit () in a modal subform, and it seems like it does a poor job with some of the unmanaged resources used by the font.

in my case, the exact reason was the use of the new font (...) in my main form. using it in a modal subordinate form did not cause any problems.

Bringing application.exit () back to the main form didn’t work either, nor did I explicitly recycle the font ressources (I made many attempts oriented this way).

In the end, the only solution I found is to close the application by closing the main form instead of using application.exit (), and it works well.

0
source

Application.Exit () is not recommended for closing applications. Close all open forms to close the application.

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

0
source

I had this exact problem with the MC3190. The solution I found was to keep track of all the forms open in the application, adding each instance to the global list and to the application completion loop through the list and calling Form.Dispose for each item in the list. I was emphasized several times.

0
source

We encountered this problem with Motorola MC3190 devices running Windows CE 6.0 / .NET 3.5 CF. For several months, we encountered an intermittent fatal error dialog when closing our application. Every possible option has been examined from ThreadAbort exceptions to ensure that each individual resource is correctly located.

Usually, if a device does not have a specific font or tries to access one that is not recognized, it will be the default for Arial. However, with the MC3190, if the font is not recognized, the device displays a fatal error dialog box and freezes after exiting the application. This causes the user to keep warm (sometimes a cold boot).

We came up with two solutions to this problem:

  • Install the application font for everything that is supported (replace Tahoma with Arial)
  • Reset any global font objects either by creating an instance with a supported font, or by setting a value of zero.
0
source

You must create the form and run your code in the context of Application.Run (). At the end of Run, many resources are located "by magic." Otherwise, you must manage all the resources that must be deleted.

0
source

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

 Process.GetCurrentProcess().Kill() 
0
source

I had the same issue on a Motorola 9190-G using the .NET Compact Framework 3.5. Sometimes I had to heat up the device because it freezes after closing my application.

I managed to solve the problem by specifying the font of the ListView form contained in the Constructor for Arial, 10pt, Regular. Then I programmatically set the font to the desired font. For example, myListView.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Bold); .

If I had a font installed on any other combination of fonts / fonts / size, I would get the error message "the program has encountered a serious problem and must end" when I close the application on my mobile device.

0
source

Source: https://habr.com/ru/post/916392/


All Articles