Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all 1710 articles
Browse latest View live

How to deal with events/callbacks from something that appears to be on an MTA thread.

$
0
0

I am writing code with Visual Studio 2010 in VB.net with a WPF project.  I have added references to MSHTML and SHDocvw as I am automating an Internet Explorer window.  Note I am not hosting the webbrowser on a form.  I am currently using the Shdocvw.InternetExplorer class to do this.

Irrespective of whether it is this class or another I assume my questions is a Managed Code / unmanaged code problem.

I am using WithEvents for my events.  The problem is that I must use an STA thread to for example do anything with MSHTML but the events that come back from Internet Explorer are MTA threads.  To work around this I have used a dispatcher, but this is not I think the best solution and I am thinking there must be a better way.  This whole COM / Managed / Unmanaged code is a little bit hard to come to grips with as there are too many options.

So what is the correct way of dealing with the events raised?



Could not load file or assemple...incorrect format

$
0
0

My application runs well in debug mode.   When I moved it to the server (SBS 2011), it failed with the above error.   I have installed VS 2012 and copied all my files to thewwwoot folder on the server and it works in debug mode on the server.   I am stumped.   I have found lots of folks with similar problems, but I can't ascertain which dependency is missing or the issure with format.   The program is written in asp.net and vb.net.

The only thing unusual is that I was utilizing the VS login and was having to many problems with SQL express; so, I removed all of the references to it and built my own login page.  

Thanks...

Server Error in '/ranch Inventory' Application.
--------------------------------------------------------------------------------


 Could not load file or assembly 'Ranch Inventory' or one of its dependencies. An attempt was made to load a program with an incorrect format. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.BadImageFormatException: Could not load file or assembly 'Ranch Inventory' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Source Error: 




An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Assembly Load Trace: The following information can be helpful to determine why the assembly 'Ranch Inventory' could not be loaded.





WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
 

Stack Trace: 





