I have StreamInsight client:
var quoteStreamable = application.GetStreamable<IntradayQuote>(symbol);
var matchQuery = from quote in quoteStreamable.ToObservable()
where quote.Symbol == symbol
select new MatchPairs
{
Quote = quote,
Order = order
};
var sink =
application.GetObserver<MatchPairs>(StreamInsightConfiguration.Default.StreamInsightServerSinkName);
var clientProcessName = WindowsServiceUtility.InitClientProcessName(order.Id, symbol);
if (!application.Entities.ContainsKey(clientProcessName))
{
using (matchQuery.Bind(sink).Run(clientProcessName))
{
.....
}
}
I have 100 clients. When I run 100 clients, the StreamInsight will be crashed.
Here is exception in event viewer:
Source: Application Error:
Faulting application name: StreamInsightService.exe, version: 1.0.0.0, time stamp: 0x57b1459b
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0x80131623
Fault offset: 0x12f99e0f
Faulting process id: 0x27dc
Faulting application start time: 0x01d1f6aec2a424b6
Faulting application path: C:\WorkSpace\bin\Debug\StreamInsightService.exe
Faulting module path: unknown
Report Id: ec7c65ff-62a3-11e6-80be-408d5c3df51a
Faulting package full name:
Faulting package-relative application ID:*
Source: .NET Runtime:
Application: StreamInsightService.exe
Framework Version: v4.0.30319
Description: The application requested process termination through System.Environment.FailFast(string message).
Message: Only started or running tasks can be suspended.
Parameter name: task
Stack:
at System.Environment.FailFast(System.String)
at Microsoft.ComplexEventProcessing.Engine.InstanceManager.FilterException(System.Exception)
at Microsoft.ComplexEventProcessing.Engine.InstanceManager.ProcessCommand(Microsoft.ComplexEventProcessing.Engine.SystemCommand, Int64)
at Microsoft.ComplexEventProcessing.Engine.InstanceManagerInputStrategy.DispatchEvents(Microsoft.ComplexEventProcessing.Engine.SchedulingPolicy)
at Microsoft.ComplexEventProcessing.Engine.SchedulingPolicy.DispatchEvents()
at Microsoft.ComplexEventProcessing.Engine.DataflowTask.OnRun()
at Microsoft.ComplexEventProcessing.StreamOS.Task.Run()
at Microsoft.ComplexEventProcessing.StreamOS.Scheduler.Main()
at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()
How to fix this problem ? or let me know what is the reason about above exception ?
Related
we developed a UWP app, here we use Xamarin Forms for UI, for API we used ASP.net and use the IBM DB2 for Database and host the API in the IIS server.
This exception was thrown only in the Production Environment, not in the Test environment. I don't know what causes this issue. In the Test environment, We continuously check and run the module in which the exception was thrown. But the exception was not replicated. I don't know how to solve this exception. Done a lot of searches on Google. But I didn't get the answer.
This exception has been thrown around for a long time.
If anyone knows the solution, please share it. Thanks in advance :)
----------------------------------------
Timestamp: 8/20/2022 8:21:35 PM
Message: HandlingInstanceID: cc5775ce-32b7-4840-9b9c-56027b4c18e0
An exception of type 'IBM.Data.DB2.iSeries.iDB2CommErrorException' occurred and was caught.
-------------------------------------------------------------------------------------------
08/20/2022 16:21:35
Type : IBM.Data.DB2.iSeries.iDB2CommErrorException, IBM.Data.DB2.iSeries, Version=12.0.0.0, Culture=neutral, PublicKeyToken=9cdb2ebfb1f93a26
Message : A communication error occurred.
Source : DDRAPIDataAccess
Help link :
Errors : IBM.Data.DB2.iSeries.iDB2ErrorCollection
MessageDetails : CWBCO1049 - The IBM i server application is not started, or the connection was blocked by a firewall
MessageCode : 10061
SqlState :
ErrorCode : -2147467259
Data : System.Collections.ListDictionaryInternal
TargetSite : DDRDataAccess.DDRBO.AlertDetails getPopupAlertDetails(Int32, System.String, System.String, System.String)
HResult : -2147467259
Stack Trace : at DDRDataAccess.DDRAPI.AlertsDAL.getPopupAlertDetails(Int32 UserID, String SCID, String v_date, String v_time) in D:\DDRAPI\AlertsDAL.cs:line 281
at DDRAPI.Controllers.AlertController.GetUserPopupAlerts(Int32 UserID, String SCID, String date, String time) in D:\Controllers\AlertController.cs:line 100
Additional Info:
MachineName : WIN-SEI******I
TimeStamp : 8/20/2022 8:21:35 PM
FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
AppDomainName : /LM/W3SVC/2/ROOT-1-133054308451942484
ThreadIdentity :
WindowsIdentity : WIN-SEI******I\Administrator
Category: LoggingDDRAPI
Priority: 0
EventId: 100
Severity: Error
Title:Enterprise Library Exception Handling
Machine: WIN-SEI******I
App Domain: /LM/W3SVC/2/ROOT-1-133**********484
ProcessId: 125712
Process Name: c:\windows\system32\inetsrv\w3wp.exe
Thread Name:
Win32 ThreadId:23796
Extended Properties:
----------------------------------------
I want to download a ZIP file from Sitefinity CMS Export / Import menu, but after I clicked "Export to ZIP file" button I've got this error: Data have not been successfully exported. I've tried to export each item individually, but the result was still the same.
Steps to reproduce:
Go to Sitefinity CMS (Admin site) -> Administration -> Export / Import -> Download ZIP file -> select just 1 item -> click "Export to Zip file" button -> the error appears on the Browser: Data have not been
successfully exported.
Detail error message,
On the CMS: Data have not been successfully exported
On the Chrome DevTools:
Response Code 500. ErrorCode: InvalidOperationException. Message: Scheduling is not enabled
The Error.log from App_Data/sitefinity/Logs:
----------------------------------------
ActivityId: 55XXX // obscured info
Timestamp: 11/11/2020 4:44:49 AM
Message: HandlingInstanceID: d9XXX // obscured info
An exception of type 'System.InvalidOperationException' occurred and was caught.
--------------------------------------------------------------------------------
11/11/2020 04:44:49
Type : System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=XXX // obscured info
Message : Scheduling is not enabled
Source : Telerik.Sitefinity.Packaging
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Void ScheduleTask(Telerik.Sitefinity.Scheduling.ScheduledTask)
HResult : -2146233079
Stack Trace : at Telerik.Sitefinity.Packaging.Web.Services.PackagingWebService.ScheduleTask(ScheduledTask task)
at ServiceStack.Host.ServiceExec`1.<>c__DisplayClass3_0.<CreateExecFn>b__0(Object service, Object request) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack\Host\ServiceExec.cs:line 132
at ServiceStack.Host.ServiceRunner`1.<ExecuteAsync>d__15.MoveNext() in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack\Host\ServiceRunner.cs:line 133
Additional Info:
MachineName : XXX // obscured info
TimeStamp : 11/11/2020 4:44:49 AM
FullName : Telerik.Sitefinity.Utilities, Version=13.0.7326.0, Culture=neutral, PublicKeyToken=XXX // obscured info
AppDomainName : /LM/W3SVC/XXX // obscured info
ThreadIdentity : a#b.com // obscured info
WindowsIdentity : IIS APPPOOL\XXX // obscured info
Requested URL : [h-t-t-p-s://]www.XXX.com/RestApi/Sitefinity/packaging/archive // obscured info
Category: ErrorLog
Priority: 0
EventId: 90000
Severity: Error
Title:Enterprise Library Exception Handling
Machine: XXX // obscured info
App Domain: XXX // obscured info
ProcessId: XXX // obscured info
Process Name: D:\Windows\system32\inetsrv\w3wp.exe
Thread Name:
Win32 ThreadId:XXX // obscured info
Extended Properties:
----------------------------------------
Please give me a clue, how to solve this error? I've done research a bit and I get this link: [h-t-t-p-s://]www.progress.com/documentation/sitefinity-cms/for-developers-scheduled-tasks
Go to Administration > Modules and Services and make sure the Scheduling service is activated.
I am hoping this issue is an obvious one to someone š I have a Windows Forms application that does some independent processes on separate sub-forms. It has a MainForm that opens first and then it opens the sub-forms based on an āis activeā database value for each sub-form. This process runs as expected often for many hours without any issuesā¦ opening and closing when necessary. The issue that I am having trouble figuring out is one where the application just freezes and has to be manually closed and restarted which of course while it isnāt running stops processing altogether.
There are always 2 errors in the Windows Application error log. First is a ā.Net Runtimeā and the second is a āApplication Errorā. There is a third Information entry that appears to be logged when the application is restarted but not 100% certain if it is present before it is restarted.
The MainForm is opening the different sub-forms in a new thread using different versions of this:
try
{
Thread CS = new Thread(new ThreadStart(CS_Start));
CS.SetApartmentState(ApartmentState.STA);
CS.Start();
}
catch { }
And this is the code it is called in the new thread which is opens one of the sub-formsā¦
private void CS_Start ()
{
try
{
using (CS_Searches CS_SearchForm = new CS_Searches())
{
if (!CS_SearchForm.Visible)
CS_SearchForm.ShowDialog();
}
}
catch { }
}
There are 5 separate forms that the MainForm opens. Each form does completely separate tasks and will also close itself based on the āis activeā value using: this.Dispose();
The issue seems to always occur at the different CS.Start(); lines. I have tried catching the error but unfortunately it never hits this code. Iāve also modified the CS_Start by adding the using statement. Unfortunately I havenāt been able to replicate the issue as it runs great until it doesnāt and the frequency can be all over the map. Based on all my Googling it appears to be a memory access violation but I am having no luck confirming this or finding a fix. Any assistance would be greatly appreciated.
Thanks,
Greg
These are the error log details:
Error - .Net Runtime
Application: OA.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Reflection.TargetInvocationException
Stack:
at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
at System.Delegate.DynamicInvokeImpl(System.Object[])
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
at System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window)
at OA.MainForm.CS_Start()
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()
Error - Application Error
Faulting application name: OA.exe, version: 1.0.0.0, time stamp: 0x5d7835c6
Faulting module name: KERNELBASE.dll, version: 6.1.7601.18015, time stamp: 0x50b8479b
Exception code: 0xe0434352
Fault offset: 0x0000000000009e5d
Faulting process id: 0xed0
Faulting application start time: 0x01d5683c859e21b3
Faulting application path: C:\! OA\OA.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: f77be558-d4a1-11e9-a767-00505691533d
Information - Windows Error Reporting
Fault bucket , type 0
Event Name: CLR20r3
Response: Not available
Cab Id: 0
Problem signature:
P1: OA.exe
P2: 1.0.0.0
P3: 5d793cd6
P4: System.Windows.Forms
P5: 4.0.30319.17929
P6: 4ffa5c0e
P7: 4cba
P8: 27
P9: System.AccessViolationException
P10:
Attached files:
These files may be available here:
C:\Users\AUTO.WERHQ\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_oa_c95e0af449b9b5070e88c537a95b8ce90dee049_25993682
Analysis symbol:
Rechecking for solution: 0
Report Id: bbe1964a-d56f-11e9-a767-00505691533d
Report Status: 0
Information - Windows Error Reporting ā Report File above content
Version=1
EventType=CLR20r3
EventTime=132127743632961454
ReportType=2
Consent=1
ReportIdentifier=d5c9cb47-d56e-11e9-a767-00505691533d
IntegratorReportIdentifier=d5c9cb46-d56e-11e9-a767-00505691533d
Response.type=4
Sig[0].Name=Problem Signature 01
Sig[0].Value=OA.exe
Sig[1].Name=Problem Signature 02
Sig[1].Value=1.0.0.0
Sig[2].Name=Problem Signature 03
Sig[2].Value=5d793cd6
Sig[3].Name=Problem Signature 04
Sig[3].Value=System.Windows.Forms
Sig[4].Name=Problem Signature 05
Sig[4].Value=4.0.30319.17929
Sig[5].Name=Problem Signature 06
Sig[5].Value=4ffa5c0e
Sig[6].Name=Problem Signature 07
Sig[6].Value=4cba
Sig[7].Name=Problem Signature 08
Sig[7].Value=27
Sig[8].Name=Problem Signature 09
Sig[8].Value=System.AccessViolationException
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=6.1.7601.2.1.0.256.48
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=1033
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=276c
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=276cb04a1eafd1e19b2fc54286fd4e13
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=b00b
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=b00bccb4ee23035129f9f2009e37821c
UI[2]=C:\! OA\OA.exe
UI[3]=OA has stopped working
UI[4]=Windows can check online for a solution to the problem.
UI[5]=Check online for a solution and close the program
UI[6]=Check online for a solution later and close the program
UI[7]=Close the program
LoadedModule[0]=C:\! OA\OA.exe
LoadedModule[1]=C:\Windows\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\Windows\SYSTEM32\MSCOREE.DLL
LoadedModule[3]=C:\Windows\system32\KERNEL32.dll
LoadedModule[4]=C:\Windows\system32\KERNELBASE.dll
LoadedModule[5]=C:\Windows\system32\ADVAPI32.dll
LoadedModule[6]=C:\Windows\system32\msvcrt.dll
LoadedModule[7]=C:\Windows\SYSTEM32\sechost.dll
LoadedModule[8]=C:\Windows\system32\RPCRT4.dll
LoadedModule[9]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll
LoadedModule[10]=C:\Windows\system32\SHLWAPI.dll
LoadedModule[11]=C:\Windows\system32\GDI32.dll
LoadedModule[12]=C:\Windows\system32\USER32.dll
LoadedModule[13]=C:\Windows\system32\LPK.dll
LoadedModule[14]=C:\Windows\system32\USP10.dll
LoadedModule[15]=C:\Windows\system32\IMM32.DLL
LoadedModule[16]=C:\Windows\system32\MSCTF.dll
LoadedModule[17]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
LoadedModule[18]=C:\Windows\system32\MSVCR110_CLR0400.dll
LoadedModule[19]=C:\Windows\assembly\NativeImages_v4.0.30319_64\mscorlib\9da5bb33cd1c34b7851c088f0cf749cc\mscorlib.ni.dll
LoadedModule[20]=C:\Windows\system32\ole32.dll
LoadedModule[21]=C:\Windows\system32\CRYPTBASE.dll
LoadedModule[22]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrjit.dll
LoadedModule[23]=C:\Windows\system32\OLEAUT32.dll
LoadedModule[24]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System\d191674dfd2e0fb89abf108445359453\System.ni.dll
LoadedModule[25]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Drawing\fe0b5caab219a62708e42ad3ab7f0440\System.Drawing.ni.dll
LoadedModule[26]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Windows.Forms\3fac3f0dccd0fdc80be79bd7fcf2261a\System.Windows.Forms.ni.dll
LoadedModule[27]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Configuration\3dd1bdef318925394a5f51fb254b7004\System.Configuration.ni.dll
LoadedModule[28]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Core\8ae856324ba290331c8d1442b3321a22\System.Core.ni.dll
LoadedModule[29]=C:\Windows\assembly\NativeImages_v4.0.30319_64\Microsoft.CSharp\fc2e811c0a4fbcb589f7775a25c7377a\Microsoft.CSharp.ni.dll
LoadedModule[30]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\nlssorting.dll
LoadedModule[31]=C:\Windows\system32\CRYPTSP.dll
LoadedModule[32]=C:\Windows\system32\rsaenh.dll
LoadedModule[33]=C:\Windows\system32\uxtheme.dll
LoadedModule[34]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Xml\7a54d4ebaa554c877a48c06148506a0e\System.Xml.ni.dll
LoadedModule[35]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Runteb92aa12#\29ffe930d3112e330be0c61b4f83bf5a\System.Runtime.Serialization.ni.dll
LoadedModule[36]=C:\Windows\system32\ws2_32.dll
LoadedModule[37]=C:\Windows\system32\NSI.dll
LoadedModule[38]=C:\Windows\system32\mswsock.dll
LoadedModule[39]=C:\Windows\System32\wshtcpip.dll
LoadedModule[40]=C:\Windows\System32\wship6.dll
LoadedModule[41]=C:\Windows\system32\NLAapi.dll
LoadedModule[42]=C:\Windows\system32\napinsp.dll
LoadedModule[43]=C:\Windows\system32\pnrpnsp.dll
LoadedModule[44]=C:\Windows\system32\DNSAPI.dll
LoadedModule[45]=C:\Windows\System32\winrnr.dll
LoadedModule[46]=C:\Windows\system32\IPHLPAPI.DLL
LoadedModule[47]=C:\Windows\system32\WINNSI.DLL
LoadedModule[48]=C:\Windows\system32\rasadhlp.dll
LoadedModule[49]=C:\Windows\System32\fwpuclnt.dll
LoadedModule[50]=C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_a4d6a923711520a9\comctl32.dll
LoadedModule[51]=C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_fa396087175ac9ac\comctl32.dll
LoadedModule[52]=C:\Windows\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17825_none_2b253c8271ec7765\gdiplus.dll
LoadedModule[53]=C:\Windows\system32\wininet.dll
LoadedModule[54]=C:\Windows\system32\api-ms-win-downlevel-user32-l1-1-0.dll
LoadedModule[55]=C:\Windows\system32\api-ms-win-downlevel-shlwapi-l1-1-0.dll
LoadedModule[56]=C:\Windows\system32\api-ms-win-downlevel-version-l1-1-0.dll
LoadedModule[57]=C:\Windows\system32\version.DLL
LoadedModule[58]=C:\Windows\system32\api-ms-win-downlevel-normaliz-l1-1-0.dll
LoadedModule[59]=C:\Windows\system32\normaliz.DLL
LoadedModule[60]=C:\Windows\system32\iertutil.dll
LoadedModule[61]=C:\Windows\system32\api-ms-win-downlevel-advapi32-l1-1-0.dll
LoadedModule[62]=C:\Windows\system32\USERENV.dll
LoadedModule[63]=C:\Windows\system32\profapi.dll
LoadedModule[64]=C:\Windows\system32\Secur32.dll
LoadedModule[65]=C:\Windows\system32\SSPICLI.DLL
LoadedModule[66]=C:\Windows\system32\SHELL32.dll
LoadedModule[67]=C:\Windows\system32\api-ms-win-downlevel-advapi32-l2-1-0.dll
LoadedModule[68]=C:\Windows\system32\api-ms-win-downlevel-ole32-l1-1-0.dll
LoadedModule[69]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.ServiceModel\b6c60909860ace07b6b6617c71d089ff\System.ServiceModel.ni.dll
LoadedModule[70]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Servd1dec626#\ca7c2fd7257e0452df4a39ec969e8913\System.ServiceModel.Internals.ni.dll
LoadedModule[71]=C:\Windows\assembly\NativeImages_v4.0.30319_64\SMDiagnostics\7ce23442406c8bff478964ae214251b5\SMDiagnostics.ni.dll
LoadedModule[72]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Serv30e99c02#\fe0b22eaecf87715a043c1c76884bae6\System.ServiceModel.Channels.ni.dll
LoadedModule[73]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Servf73e6522#\0e0f2d16bef2c0e1dd62edff4b3cf02c\System.ServiceModel.Web.ni.dll
LoadedModule[74]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.IdentityModel\7b2df4768784cae3f8714f1ececbe25a\System.IdentityModel.ni.dll
LoadedModule[75]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Net.Http\8653972f8d9923f44566604ae0de1aea\System.Net.Http.ni.dll
LoadedModule[76]=C:\Windows\system32\rasapi32.dll
LoadedModule[77]=C:\Windows\system32\rasman.dll
LoadedModule[78]=C:\Windows\system32\rtutils.dll
LoadedModule[79]=C:\Windows\system32\winhttp.dll
LoadedModule[80]=C:\Windows\system32\webio.dll
LoadedModule[81]=C:\Windows\system32\credssp.dll
LoadedModule[82]=C:\Windows\system32\dhcpcsvc6.DLL
LoadedModule[83]=C:\Windows\system32\dhcpcsvc.DLL
LoadedModule[84]=C:\Windows\system32\CFGMGR32.dll
LoadedModule[85]=C:\Windows\system32\RpcRtRemote.dll
LoadedModule[86]=C:\Windows\system32\WindowsCodecs.dll
LoadedModule[87]=C:\! OA\OpenPop.dll
LoadedModule[88]=C:\Windows\system32\bcrypt.dll
LoadedModule[89]=C:\Windows\system32\CLBCatQ.DLL
LoadedModule[90]=C:\Windows\System32\ieframe.dll
LoadedModule[91]=C:\Windows\System32\api-ms-win-downlevel-shell32-l1-1-0.dll
LoadedModule[92]=C:\Windows\system32\SXS.DLL
LoadedModule[93]=C:\Windows\system32\api-ms-win-downlevel-shlwapi-l2-1-0.dll
LoadedModule[94]=C:\Windows\system32\PROPSYS.dll
LoadedModule[95]=C:\Windows\system32\apphelp.dll
LoadedModule[96]=C:\Windows\system32\urlmon.dll
LoadedModule[97]=C:\Windows\system32\CRYPT32.dll
LoadedModule[98]=C:\Windows\system32\MSASN1.dll
LoadedModule[99]=C:\Windows\system32\MSHTML.dll
LoadedModule[100]=C:\Windows\System32\netprofm.dll
LoadedModule[101]=C:\Windows\System32\npmproxy.dll
LoadedModule[102]=C:\Windows\system32\schannel.DLL
LoadedModule[103]=C:\Windows\system32\ncrypt.dll
LoadedModule[104]=C:\Windows\system32\bcryptprimitives.dll
LoadedModule[105]=C:\Windows\system32\WINTRUST.dll
LoadedModule[106]=C:\Windows\system32\GPAPI.dll
LoadedModule[107]=C:\Windows\system32\cryptnet.dll
LoadedModule[108]=C:\Windows\system32\WLDAP32.dll
LoadedModule[109]=C:\Windows\system32\SensApi.dll
LoadedModule[110]=C:\Windows\system32\MLANG.dll
LoadedModule[111]=C:\Windows\System32\jscript9.dll
LoadedModule[112]=C:\Windows\system32\msimtf.dll
LoadedModule[113]=C:\Windows\system32\d2d1.dll
LoadedModule[114]=C:\Windows\system32\DWrite.dll
LoadedModule[115]=C:\Windows\system32\dxgi.dll
LoadedModule[116]=C:\Windows\system32\dwmapi.dll
LoadedModule[117]=C:\Windows\system32\d3d11.dll
LoadedModule[118]=C:\Windows\system32\D3D10Warp.dll
LoadedModule[119]=C:\Windows\system32\WINMM.dll
LoadedModule[120]=C:\Windows\system32\MMDevAPI.DLL
LoadedModule[121]=C:\Windows\system32\ntmarta.dll
LoadedModule[122]=C:\Windows\system32\SETUPAPI.dll
LoadedModule[123]=C:\Windows\system32\DEVOBJ.dll
LoadedModule[124]=C:\Windows\system32\OLEACC.DLL
LoadedModule[125]=C:\Windows\system32\uiautomationcore.dll
LoadedModule[126]=C:\Windows\system32\PSAPI.DLL
LoadedModule[127]=C:\Windows\system32\ImgUtil.dll
LoadedModule[128]=C:\Program Files\Internet Explorer\ieproxy.dll
LoadedModule[129]=C:\Windows\System32\UIAnimation.dll
LoadedModule[130]=C:\Windows\system32\T2EMBED.DLL
LoadedModule[131]=C:\Windows\System32\msxml3.dll
LoadedModule[132]=C:\Windows\system32\XmlLite.dll
LoadedModule[133]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\diasymreader.dll
FriendlyEventName=Stopped working
ConsentKey=CLR20r3
AppName=OA
AppPath=C:\! OA\OA.exe
This is really interesting to explore - you may go with making dumps and exploring them with WInDbg. But I would consider creating the same application as Console Application and exploring its behavior. It may turn out it was some kind GUI related bug/feature where you reached maybe Handlers/GDI limit or something like this.
I'm trying to use the UWP Windows.Data.Pdf API from a WPF-Desktop app. It can render a PDF page to a PNG image just fine.
The issue I have is that after executing the PDF rendering, closing the WPF-Window does no longer exit the application. The process keeps running. I tried pausing the application in the debugger in this state, but no application code appears to be running. Some thread or resource must still be open, I guess.
My question here is does anybody have any idea why this happens? And furthermore, how can I debug this kind of issue?
The issue is reproducible with the empty WPF template in VS17, I added to the .csproj:
<TargetPlatformVersion>10.0.16299.0</TargetPlatformVersion>
...
<Reference Include="System.Runtime.WindowsRuntime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\System.Runtime.WindowsRuntime.dll</HintPath>
</Reference>
<Reference Include="Windows">
<HintPath>$(MSBuildProgramFiles32)\Windows Kits\10\UnionMetadata\10.0.16299.0\Windows.winmd</HintPath>
</Reference>
From a simple button I'm executing this code:
using System;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Threading.Tasks;
using Windows.Data.Pdf;
using Windows.Graphics.Imaging;
using Windows.Storage;
using Windows.Storage.Streams;
...
var filename = #"C:\Users\...\a.pdf"
var f = await StorageFile.GetFileFromPathAsync(filename);
byte[] content;
using (var stream = await f.OpenReadAsync())
{
var d = await PdfDocument.LoadFromStreamAsync(stream);
using (var page0 = d.GetPage(0))
{
await page0.PreparePageAsync();
using (var randomAccessStream = new InMemoryRandomAccessStream())
{
await page0.RenderToStreamAsync(randomAccessStream, new PdfPageRenderOptions { BitmapEncoderId = BitmapEncoder.PngEncoderId });
content = new byte[randomAccessStream.Size];
await randomAccessStream.ReadAsync(content.AsBuffer(), (uint)randomAccessStream.Size, InputStreamOptions.None);
}
}
}
File.WriteAllBytes(#"C:\Users\...\b.png", content);
This is almost the entire code, but in case I missed something I also pushed it to https://github.com/marv51/PDFRendererNotExiting
Thank you very much in advance for any help on this.
Update:
I just observed, that the process does eventually exit after about 2 minutes!
Probably related, I found in the event viewer:
Faulting application name: WpfApp3.exe, version: 1.0.0.0, time stamp: 0x5b291e3a
Faulting module name: ntdll.dll, version: 10.0.17134.1000, time stamp: 0xcfe5bd82
Exception code: 0xc0000005
Fault offset: 0x000420c8
Faulting process id: 0x1ee0
Faulting application start time: 0x01d407e07f1c3295
Faulting application path: C:\Users\ruehe\source\repos\WpfApp3\WpfApp3\bin\Release\WpfApp3.exe
Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
Report Id: 3a51f5ff-52b3-47fb-b00d-bf002f932c41
Faulting package full name:
Faulting package-relative application ID:
So I assume some background thread crashed during termination and Windows Error Reporting keeps the process alive to collect information. Or some kind of timeout kills open resources?
I'm sorry, I just found this. Can I do anything with this crash Information?
Update 2
After spending a lot of time on this and learning some windbg, I think this might be an Nvidia graphics driver crash:
Attaching to the app and then closing the window shows this exception:
(2134.1cac): Unknown exception - code 0000071a (first chance)
(2134.1cac): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_040c7acb04cee565\nvwgf2um.dll -
eax=00000000 ebx=0be09f10 ecx=00000013 edx=00000000 esi=00000000 edi=00000030
eip=779f38e8 esp=007decd0 ebp=007ded10 iopl=0 nv up ei pl zr na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00210246
ntdll!RtlFreeHeap+0x28:
779f38e8 817e08eeddeedd cmp dword ptr [esi+8],0DDEEDDEEh ds:002b:00000008=????????
I posted the analyze -v output here: https://gist.github.com/Marv51/d3ad0e9a49b6c985d9116600fd0475b7
From looking at the stacktrace I believe the destructor for the internal class Windows.Data.Pdf.CPdfStatics tries to release some DirectX resources and the Nvidia driver corrupts the heap during this process.
I tried updating to the latest Nvidia driver, which changed nothing.
Not sure where I can go from here. I'm still a windbg beginner, so I might interpret this output wrong.
Maybe the 'solution' for now is that I will do this work in an external process to avoid these issues from 'infecting' the main app.
I am trying to stop a remote system's IIS application pool using the following c# code:
try
{
// Assign a variable to store the Connection Options
var connection = new ConnectionOptions();
// Connect as this user
connection.Username = Globals.AdminUsername;
// Connect with this password
connection.Password = Globals.AdminPassword;
// Connect using this domain
connection.Authority = "ntlmdomain:MyDomain";
// Gets or sets a value indicating whether user privileges
// need to be enabled for the connection operation.
connection.EnablePrivileges = true;
// Enable impersonation so non admins can run admin level commands
connection.Impersonation = ImpersonationLevel.Impersonate;
//Each data packet is signed and encrypted. This helps protect
// the entire communication between the client and server.
connection.Authentication = AuthenticationLevel.PacketPrivacy;
// Define a WMI management scope
var wmiScope = new ManagementScope(String.Format("\\\\{0}\\root\\MicrosoftIISv2", ServerName), connection);
string objPath = "IISApplicationPool.Name='W3SVC/AppPools/" + AppPoolName + "'";
// Run the query using the scope defined above
using (ManagementObject AppPool = new ManagementObject(wmiScope,new ManagementPath(objPath), null))
{
switch (Action)
{
case "Start":
AppPool.InvokeMethod("Start", null, null);
break;
case "Stop":
AppPool.InvokeMethod("Stop", null, null);
break;
case "Recycle":
AppPool.InvokeMethod("Recycle", null, null);
break;
}
}
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.ToString());
}
If I stop my application pool it works, but I get a bunch of errors on the server:
-----
The root\MicrosoftIISv2 namespace is marked with the RequiresEncryption flag.
Access to this namespace might be denied if the script or application does not have the
appropriate authentication level. Change the authentication level to Pkt_Privacy
and run the script or application again.
-----
-----
An unhandled exception occurred and the process was terminated.
Application ID: DefaultDomain
Process ID: 1640
Exception: System.AppDomainUnloadedException
Message: Attempted to access an unloaded AppDomain.
StackTrace:
-----
-----
Application: w3wp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Configuration.ConfigurationErrorsException
Stack:
at System.Diagnostics.TraceUtils.GetRuntimeObject(System.String, System.Type, System.String)
-----
-----
Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7a5f8
Faulting module name: KERNELBASE.dll, version: 6.1.7601.18409, time stamp: 0x53159a86
Exception code: 0xe0434352
Fault offset: 0x0000c42d
Faulting process id: 0x668
Faulting application start time: 0x01d194020cab3c08
Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: 57bb8e2a-fff5-11e5-8ddc-005056a330b1
-----
I'm pretty sure that I shouldn't be getting these errors because if I manually (vs programmatically) start/stop the application pool I don't get these warnings or errors.
Can anyone help me understand why I'm getting these errors. I am setting Packet_Privacy I think so that warning doesn't make sense to me.
Thanks
Brad