0

We are trying to debug a memory leak in a .NET Compact Framework application running on Windows Embedded Compact 7. Unfortunately we can't use the CLR Profiler because it generates an "unsupported instruction set" error message and is apparently incompatible with this set-up.

We can see all our objects being disposed but they are never finalized and freed up, causing the app to eventually run out of memory. There must be references left somewhere but without any debugging tools we can't track them down. Is there a way to dump data from the Garbage Collector from within out code for debugging? There does not seem to be an API but clearly the CLR Profiler has some way of doing it.

Alternatively is there any way to fix the CLR Profiler? Someone else asked about that (Visual Studio Device: Unsupported Instruction Set error while connecting to .Net CF CLR Profiler) but no-one even understood the question, let alone answered it.

Note: I'm not looking for help with our code and can't post it here (it is proprietary and huge), just with the debugging tools. Thanks.

Community
  • 1
  • 1
  • possible duplicate of [Memory profiler for .NET Compact Framework](http://stackoverflow.com/questions/1048939/memory-profiler-for-net-compact-framework) – Hans Passant Feb 06 '13 at 14:03
  • Unfortunately all the answers given to that question are about the CLR Profiler or Resource Monitor, neither of which work. Unless you have a solution to the "unsupported instruction set" error... –  Feb 07 '13 at 08:42
  • *** sigh *** It seems that resource debugging is totally and utterly broken in .NETCF3.5 and Windows Embedded Compact 7. –  Feb 08 '13 at 09:14
  • @MoJo Were you able to make CLR Profiler work? I have same issue. I can run RPM using TCP but CLR doesn't work. – Marshal Jun 09 '16 at 17:43
  • No, we gave up in the end. So much is broken with .NET on the Compact platform that we went back to writing apps in C++. –  Jun 09 '16 at 20:51

1 Answers1

0

The problem is ActiveSync, it does work if you set it up as a TCP device.

Follow the instructions here: http://social.msdn.microsoft.com/Forums/en-US/0fd6095d-3532-460a-9a2e-5beb1d823781/unsupported-instruction-set-message-to-connect-to-netcf-35-device-for-using-remote-performance?forum=winembmngdapp

Broadly:

Copy rtfhost3_5.exe and rtf3_5.dll to the \Windows directory on the device. These files are located in Program Files\Microsoft.NET\SDK\CompactFramework\version\bin.

Run rtfhost3_5.exe to get an IP address.

Add a new "Manual TCP" device, with the IP address the rtfhost3_5.exe showed you.

Use that new device when connecting from the various tools.

Nik
  • 2,718
  • 23
  • 34