[BadImageFormatException: Could not load file or assembly 'Ranch Inventory' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
   System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +210
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +242
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +17
   System.Reflection.Assembly.Load(String assemblyString) +35
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +122

[ConfigurationErrorsException: Could not load file or assembly 'Ranch Inventory' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +12761078
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +503
   System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +142
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +334
   System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath) +203
   System.Web.Compilation.BuildManager.ExecutePreAppStart() +152
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1151

[HttpException (0x80004005): Could not load file or assembly 'Ranch Inventory' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12881540
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12722601

Types that own native resources should be disposable error - how to clear

$
0
0
I have a project with this class, which stores information about a WinUsb device:
internal class DeviceInfo {  internal SafeFileHandle deviceHandle;        internal IntPtr winUsbHandle;        internal Byte bulkInPipe;        internal Byte bulkOutPipe;        internal Byte interruptInPipe;        internal Byte interruptOutPipe;        internal UInt32 deviceSpeed;}        
Doing Build > Run code analysis results in this message:

CA1049 Types that own native resources should be disposable
Implement IDisposable on 'WinUsbDevice.DeviceInfo'.
WinUsb_cs - WinUsbDevice.cs (Line 30)

Following the example here:

http://msdn.microsoft.com/en-us/library/ms182173.aspx

I replaced the DeviceInfo class above with:

public class UnmanagedResources : IDisposable
{    public class DeviceInfo    {        internal SafeFileHandle DeviceHandle;        internal IntPtr WinUsbHandle;        internal Byte BulkInPipe;        internal Byte BulkOutPipe;        internal Byte InterruptInPipe;        internal Byte InterruptOutPipe;        internal UInt32 DeviceSpeed;    }    bool disposed = false;     public UnmanagedResources()    {        // Allocate the unmanaged resource ...                            }     public void Dispose()    {        Dispose(true);        GC.SuppressFinalize(this);    }     protected virtual void Dispose(bool disposing)    {        if (!disposed)        {            if (disposing)            {                // Release managed resources.            }             // Free the unmanaged resource ...                                 disposed = true;        }    }     ~UnmanagedResources()    {        Dispose(false);    }
}
Am I on the right track, and if so, how do I:

Allocate the unmanaged resource

and

Free the unmanaged resource

to clear the error message?

Additional information:

The code above is in my solution's WinUsbCommunications class.

In my FrmMain class, I create a DeviceInfo object:

private WinUsbCommunications.UnmanagedResources.DeviceInfo _myDeviceInfo = new WinUsbCommunications.UnmanagedResources.DeviceInfo();
Other code in FrmMain passes _myDeviceInfo in calls to WinUsbCommunications functions that access the WinUsb device.

System.Out of Memory Exception in Desktop Application

$
0
0

System.Out of Memory Exception

When I run my desktop application developed on C#.Net in which I have used a third party control named "Infragistic" continuously for 2 to 3 hours then after I start getting "System out of memory" which occurs due to to the reason that user objects start increasing in the memory (exceeds 10,000). This error occurs in the whole application, please suggest any solution for this.

Snap shot is attached.

Please suugest code also for this solution

Generic extension method type restriction should be evaluated by the compiler.

$
0
0

So I bring some example where I encountered this problem:

I have some classes:

public abstract class HtmlElement { /* ... */ }
public abstract class UIElement : HtmlElement { /* ... */ }
public abstract class ButtonBase : UIElement { /* ... */ }
public class LinkButton : ButtonBase { /* ... */ }
public class ActionButton : ButtonBase { /* ... */ }

And I have some extension methods:

  public static class HtmlElementExtensions
  {
    public static T Id<T>(this T item, string id) where T : HtmlElement
    {
      /* set the id */
      return item;
    }
  }
  public static class ButtonBaseExtensions
  {
    public static T Id<T>(this T item, string id) where T : ButtonBase
    {
      /* set the id and do some button specific stuff*/
      return item;
    }
  }

All extension methods in one namespacce (can't separete them).

When I try to call the Id method on a LinkButton like this:

LinkButton lb = new LinkButton().Id("asd");

The compiler says it's ambigouos call. I understand why, but if the compiler watch the restrictions it could bind that call to the LinkButtonExtensionMethods.Id.

Just like non-generic extension methods:

  public class BaseClass { /*...*/ }
  public class InheritedClass : BaseClass { /*...*/ }

  public static class BaseClassExtensions
  {
    public static void SomeMethod(this BaseClass item, string someParameter)
    {
      Console.WriteLine(string.Format("BaseClassExtensions.SomeMethod called wtih parameter: {0}", someParameter));
    }
  }

  public static class InheritedClassExtensions
  {
    public static void SomeMethod(this InheritedClass item, string someParameter)
    {
      Console.WriteLine(string.Format("InheritedClassExtensions.SomeMethod called wtih parameter: {0}", someParameter));
    }
  }

And  if I instantiate these:

BaseClass bc = new BaseClass();
InheritedClass ic = new InheritedClass();
BaseClass ic_as_bc = new InheritedClass();

bc.SomeMethod("bc");
ic.SomeMethod("ic");
ic_as_bc.SomeMethod("ic_as_bc");

I got this output (without any error or warning):

BaseClassExtensions.SomeMethod called wtih parameter: bc
InheritedClassExtensions.SomeMethod called wtih parameter: ic
BaseClassExtensions.SomeMethod called wtih parameter: ic_as_bc

Thanks for reading,

Péter


Large C# forms app much slower in Win8

$
0
0

Hello,

I have a C# Windows Forms app that has many buttons on many tabbed pages, where each button corresponds to an adjacent text box.  I type whatever I want into the text boxes and when I click a button it merely places the text in the corresponding text box onto the clipboard, and that's all the application does.  I originally wrote it using VS2010 Pro on Win7-64bit Pro and it worked perfectly.  However, I then downgraded to Win 8-64bit Pro and the same executable would no longer run properly in that when I clicked a button it no longer put the text on the clipboard.  Along with Win 8 I also upgraded(?) to VS2012 Pro, so I merely recompiled the program in hopes that would fix the problem.  However, when I tried to run it I got a runtime stack overflow in the automatically-generated "InitializeComponent" function, which never occurred before.

My application is big - there are over 66 thousand statements in the "InitializeComponent" function.  Although I should not have to manually modify an automatically-generated file I went ahead and moved those 66K statements out of InitializeComponent, split them into ~10K groups, placed them into 6 separate functions.  I then called those 6 functions from InitializeComponent, the stack overflow problem went away, and the application once again worked.  Then I noticed another problem:  In the Win7 version the application took about 10 seconds to startup but in the Win8 version it now takes over 1 minute.  I'm using a 3.07GHz i7 CPU with 12GB RAM, a 256GB primary SDD with plenty of unused space on it, and a secondary HDD with plenty of unused space on it to.

So, I have these questions:
1. Why wouldn't the original Win7 .exe run properly on Win8?
2. After recompiling with VS2012 why did I start getting stack overflows in the InitializeComponent function?
3. Is there some way to increase the allowed stack space?
4. Why does the application now take such an unreasonable amount of time to start up?

Thanks,
Ray Mitchell

Failed to debug C# application developed and compiled in .net 3.5 but targeted to .net 4.0 and 3.5 using windebug

$
0
0

Failed to debug C# application in a host having both .net 4.0 and 3.5 using windebug. This application was developed and compiled in .net 3.5 environment but targeted to .net 4.0 and 3.5 using windebug.

Any suggestions on this?

VS2010 Crashes on debug

$
0
0

Hi!

I've encountered a strange problem with VS2010 SP1 on one of our networks.

We have 2 separate managed networks. The only real difference between them is a few group policies.

On one network VS2010 SP1 works fine, however, on the other network the following happens.

Open a new project (existing or blank), click debug (or build the project) and VS crashes.
when VS restarts, debug works as normal UNTIL something in the project changes. Then VS crashes and upon restart, all changes are saved and debug works again as normal until changes are made.
the change can be anything, adding an element to a form, any coding, renaming a form etc etc.

Event log do show an event:

Event ID 1000

"Faulting application devenv.exe version 10.0.40229.1, stamp 4d5f2a73, faulting module unknown, version 0, stamp 0, debug? 0, fault address 0x05cccccc"

The issue occurs on a fresh build, with a fresh install of VS2010 with SP1.
The issue occurs when using devenv.exe /safemode and when using Devenv /ResetSkipPkgs

The issue occurs when using an admin account
devenv.exe /log only seems to log start up activities

procmon logs don't show any access denied messages (though as I'm using an admin account, I wouldn't expect that anyway).

I'm in the process of having the machine moved to an unmanaged OU to rule out any group policy issues before analysing RSoP scans

I've ruled out running the uninstall tool, as this is also occurring on other machines, all on built on the same network, with VS installed using the same install source as machine on the other network that work fine.
for the above reason I've also ruled out account corruption issues.

I'm also checking that all updates are installed using MBSA.

Has anyone seen this before? (have found people experiencing a similar issue, not not quite the same, on various forums)
Can anyone suggest anything else i can try to get to the bottom of this?

Cheers!

Paul



Debug and trace logging tools for windows application (not WPF windows app)

$
0
0

Hi,

I have developed a windows application for our company. The application is ready for release. Now, we need to include debug and trace logging for all our code and error logging when any runtime exceptions arise on customer's PC. We need our application to write regular trace logs to customer's PC and whenever a runtime error occurs on customer's PC, the application should send all required logs to our company's email address.

I explored regarding trace logging tools for .Net and found a list of tools in the linkhttp://www.dotnetlogging.com

With all the tools and libraries mentioned in this link, we should write our own trace using the methods in these libraries. I came to know about a toolVBWatch which is used for VB6 applications. This tool automatically writes all trace code for all the methods while building the application. So, our exe will be compiled with all this trace code. We need not write the trace code on our own. Whenever a runtime exception occurs on customer's PC, this VB Watch's dll/ocx, compresses all the log files along with error log and sends an email to the given email id.

So, we want to use a trace logging application similar to this VB Watch which automatically writes all the trace code. So that this reduces writing the trace on our own for all methods.

Please suggest if there is any tool similar to VB Watch for a .Net windows application.

Thanks in Advance!

Surya Praveen

Pointer of String in C#

$
0
0

Hello guys,

I need to use an external non com dlls (made in C) which as a method with the following signature: public static external void logic_open(long xpto).

In this method the long atribute is a reference to a string which by the way is a ip adress of a machine.

I cannot change the c api, so how can I in c#, get the pointer of such string and pass it to the function?

I have already tried marshalling and all that stuff but nothing...

Thanks


Rui Machado

Create PPPOE Connection with wmi

$
0
0

hi

can i create pppoe connection using wmi? if it s possible to do in wmi is there any sample code?

thanks for any help


Alimardani

OutOfMemoryException while trying to read Access Databse (few hundered MB)

$
0
0

I am trying to read back from an Access database into a Queue(of objects) in VB .Net.

The problem is that the readback works just fine for smaller datasets (say a few MB database). When I try to readback a 200MB into the queue, I start getting a OutOfMemoryException.

The readback is in a background thread of it's own and the dataset has about a 100K rows. At the time, OutOfMemoryException is caught, my queue has a count around 50,000 +/- 5000.

Any ideas on why the system is running out of memory just with a couple hundered MB database(I am working with 8GB RAM)

reflectiontypeloadexception unable to load one or more of the requested types

$
0
0

Hello,

I have a dialog which loads all classes that belongs to given Interface in the current Assembly , that works very nice without any error on my maschine but does not work on my collegues maschine , it gives him following error 

 void ClassSelectionDialog_Loaded(object sender, RoutedEventArgs e)
        {
            fullpath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            foreach (string dll in Directory.GetFiles(fullpath, "*.dll"))
            {
                try
                {
                    ProxyDomain pd=new ProxyDomain();
                    Assembly asm = pd.GetAssembly(dll);
                    int cnt = asm.GetTypes().Where(p => p.GetInterface(Interface) != null).Count();
                    if (cnt > 0)
                    {
                        lstAssemblies.Items.Add(Assembly.LoadFile(dll).GetName().Name);
                        break;
                    }
                }
                catch { }
            }
            //foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies())
            //{
            //    lstAssemblies.Items.Add(asm.GetName().Name);
            //}
        }
 class ProxyDomain : MarshalByRefObject
    {
        public Assembly GetAssembly(string AssemblyPath)
        {
            try
            {
                return Assembly.LoadFrom(AssemblyPath);
            }
            catch (Exception ex)
            {
                throw new InvalidOperationException(ex.Message);
            }
        }
    }

above is my code for loading assembly and classes. 


Sincerely, dhampall Please remember to mark the replies as answers if they help and unmark them if they provide no help.

AppDomain Unload Exception:LocalDataStoreSlot storage has been freed

$
0
0

I rehost WorkflowDesigner in seperate AppDomain, When I invoke AppDoamin.Unload(domain) to unload an AppDomain,

InvalidOperationException "LocalDataStoreSlot storage has been freed" occured.

Anyone else has this problem?

Details: An unhandled exception of type 'System.InvalidOperationException' occurred in mscorlib.dll

Additional information: LocalDataStoreSlot storage has been freed.


Not clear about encrypting connection string in app.config

$
0
0

I am going to implement encryption of my connection string in my app.config file for the first time. 

This is the code I will be referencing  from MSDN:

static void ToggleConfigEncryption(string exeConfigName)
{
// Takes the executable file name without the
// .config extension.
try
{
// Open the configuration file and retrieve
// the connectionStrings section.
Configuration config = ConfigurationManager.
OpenExeConfiguration(exeConfigName);

ConnectionStringsSection section =
config.GetSection("connectionStrings")
as ConnectionStringsSection;

if (section.SectionInformation.IsProtected)
{
// Remove encryption.
section.SectionInformation.UnprotectSection();
}
else
{
// Encrypt the section.
section.SectionInformation.ProtectSection(
"DataProtectionConfigurationProvider");
}
// Save the current configuration.
config.Save();

Console.WriteLine("Protected={0}",
section.SectionInformation.IsProtected);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}

My question is: Does this encrypt and decrypt the connection in the app.config.exe file each time the program is run? I am not exactly clear on how to use this. From my understanding I write my connection string into my app.config file located in my solution explorer then call this code on application load up and once it is in production the config file turns into a config.exe which is always encrypted from prying eyes? I am not sure how to connect saving the connection string during development to the encryption process.


Debug and trace logging tools for windows application

$
0
0

Hi,

I have developed a windows application for our company. The application is ready for release. Now, we need to include debug and trace logging for all our code and error logging when any runtime exceptions arise on customer's PC. We need our application to write regular trace logs to customer's PC and whenever a runtime error occurs on customer's PC, the application should send all required logs to our company's email address.

I explored regarding trace logging tools for .Net and found a list of tools in the linkhttp://www.dotnetlogging.com

With all the tools and libraries mentioned in this link, we should write our own trace using the methods in these libraries. I came to know about a toolVBWatch which is used for VB6 applications. This tool automatically writes all trace code for all the methods while building the application. So, our exe will be compiled with all this trace code. We need not write the trace code on our own. Whenever a runtime exception occurs on customer's PC, this VB Watch's dll/ocx, compresses all the log files along with error log and sends an email to the given email id.

So, we want to use a trace logging application similar to this VB Watch which automatically writes all the trace code. So that this reduces writing the trace on our own for all methods.

Please suggest if there is any tool similar to VB Watch for a .Net windows application.

Thanks in Advance!

PrincipalContext and TLS

$
0
0

Is it possible to use PrincipalContext with TLS?

I know I can use LdapConnection, but I was wondering about PrincipalContext with TLS.

Thanks.

Application Hang When Call System.Runtime.InteropServices.GCHandle.Free()

$
0
0

In Device.Service.exe__PID__324__Date__04_26_2013__Time_10_40_01AM__291__Manual Dump.dmp GC is running in this process.The Thread that triggered the GC is 108

The following threads in Device.Service.exe__PID__324__Date__04_26_2013__Time_10_40_01AM__291__Manual Dump.dmp are waiting for .net garbage collection to finish. Thread 108 triggered the garbage collection.The gargage collector thread wont start doing its work till the time the threads which have pre-emptive GC disabled have finished executing. The following threads havepre-emptive GC disabled 9,12,135,136,141,142,143,146,149,150,151,

 

And Thread "12,135,136,141,142,143,146,149,150,151" is waiting thread "9"

 

Critical Section    0x00551448 

Lock State   Locked

Lock Count   1

Recursion Count   1

Entry Count   0

Contention Count   11

Spin Count   0

Owner Thread   108

Owner Thread System ID   5916

 

 

Critical Section    0x005532c0 

Lock State   Locked

Lock Count   10

Recursion Count   1

Entry Count   0

Contention Count   11

Spin Count   0

Owner Thread   9

Owner Thread System ID   4604

        

        

Thread 9 - System ID 4604

Entry point      0x00000000

Create time    2013-4-26 10:00:27

Time spent in user mode       0 Days 00:00:00.500

Time spent in kernel mode     0 Days 00:00:00.484

 

 

.NET Call Stack

Function

System.Runtime.InteropServices.GCHandle.InternalFree(IntPtr)

System.Runtime.InteropServices.GCHandle.Free()

System.Net.Sockets.SocketAsyncEventArgs.FreeOverlapped(Boolean)

System.Net.Sockets.SocketAsyncEventArgs.Dispose()

NLog.Internal.NetworkSenders.UdpNetworkSender.SocketOperationCompleted(System.Object, System.Net.Sockets.SocketAsyncEventArgs)

System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(System.Net.Sockets.SocketAsyncEventArgs)

System.Net.Sockets.SocketAsyncEventArgs.ExecutionCallback(System.Object)

System.Threading.ExecutionContext.runTryCode(System.Object)

System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)

System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)

System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)

System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(System.Net.Sockets.SocketError, Int32, System.Net.Sockets.SocketFlags)

System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)

System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)

 

