PC Review


Reply
Thread Tools Rate Thread

Help Debugging MissingMethodException Error

 
 
Rich M
Guest
Posts: n/a
 
      13th Jun 2005
I have two users of my software getting a MissingMethodException that seems
to be tied to certain today plugins being loaded. My call to my unmanaged
function is done near the end of my application's startup initialization.
This occurs after initializing a list control that is data bound to a SQLCE
database. I have found that if the user accesses an empty database or
disables the plugins, the exception no longer occurs. I was also able to
work around the exception by calling one of my unmanaged methods early in my
app setup initialization. I assume this works because the dll is loaded
before memory becomes fragmented (or before NETCF allocates additional
memory and does not leave enough to load my unmanaged dll???) and later when
the call that previously generate the exception does not because the dll has
already been loaded. I am thinking of using this approach of "pre-loading"
my unmanaged dll early in the app setup to fix this problem but wondered if
I am missing what the real problem is.

My app is built with VS2003 using C# and running on Windows Mobile 2003SE
devices. If no plugins are loaded, my app runs the code without a problem.
One user can reproduce this when he enables both Marsware WeatherPanel
v2.3.1 and SBSH PocketBreeze v4.3.08 (with ContactBreeze v1.0.16). With only
one of these plugins loaded, my app runs fine. My first guess was an out of
memory condition, but that in itself does not seem to be the case unless
fragmentation is an issue (see memory stats below). My other user reports
that Pocket Informant and any one of his SPB plugins (Pocket Plus, Weather
or Diary) will cause this. Is there any way to get more detailed information
as to the cause of the error? I placed a MessageBox call at the top of my
unmanaged function and it does not execute when the MissingMethodExeception
is thrown.

Code:
[DllImport("DnzUnmgd.dll", EntryPoint="RT_InstallWinProc",
SetLastError=true)]
private static extern int RT_InstallWinProc(IntPtr hwndInk, IntPtr
hwndManaged);
RT_InstallWinProc( hWnd, handle); <=== Throws
MissingMethodException

Main Memory Stats (with WeatherPanel and PocketBreeze plugins enabled):
Storage Free Program Free
After soft-reset: 4.44 11.47
After catching
MissingMethod 4.43 4.28
Exception

Main Memory Stats (with WeatherPanel and PocketBreeze plugins disabled and
additional data copied to main memory to reduce free memory):
Storage Free Program Free
After soft-reset: 1.64 7.24
After successful
unmanaged call 1.64 0.34

From the memory stats, I conclude that my app can startup in when there is
less than 9 MB free space, yet with the plugins loaded with over 15MB free
space, I get the MissingMethodException. Unless memory fragmentation is
playing a role, I don't see why the error would be caused by a out of memory
condition.

Any thoughts as to what is really going wrong would be appreciated.
Thanks,
Rich


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Barcode error MissingMethodException Khano Microsoft Dot NET Compact Framework 4 22nd Aug 2005 02:02 PM
Please Help! - Getting 'System.MissingMethodException' error when using Class Library ShakeDoctor Microsoft Dot NET Compact Framework 3 6th Apr 2005 09:32 PM
Newbie: MissingMethodException error with managed/unmanaged C++ =?Utf-8?B?V2hpdG5leSBLZXc=?= Microsoft Dot NET Compact Framework 1 30th Nov 2004 12:10 PM
Error message ''System.MissingMethodException' on simple CF app fouch.soft Microsoft Dot NET Compact Framework 0 14th Sep 2003 03:44 AM
Just-In-Time Debugging / Error, A runtime error has occured Bill B Windows XP Internet Explorer 1 2nd Sep 2003 10:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:52 PM.