Windows Store App minidump crash debug issue with windbg - c#

I submitted an update of my app to the windows store and it failed certification because of crash.
I received a triagedump.dmp file from them.
I opened the file with windbg and loaded sos and mscordacwks dll's and typed !analyze -v
I got
MANAGED_OBJECT_NAME: SYSTEM.NULLREFERENCEEXCEPTION
MANAGED_STACK_COMMAND: !pe 2931590
So i did !pe 2931590
Exception object: 02931590
Exception type: System.NullReferenceException
Message: <Invalid Object>
InnerException: <none>
StackTrace (generated):
SP IP Function
050CE81C 6E653202 YoutubeMP3Converter_ni!UNKNOWN+0x9a
050CF58C 6F1DE6FF mscorlib_ni!System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__0(System.Object)+0x33
050CF594 6CA313D4 System_Runtime_WindowsRuntime_ni!UNKNOWN+0x24
0A43F964 6F0E2607 mscorlib_ni!System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()+0x17
0A43F96C 6CA5E728 System_Runtime_WindowsRuntime_ni!UNKNOWN+0x28
0A43F970 6E9ECB6A mscorlib_ni!System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)+0x3e
0A43F978 6EA02407 mscorlib_ni!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)+0xa7
0A43F9E4 6EA02346 mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)+0x16
0A43F9F8 6EA0DE60 mscorlib_ni!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()+0x60
0A43FA0C 6EA0D609 mscorlib_ni!System.Threading.ThreadPoolWorkQueue.Dispatch()+0x149
0A43FA5C 6EA0D4A5 mscorlib_ni!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()+0x5
I don't know the UNKNOWN part of YoutubeMP3Converter_ni!UNKNOWN+0x9a
So i don't have the YoutubeMP3Converter.ni.exe file they used.
I also tried to use my YoutubeMP3Converter.exe but he said that there is a mismatch with the memory image header en the file image header.
So what are my options here?
- Can I create the .ni (native image) version of my exe.
- How can I get the correct YoutubeMP3Converter.exe? Do I have to take it out the appxupload package?
- Can I create my windows store app with options if it crashes that it creates a full dump instead of a triagedump (minidump) ?
I know what the exception is but I don't know where it happens as I don't have the full stacktrace :(.
UPDATE - found it
You can find the matching .exe to load as img in windbg in AppxUpload package which is send when you upload your app to the store. Then WinDbg has enough info to show the correct symbols which will lead you to what class/method the exception was thrown.

Related

Csharp app only work on my pc Visual Studio 2019

If I run the App on my pc from visual studio or from outside of VS, after compiling with the installer package and installing it, in my pc works ok but if I install it on other pc, then I get this error and don't start
"Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately
Could not load file or assembly "filename.dll" or one of its dependencies. The specified module could not be found."
Note: "filename.dll" is located in to the main folder with app.exe file after installation
Error From Windows Event Viewer
Application: myapp.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.ComponentModel.Win32Exception at System.Windows.Forms.NativeWindow.CreateHandle(System.Windows.Forms.CreateParams) at System.Windows.Forms.Control.CreateHandle() at System.Windows.Forms.Form.CreateHandle() at System.Windows.Forms.Control.get_Handle() at myapp.Form1+KeyHandler..ctor(System.Windows.Forms.Keys, System.Windows.Forms.Form) at myapp.Form1..ctor() at myapp.Program.Main()
any ideas about that?
I found the solution, some dll files are missing that this one uses, I know which ones are used with the dumpbin /imports filename.dll command, so I downloaded all those and it worked

Make an installer for my own version of missionplanner (open source project in win form)

I am making my own version of an open source project call Mission Planner (it's an app that allows to control many types of drone so I configured it to be more effictient for my drones). I am now trying to build an installer for my new app but I am struggling with some aspects.
Here's what I did so far.
Create a new setup project in the same solution, in the app folder I had a project output (the assembly appears on it's own), i created two shortcuts, on for the desktop and the other for the programs menu. Then i modified the different parameters (name, url, manufacturer etc...). Then I cleaned the solution, built the installer (everything was ok) and then I right-clicked and selected the "install". Everything was okay, I had my shortcut on the desktop and program menu.
BUT
When I try to execute the app it does not work, here is the error I have in the output window :
System.TypeInitializationException: The type initializer for
'MissionPlanner.MainV2' threw an exception. --->
System.BadImageFormatException: Could not load file or assembly
'System.ValueTuple, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. Reference
assemblies should not be loaded for execution. They can only be
loaded in the Reflection-only loader context. (Exception from HRESULT:
0x80131058) ---> System.BadImageFormatException: Cannot load a
reference assembly for execution. --- End of inner exception stack
trace --- at MissionPlanner.MAVLinkInterface..ctor() at
MissionPlanner.MainV2..cctor() --- End of inner exception stack
trace --- at MissionPlanner.MainV2..ctor() at
MissionPlanner.Program.Start(String[] args)
So if anyone knows what this means I would be glad to know what is going on and if there's any solution to fix this.
BadImageFormatException occurs if you try to load a 64 bit DLL into a 32 bit process or vice versa. Make sure you ship 64 DLLs only or 32 bit DLLs only.
The name of the exception has nothing to do with pictures. Microsoft calls PE (Portable Executable) files images.

Dynamics CRM 2011 SyncWorkflowExecutionPlugin unable to find assembly

A strange error suddenly cropped up on our Dynamics CRM 2011 server - a specific plugin assembly can not be found when the plugin execution is triggered through a workflow process, with the error:
[Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.SyncWorkflowExecutionPlugin]
[324f29aa-6082-ea11-80ee-005056837add: ]
Starting sync workflow 'workflow name', Id: 2d4f29aa-6082-ea11-80ee-005056837add
Sync workflow 'workflow name' terminated with error 'The type initializer for '<Module>' threw an exception.'
And exception stack trace ultimately leads to:
Inner Exception: <CrtImplementationDetails>.ModuleLoadException: The C++ module failed to load while attempting to initialize the default appdomain.
at <CrtImplementationDetails>.ThrowModuleLoadException(String errorMessage, Exception innerException)
at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* )
at .cctor()
Inner Exception: System.Runtime.Serialization.SerializationException: Unable to find assembly 'AssemblyName, Version=8.75.0.267, Culture=neutral, PublicKeyToken=4e4051c21cef725b'.
The assembly is present on the server, version, culture, and public key token all match. Oddly enough the plugin steps work fine when the execution is triggered directly through a create/update/etc request - it's only when the execution is triggered through a workflow that the error occurs. And by triggered through a workflow I don't mean running code activity from that assembly, I mean a situation like:
Entity is created
OnCreate plugin from Assembly1 runs without issues
Workflow runs that updates a related entity, triggering OnUpdate plugin from Assembly1 - ERROR
This issue cropped up initially after a server restart. Another restart fixed it temporarily, until two days later it started happening again. We've tried everything we can think of - updating the assembly, unregistering/re-registering it, restarting all services, restarting the server again. Does anyone have any idea what might be the cause of this and how to fix it?
We discovered the issue was caused by a Windows update that had been applied before the initial restart, which had installed .NET framework v4.8 on the server. Although the application was still using an older version, apparently just having v4.8 installed was enough to cause errors. Reverting back to an earlier .NET version fixed the problem.
I am not certain what is the exact technical reason for this - seems to be something related to App Domains (https://learn.microsoft.com/en-us/dotnet/api/system.appdomain?view=netframework-4.8). But if you encounter a similar issue, check your .NET framework version.

GhostDoc VisualStudio extension Load exception

I've formatted my harddrive to reinstall Windows 8 x64.
After installing VisualStudio 2013 and then GhostDoc extension, in the moment that I try to run the VS IDE (an VB/C# project of any kind), it throws an exception related to GhostDoc that I would like to solve:
The English translation of the error message above (that is in Spanish) is this:
Exception Source: mscorlib
Exception Type: System.IO.FileLoadException
Exception Message: Loading this assembly would produce a different grant set from other instances. (Exception from
HRESULT: 0x80131401)
I never had this problem until now.
The exception happens in GhostDoc version 4.8 and 4.9, the error seems not to be critical 'cause I'm still able to use GhostDoc after accepting the ErrorDialog, but anyways I would like to solve this 'cause I have other kind of problems, I need to install 3rd party controls/extensions silently and if I run the IDE and I get this error then just I can't install nothing 'cause it stops the execution of the IDE, so at the moment what I've did to avoid this error is editing the LoadBehavior property in the GhostDocPro.AddIn XML file, to disable the automatic loading of the extension:
<LoadBehavior>0</LoadBehavior>
Then now every time that I want to use GhostDoc I need to load it manually (see first image above), and of course I'm having the same exception, I need to solve this bug.
This is the Exception:
Detailed error information follows: Date and Time: 26/03/2014 11:55:17
IP Address: {0} OS Platform: Win32NT Processor: AMD64 OS version:
6.2.9200.0 Current user role: Administrator; User;
Allocated Memory: 51 Mb Available Physical Memory: 4096 Mb Available
Virtual Memory: 3255 Mb Total Physical Memory: 4096 Mb Total Virtual
Memory: 4096 Mb Percentage of physical memory In use: 44 %
Application Domain: DefaultDomain Product Version: 4.9.14064.0
Assembly Codebase: file:///C:/Program Files (x86)/Microsoft Visual
Studio
12.0/Common7/IDE/Extensions/SubMain/GhostDoc/1.0/SubMain.GhostDoc.Core.DLL
Assembly Version: 2.2.0.0 Assembly Build Date: 05/03/2014 1:39:38
Assembly Full Name: SubMain.GhostDoc.Core, Version=2.2.0.0,
Culture=neutral, PublicKeyToken=94c677ee32cc1929
Exception Source: mscorlib Exception Type: System.IO.FileLoadException
Exception Message: Si se carga este ensamblado, se generará un
conjunto de permisos diferente de otras instancias. (Excepción de
HRESULT: 0x80131401) Exception Target Site: CreateInstance
---- Stack Trace ---- System.AppDomain.nCreateDomain(friendlyName As String, setup As AppDomainSetup, providedSecurityInfo As Evidence,
creatorsSecurityInfo As Evidence, parentSecurityDescriptor As IntPtr)
SubMain.GhostDoc.Core.DLL: N 00000
System.AppDomainManager.CreateDomainHelper(friendlyName As String,
securityInfo As Evidence, appDomainInfo As AppDomainSetup)
SubMain.GhostDoc.Core.DLL: N 00283
System.AppDomainManager.CreateDomain(friendlyName As String,
securityInfo As Evidence, appDomainInfo As AppDomainSetup)
SubMain.GhostDoc.Core.DLL: N 00014
System.AppDomain.InternalCreateDomain(friendlyName As String,
securityInfo As Evidence, info As AppDomainSetup)
SubMain.GhostDoc.Core.DLL: N 10814956
System.AppDomain.CreateDomain(friendlyName As String, securityInfo As
Evidence, info As AppDomainSetup) SubMain.GhostDoc.Core.DLL: N 00039
A.c112f74fdd78a5b016f03ca0edba39a26.c9495450a44f85fef6ae7cb241984a67a(
As String, As Evidence, As AppDomainSetup)
SubMain.GhostDoc.Core.DLL: N 00023
SubMain.Core.Utils.RemoteLoader.cc3c5bc8929eea714ac8c7a330d95ac0b( As
String) SubMain.GhostDoc.Core.DLL: N 00142
Loaded assemblies: Assembly Name: mscorlib, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 Assembly Location:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll
More info ...
( The full stack trace is here )
Any ideas about the System.IO.FileLoadException exception that I'm facing?
PS: If someone is thinking why I'm posting this issue here in StackOverflow instead of contacting to GhostDoc team, well I've sent the bug to GhostDoc Developers but I remember that they didn't wanted to helped me in other StackOverFlow post (that was not related to any bug, was a very simple question about how to uninstall their product in X circunstances), so I really don't expect any help from GhostDoc team to solve this in StackOverflow and maybe (only maybe) I could have more choices to solve this issue with the help of other users that maybe has the same issue.
Try the following:
To add an assembly to the fully trusted assembly list (taken from here)
In the .NET Framework 1.0 and 1.1, at the command line, type
%Systemroot%\Microsoft.NET\Framework\versionNumber\Mscorcfg.msc. In
the .NET Framework 2.0, start the SDK Command Prompt and type
mscorcfg.msc.
The user interface for the tool is displayed.
Expand the Runtime Security Policy node.
Expand the node for the policy level you want to add the new assembly to.
Right-click Policy Assemblies and choose Add.
Select the assembly name from the list that appears. These are the assemblies that are in the global assembly cache.
Click Select.

C# Windows Service with log4net - Error 1053: The Service did not respond to start or control in a timely fashion

When I install my windows service I get this error when I try to re-start the service. I'm suspecting that log4net is causing some issues. I checked the log4net log file can still continue to append, other directories exist as per installer's File System on Target Machine setup.
Application: SPIDFileWatcher.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.DirectoryNotFoundException
Stack:
at System.IO.__Error.WinIOError(Int32, System.String)
at System.IO.FileSystemEnumerableIterator`1[[System.__Canon, mscorlib, Version=4.0.0.0,Culture=neutral, PublicKeyToken=b77a5c561934e089]].CommonInit()
at System.IO.FileSystemEnumerableIterator`1[[System.__Canon, mscorlib, Version=4.0.0.0,Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.String, System.String, System.String, System.IO.SearchOption, System.IO.SearchResultHandler`1<System.__Canon>)
at System.IO.Directory.EnumerateFiles(System.String, System.String, System.IO.SearchOption)
at FileWatchingService.FileWatcher..ctor()
at FileWatchingService.WatchService.OnStart(System.String[])
at FileWatchingService.WatchService.OnDebug()
at FileWatchingService.Program.Main()
How can I fix this?

Categories