Full Call Stack

Function          Source

ntdll!NtDelayExecution+15   

KERNELBASE!SleepEx+65      

clr!__DangerousSwitchToThread+48    

clr!__SwitchToThread+12      

clr!SpinUntil+3a     

clr!SyncTransferCacheHandles+34        

clr!TableQuickRebalanceCache+59       

clr!TableCacheMissOnFree+67     

clr!TableFreeSingleHandleToCache+56          

clr!HndDestroyHandle+9d    

clr!HndDestroyHandleOfUnknownType+19  

clr!DestroyTypedHandle+16

clr!MarshalNative::GCHandleInternalFree+ca     

System.Runtime.InteropServices.GCHandle.Free()      

System.Net.Sockets.SocketAsyncEventArgs.FreeOverlapped(Boolean)      

System.Net.Sockets.SocketAsyncEventArgs.Dispose()         

System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(System.Net.Sockets.SocketAsyncEventArgs)         

System.Net.Sockets.SocketAsyncEventArgs.ExecutionCallback(System.Object)        

System.Threading.ExecutionContext.runTryCode(System.Object)      

clr!CallDescrWorker+33         

clr!CallDescrWorkerWithHandler+8e   

clr!MethodDesc::CallDescr+194  

clr!MethodDesc::CallTargetWorker+21        

