Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7082763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:05:41+00:00 2026-05-28T07:05:41+00:00

I’m building a C# application for a Windows CE machine. The CE machine is

  • 0

I’m building a C# application for a Windows CE machine. The CE machine is talking to a serial device, and I’m using the SerialPort class.

When I run the project from Visual Studio by right-clicking and deploying, it will run fine for fifteen to twenty minutes before slowing down and eventually crashing from running out of memory, but when I deploy the solution and run it locally from the CE machine (navigate to the folder, open the exe), it runs fine for a whole day, which is as long as I’ve tried it.

I don’t know why. I’ve tried building for release and debug, and it makes no difference. The only thing that seems to is where it’s run from. I’ve also tried profiling the application using dotTrace, and it appears that it’s being deployed to the CE machine before profiling starts; in any case, I can’t reproduce the bug while the profiler is running.

I’ve also tried packaging the code that’s handling the serial stream into a DLL, thinking that maybe Visual Studio was messing with something inside of it while debugging, but that didn’t change anything, either.

Is there anything I can do to increase the stability of running from the IDE? I like being able to debug with it, but the inconsistency makes me feel like I might be doing something wrong.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:05:42+00:00Added an answer on May 28, 2026 at 7:05 am

    As far as we’ve been able to tell, the problem I described is related to the SerialPort class from System.IO.Ports. I think it might be related to some of the problems described here; the managed SerialPort class calls into WinAPI code that’s unmanaged inside of a loop, something goes wrong, and that unmanaged memory is lost.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.