I develop the UWP application. And published it via the Microsoft partner center. I get the crashes and hangs from the partner center with no understandable stack trace.
Also, I get the failure zip file where there are the following files (memory.csv, minidump.mdmp, WERInternalMetadata.xml).
How can I investigate these files for understanding the reason for failure?
Is there any way to understand the reason for crashes or hangs?
Here is an example of stacktrace:
Frame Image Function Offset
"0" "2FE3CB00.MYAPP-EXAMPLE" "HANG_QUIESCE" "0x0000000000000000"
"1" "unknown.dll" "[.ecxr]" "0x0000000000000000"
"2" "ntdll.dll" "ZwWaitForMultipleObjects" "0x0000000000000000"
"3" "KERNELBASE.dll" "WaitForMultipleObjectsEx" "0x0000000000000000"
"4" "mrt100_app.dll" "PalCompatibleWaitAny" "0x0000000000000000"
"5" "mrt100_app.dll" "CLREventStatic::Wait" "0x0000000000000000"
"6" "mrt100_app.dll" "WKS::gc_heap::background_gc_wait_lh" "0x0000000000000000"
"7" "mrt100_app.dll" "WKS::gc_heap::a_fit_free_list_large_p" "0x0000000000000000"
"8" "mrt100_app.dll" "WKS::gc_heap::loh_try_fit" "0x0000000000000000"
"9" "mrt100_app.dll" "WKS::gc_heap::allocate_large" "0x0000000000000000"
"10" "mrt100_app.dll" "WKS::gc_heap::try_allocate_more_space" "0x0000000000000000"
"11" "mrt100_app.dll" "WKS::gc_heap::allocate_large_object" "0x0000000000000000"
"12" "mrt100_app.dll" "WKS::GCHeap::Alloc" "0x0000000000000000"
"13" "mrt100_app.dll" "RhpGcAlloc" "0x0000000000000000"
"14" "mrt100_app.dll" "RhpNewArrayRare" "0x0000000000000000"
"15" "SharedLibrary.dll" "System::RuntimeExceptionHelpers::ExceptionData.Serialize" "0x0000000000000000"
"16" "SharedLibrary.dll" "System::Runtime`enter code here`ExceptionHelpers.SerializeExceptionsForDump" "0x0000000000000000"
"17" "SharedLibrary.dll" "System::RuntimeExceptionHelpers.GenerateExceptionInformationForDump" "0x0000000000000000"
"18" "System.Private.Interop.dll" "System::Runtime::InteropServices::ExceptionHelpers.OriginateLanguageException" "0x0000000000000000"
"19" "System.Private.Interop.dll" "System::Runtime::InteropServices::ExceptionHelpers.ReportUnhandledError" "0x0000000000000000"
"20" "System.Private.Interop.dll" "Internal::Interop::InteropCallbacks.ReportUnhandledError" "0x0000000000000000"
"21" "MyApp.dll" "-" "0x0000000000000000"
"22" "unknown.dll" "unknown" "0x0000000000000000"
"23" "unknown.dll" "unknown" "0x0000000000000000"
Since you've already have the mdmp file, you could open it in the WinDbg app or Visual Studio. You could take a look at: Dump files in the Visual Studio debugger.
Besides, you could try to use Visual Studio App Center in your app which get detailed crashed report as well and it could give the report in a readable way.
Related
I am using a Blazor app with the Monaco editor. I use the SetValue() and GetValue() methods to write and read the content of the editor, which is working fine in most cases.
However, if there is a lot of data in there, then Blazor gets a timeout when GetValue() is called. I am reading in a JSON file, so I could remove some lines, and at some point, it is working fine again.
This is the code I am using to read the content of the editor:
string userRequirementsJson = await UserRequirementsEditor.GetValue();
The data that is in the editor is pasted below. It goes on for about 2000 lines, so I removed most of it.
[{
"feature": "<redacted>",
"path": [],
"priority": 9999
}, {
"feature": "<redacted>",
"path": [],
"priority": 9998
},
...
, {
"feature": "<redacted>",
"path": [],
"priority": 9996
}, {
"feature": "<redacted>",
"path": ["<redacted>", "<redacted>"],
"priority": 9999
}]
Does anyone know why it is possible to read around 1000 lines, but not 2000? And how can I fix this? Thanks in advance.
When searching files in OneDrive for Business, the path of the parentReference is empty. Is there any reason for this limitation?
Example in MS Graph explorer:
GET https://graph.microsoft.com/v1.0/me/drive/root/search(q='finance')?select=name,parentReference
snippet from result:
"value": [
{
"#odata.type": "#microsoft.graph.driveItem",
"name": "CR-227 Product Overview.pptx",
"parentReference": {
"driveId": "b!-RIj2DuyvEyV1T4NlOaMHk8XkS_I8MdFlUCq1BlcjgmhRfAj3-Z8RY2VpuvV_tpd",
"driveType": "business",
"id": "01BYE5RZ6TAJHXA5GMWZB2HDLD7SNEXFFU",
"path": "/path/to/folder" <--- THIS IS MISSING
}
},
I would be glad if the path is returned because I need it. Otherwise I need to add additional overhead to query for the parent's paths.
I am trying to use environment variables within task in my tasks.json file of a C# project in vscode.
In my launch.json file I have this code to parse a .env file:
"configurations": [
{
...
"envFile": "${workspaceFolder}/.env",
}
]
I then have in the tasks.json file this task:
{
"label": "login",
"command": "sh",
"type": "shell",
"args": [
"${workspaceFolder}/etc/login.sh",
"${env:USERNAME}",
"${env:PASSWORD}"
]
}
This seems to be the code that's implied from https://code.visualstudio.com/docs/editor/tasks, however (from testing by echoing in another task) I have found these last two args to be blank. After researching online I think I have found the reason, the configurations..env is used by the tasks themselves rather than being accessible by task.json that run and so can't be accessed.
How do I create (use) these env variables within the tasks.json?
Checkout https://code.visualstudio.com/docs/editor/tasks-appendix
/**
* The environment of the executed program or shell. If omitted
* the parent process' environment is used.
*/
env?: { [key: string]: string };
example
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "diagnostic",
"type": "shell",
"options": {
"cwd": "${workspaceFolder}/beam",
"env": {
"FOO": "baz",
}
},
"command": "printenv",
"problemMatcher": []
}
]
}
There is no way I am aware of to pull these from a file like with launch.json
I would open an issue on the vscode repo
I had the same problem.
I am using Windows.
I was able to fix it.
The issue for me was, in VSCode I had this setting set:
"terminal.integrated.automationShell.windows": "C:/Program Files/Git/bin/bash.exe"
And this was causing the env to not load properly.
I was able to access the windows settings, that you would set from that windows GUI env variable tool. But I could not access env variables set in my .bashrc.
I commented out that setting.
I also have the Terminal > Integrated > Default Profile: Windows
set to Git Bash.
With these changes, I was able to access env variables in my .bashrc file.
run into an interesting one today.
I have a bunch of code in C# that creates uses Powershell via a RunspacePool.
I feed it commands and it outputs exactly what Powershell would output if you ran Powershell on it's own, each line is a new entry in a List.
The strange thing is, today when trying the "Test-NetConnection" command in the program it has inconsistent results.
Command:
Test-NetConnection -ComputerName 'D123' -InformationLevel Detailed
D123 is a Windows 7 VM on the same network
Below you can see two results, it appears to be a 50% chance of getting either:
Count = 32
[0]: "ComputerName : D123"
[1]: "RemoteAddress : fe80::9503:8d01:d690:6c0a%14"
[2]: "PingSucceeded : True"
[3]: "PingReplyDetails : System.Net.NetworkInformation.PingReply"
[4]: "TcpClientSocket :"
[5]: "TcpTestSucceeded : False"
[6]: "RemotePort : 0"
[7]: "TraceRoute :"
[8]: "Detailed : True"
[9]: "InterfaceAlias : Internal"
[10]: "InterfaceIndex : 14"
[11]: "InterfaceDescription : Intel(R) 82574L Gigabit Network Connection #2"
[12]: "NetAdapter : MSFT_NetAdapter (CreationClassName = "MSFT_NetAdapter", DeviceID ="
[13]: ""{FDA85168-53B0-4F24-ABEB-BDC9F3A29958}", SystemCreationClassName = "CIM_NetworkPort","
[14]: "SystemName = "WIN-IAJUP1S3FL9.testdomain.com")"
[15]: "NetRoute : MSFT_NetRoute (InstanceID = "poB:DD9#?55"
[16]: "?55DD55"
[17]: "")"
[18]: "SourceAddress : MSFT_NetIPAddress (Name = "poB:DDl:pBD?:lDpC:mDmp?o/"
[19]: "?55"
[20]: "?55"
[21]: "55"
[22]: "", CreationClassName = "","
[23]: "SystemCreationClassName = "", SystemName = "")"
[24]: "NameResolutionSucceeded : True"
[25]: "BasicNameResolution : {}"
[26]: "LLMNRNetbiosRecords : {}"
[27]: "DNSOnlyRecords : {}"
[28]: "AllNameResolutionResults :"
[29]: "IsAdmin : True"
[30]: "NetworkIsolationContext : Private Network"
[31]: "MatchingIPsecRules :"
Or
Count = 9
[0]: "ComputerName : D123"
[1]: "RemoteAddress : fe80::9503:8d01:d690:6c0a%14"
[2]: "AllNameResolutionResults : 172.16.0.10"
[3]: "fe80::9503:8d01:d690:6c0a"
[4]: "InterfaceAlias : Internal"
[5]: "SourceAddress : fe80::b0f8:20b:f90c:cf3e%14"
[6]: "NetRoute (NextHop) : ::"
[7]: "PingSucceeded : True"
[8]: "PingReplyDetails (RTT) : 0 ms"
The second block is what it should be returning, it is also what the command shows when running on Powershell.
What i'd like to know is why it is returning so many values, from the looks of it it's returning results for all members in the command and not just the op level ones (if that makes sense, look here: Working with .NET properties in Power Shell), but I have absolutely no idea why.
EDIT1: The blocks of output are copy+pastes from Visual Studio, so the Count = 32 is how many lines Powershell passed back and the [number] is the List position.
EDIT2: It seems that the more details is coming from adding " | select *" to the command, this is strange though because none of my code does this and it gets the additional details 50% of the time.
Thanks to the help of Veefu and John I looked into my code more.
Unsure why it does this, but whenever I had the Powershell code run in the main Window Load event it would affect all subsequent executions of the same Powershell command.
When moved to a different section of the code it behaved as expected.
Unsure why this was happening but selecting specific properties from the Powershell output is more consistent, so to anyone who looks at this I'd suggest doing as Veefu said in the comments.
I am trying to get a theme for Visual Studio Code working to what I want. Currently, I'm trying to use Obsidian working with C# rules, but I'm not sure which key word to use to override color customizations. VSCode does not seem to recognize interfaces as they're language specific.
"editor.tokenColorCustomizations": {
"functions" :{
"foreground": "#F1F2F3"
},
"interface": { //not valid
"foreground": "#B48C8C"
}
}
How can I get VSCode color customizations to recognize c# specific syntaxes?
editor.tokenColorCustomizations can use a number of values: comments, functions, keywords, numbers, strings, types and variables. If none of those work for you textMateRules is available as well. So you can do something like:
"editor.tokenColorCustomizations": {
"textMateRules": [{
"scope": "yourScopeHere",
"settings": {
"fontStyle": "italic",
"foreground": "#C69650"
}
}]
},
So you just have to figure out what scope you need for "interface".
For that, try CTRL-Shift-P and type scope: choose
Developer: Inspect Editor Tokens and Scopes
and for whichever keyword is selected, like interface you will get a listing of its textmate scope. That should be inserted as the scope value above. [In my experience, it is more accurate to open the "Inspect TM Scopes" panel and then click a couple of items and then the one, like interface, that you want - the scope panel will remain open.] You can copy from the scopes panel.
You may need only the main scope listed, but if need to narrow its scope you can include the others listed in a comma-separated list in the scopes: ..., ..., ...
Based on Davi's answer:
Edit "C:\Program Files\Microsoft VS Code\resources\app\extensions\csharp\syntaxes\csharp.tmLanguage.json":
Find:
{"name":"storage.type.cs","match":"#?[[:alpha:]][[:alnum:]]*"}
Replace with:
{"name":"storage.type.interface.cs","match":"#?[I][[:upper:]][[:alpha:]][[:alnum:]]"},{"name":"storage.type.cs","match":"#?[_[:alpha:]][_[:alnum:]]"}
Add to settings.json:
"editor.tokenColorCustomizations": {
"[Default Dark+]": { // remove scope to apply to all themes
"textMateRules": [
{
"scope": "entity.name.type.interface.cs",
"settings": {
"foreground": "#b8d7a3"
}
},
{
"scope": "storage.type.interface.cs",
"settings": {
"foreground": "#b8d7a3"
}
}
]
}
},
VSCode 1.63.2:
Ctrl + Shift + P > Open Settings (JSON)
Paste this:
"editor.tokenColorCustomizations": {
"[Default Dark+]": {
"textMateRules": [
{
"scope": "entity.name.type.interface",
"settings": {
"foreground": "#a4ddaf"
}
}
]
}
},
I believe it can be partially done by editing "Program Files\Microsoft VS Code\resources\app\extensions\csharp\syntaxes" by adding support for "storage.type.interface.cs" with a regular expression that matches the convention.
Something like [I]([A-Z][a-z][A-Za-z]*)
You could also exclude possible mismatches like
IISManager, IPhoneDevice
https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide
https://www.apeth.com/nonblog/stories/textmatebundle.html
good luck with that and please let me know if you got it done