clr!MethodDescCallSite::CallWithValueTypes+1c         

clr!ExecuteCodeWithGuaranteedCleanupHelper+bb   

clr!ReflectionInvocation::ExecuteCodeWithGuaranteedCleanup+138        

System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)     

System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)        

System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(System.Net.Sockets.SocketError, Int32, System.Net.Sockets.SocketFlags)

System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)      

System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)        

clr!CallDescrWorker+33         

clr!CallDescrWorkerWithHandler+8e   

clr!DispatchCallBody+20       

clr!DispatchCallDebuggerWrapper+75         

clr!DispatchCallNoEH+53      

clr!BindIoCompletionCallBack_Worker+c1   

clr!Thread::DoExtraWorkForFinalizer+114   

clr!Thread::ShouldChangeAbortToUnload+101    

clr!Thread::ShouldChangeAbortToUnload+399    

clr!Thread::ShouldChangeAbortToUnload+43a    

clr!ManagedThreadBase::ThreadPool+15    

clr!BindIoCompletionCallbackStubEx+a3      

clr!BindIoCompletionCallbackStub+15

clr!ThreadpoolMgr::CompletionPortThreadStart+4e3          

clr!Thread::intermediateThreadProc+4b      

kernel32!BaseThreadInitThunk+e         

ntdll!__RtlUserThreadStart+70    

