Hello again,
another problem concerning the Refresh when multithreading is enabled:
Occasionally, the following error occurs:
System.NullReferenceException occurred
Message: Exception thrown: ‘System.NullReferenceException’ in DesktopEdition.dll
Additional information: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
> DesktopEdition.dll!ThinkGeo.MapSuite.DesktopEdition.WinformsMap.dxQ=(object drawingOverlaysObject) Unknown
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(object state) Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() Unknown
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() Unknown
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() Unknown
I cannot define the specific state in which this error occurs as it is quite hard to debug. However, the thread in which the error occurs, seems to be the one executing the asynchronous refresh.
Do you have an idea what can cause the above error?
Are PDB symbols available for debugging purposes?
Thank you.
Error during Refresh when multi-threading is enabled
Hi Marko,
Sorry I don’t recreate the issue. Could you please append more information here? For example:
1. What’s version did you reference?
2. What’s the OS?
3. What’s the culture on your side?
Thanks,
Peter
Hi Peter,
I also failed at creating an example solution where the problem is reproducible. However, in our big application, it still occurs and I need to debug it.
Concerning your questions:
1. I use version 9.0.0.190 of the map suite.
2. Windows 7 SP1
3. German culture
Do you know whether PDBs are available? It might really help to know what reference exactly is not set that causes the NullReferenceException.
Thanks,
Marko
Hi Marko,
Thanks for your more information. I try to recreate the issue based on the information, but I’m sorry to say that I was failed to do that.
There are no any PDBs available for our publishing DLLs. Please try turning on the Exceptions(DEBUGS -> Exceptions…) in vs IDE to get more information about the exception if possible.
I want to confirm somethings from your reply, I just outline them as following:
1. What did you do on the map when the exception occurs?
2. What are the formats and size of data your application uses?
Some code snippets attached here would be better.
Thanks,
Peter
Hello,
I guess it was some locking issue. I introduced read/write locking during overlay access and now the error does not occur any more.
Thank you for your help.
Marko
Hi Marko,
I am glad to hear you solved that and thanks for your sharing.
Regards,
Don