ntdll!_RtlUserThreadStart+1b

 

Thread 108 - System ID 5916

Entry point   0x00000000

Create time   2013-4-26 10:00:55

Time spent in user mode   0 Days 00:00:09.375

Time spent in kernel mode   0 Days 00:00:01.656

 

 

 

 

This thread is not fully resolved and may or may not be a problem. Further analysis of these threads may be required.

 

 

 

.NET Call Stack

 

 

 

Function

System.Text.StringBuilder..ctor(System.String, Int32, Int32, Int32)

System.Text.StringBuilder..ctor(Int32)

System.Environment.get_MachineName()

NLog.LayoutRenderers.Log4JXmlEventLayoutRenderer.Append(System.Text.StringBuilder, NLog.LogEventInfo)

NLog.LayoutRenderers.LayoutRenderer.Render(System.Text.StringBuilder, NLog.LogEventInfo)

NLog.LayoutRenderers.LayoutRenderer.Render(NLog.LogEventInfo)

NLog.Layouts.Log4JXmlEventLayout.GetFormattedMessage(NLog.LogEventInfo)

NLog.Layouts.Layout.Precalculate(NLog.LogEventInfo)

NLog.Targets.Target.PrecalculateVolatileLayouts(NLog.LogEventInfo)

NLog.Targets.Wrappers.AsyncTargetWrapper.Write(NLog.Common.AsyncLogEventInfo)

NLog.Targets.Target.WriteAsyncLogEvent(NLog.Common.AsyncLogEventInfo)

NLog.LoggerImpl.WriteToTargetWithFilterChain(NLog.Internal.TargetWithFilterChain, NLog.LogEventInfo, NLog.Common.AsyncContinuation)

NLog.LoggerImpl.Write(System.Type, NLog.Internal.TargetWithFilterChain, NLog.LogEventInfo, NLog.LogFactory)

NLog.Logger.WriteToTargets(NLog.LogEventInfo)

NLog.Logger.Log(NLog.LogEventInfo)

NLogEx.LoggerEx.WriteToLog(NLog.LogLevel, System.Exception, System.String, System.Object[])

……….

 

 

Full Call Stack

 

 

 

Function   Source

clr!StressLog::ETWLogOn+1b   

clr!StressLog::LogOn+1e   

clr!NTGetThreadContext+27   

clr!Thread::GetSafelyRedirectableThreadContext+58   

clr!Thread::HandledJITCase+40   

clr!Thread::SysSuspendForGC+5a6   

clr!WKS::GCHeap::SuspendEE+1dc   

clr!WKS::GCHeap::GarbageCollectGeneration+15f   

clr!WKS::gc_heap::try_allocate_more_space+162   

clr!WKS::gc_heap::allocate_more_space+13   

clr!WKS::GCHeap::Alloc+3d   

clr!Alloc+8d   

clr!FastAllocatePrimitiveArray+d0   

clr!JIT_NewArr1+1b4   

System.Text.StringBuilder..ctor(System.String, Int32, Int32, Int32)   

System.Text.StringBuilder..ctor(Int32)   

System.Environment.get_MachineName()   

NLog.LayoutRenderers.Log4JXmlEventLayoutRenderer.Append(System.Text.StringBuilder, NLog.LogEventInfo)   

NLog.LayoutRenderers.LayoutRenderer.Render(System.Text.StringBuilder, NLog.LogEventInfo)   

NLog.LayoutRenderers.LayoutRenderer.Render(NLog.LogEventInfo)   

NLog.Layouts.Log4JXmlEventLayout.GetFormattedMessage(NLog.LogEventInfo)   

NLog.Layouts.Layout.Precalculate(NLog.LogEventInfo)   

NLog.Targets.Target.PrecalculateVolatileLayouts(NLog.LogEventInfo)   

NLog.Targets.Wrappers.AsyncTargetWrapper.Write(NLog.Common.AsyncLogEventInfo)   

NLog.Targets.Target.WriteAsyncLogEvent(NLog.Common.AsyncLogEventInfo)   

NLog.LoggerImpl.WriteToTargetWithFilterChain(NLog.Internal.TargetWithFilterChain, NLog.LogEventInfo, NLog.Common.AsyncContinuation)   

NLog.LoggerImpl.Write(System.Type, NLog.Internal.TargetWithFilterChain, NLog.LogEventInfo, NLog.LogFactory)   

NLog.Logger.WriteToTargets(NLog.LogEventInfo)   

……….

Templated IntPrt

$
0
0
Hello. Is there a templated managed class wich can hold a pointer of unmanaged one and has overridden methods Equals and GetHashCode? I've written such class and it's pretty simple but i'm wondering if such class already exists and i don't need to invent a bicycle. Thanks.

Unable to load specific module dsipr.dll

$
0
0
Unable to load specific module dsipr.dll
Viewing all 1710 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>