tryphotino / photino.NET

https://tryphotino.io
Apache License 2.0
833 stars 68 forks source link

Help in identifying why app crashes - Windows 10 #179

Closed nicholas-brooks closed 1 week ago

nicholas-brooks commented 2 months ago

Hello!

We received a report from our customer that a test version of our new native app based on photino.NET simply "disappeared". We have a fair amount of logging within the .NET app, however nothing was captured when it crashed. Possibly an issue outside of the .NET app in or around photino.native?

What can we do to try and figure out the cause? We're noobs when it comes to C++ windows dev, so any tips would be greatly appreciated.

App Details: Target Framework: net8.0-windows Photino.Native: v2.6.0 Photino.NET: v2.6.0

Details of machine:

OS Edition: Microsoft Windows 10 Pro  x64 OS Version: 22H2 OS Build: 19045.3693

Crash details from Windows Event Viewer:

Log Name:      Application
Source:        Application Error
Date:          18/04/2024 8:46:23 AM
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      ****
Description:
Faulting application name: app.exe, version: 1.0.0.0, time stamp: 0x65f9e99a
Faulting module name: app.exe, version: 1.0.0.0, time stamp: 0x65f9e99a
Exception code: 0xc0000005
Fault offset: 0x000000000005310f
Faulting process id: 0x2c84
Faulting application start time: 0x01da9110ec1d28de
Faulting application path: ****\app.exe
Faulting module path: ****\app.exe
Report Id: 561c998f-d3c3-4d9d-9670-7765a77f81be
Faulting package full name:
Faulting package-relative application ID:
Event Xml:
<Event xmlns=http://schemas.microsoft.com/win/2004/08/events/event>
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>100</Task>
    <Opcode>0</Opcode>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2024-04-17T22:46:23.3813052Z" />
    <EventRecordID>112162</EventRecordID>
    <Correlation />
    <Execution ProcessID="0" ThreadID="0" />
    <Channel>Application</Channel>
    <Computer>****</Computer>
    <Security />
  </System>
  <EventData>
    <Data>app.exe</Data>
    <Data>1.0.0.0</Data>
    <Data>65f9e99a</Data>
    <Data>app.exe</Data>
    <Data>1.0.0.0</Data>
    <Data>65f9e99a</Data>
    <Data>c0000005</Data>
    <Data>000000000005310f</Data>
    <Data>2c84</Data>
    <Data>01da9110ec1d28de</Data>
    <Data>****\app.exe</Data>
    <Data>****\app.exe</Data>
    <Data>561c998f-d3c3-4d9d-9670-7765a77f81be</Data>
    <Data>
    </Data>
    <Data>
    </Data>
  </EventData>
</Event>
philippjbauer commented 2 months ago

Unfortunately there's nothing to make a determination of what happened from this log.

Is this happening on a regular basis or has this been a single event? Have you been able to reproduce the behavior?

nicholas-brooks commented 2 months ago

@philippjbauer Appreciate for the response.

Unfortunately there's nothing to make a determination of what happened from this log.

I had assumed we'd need more info.

Is this happening on a regular basis or has this been a single event? Have you been able to reproduce the behavior?

It has happened more than once but customer has not being able to tell us any similarities between them. As for reproducible - not at this stage. We've pulled the beta from the customer while we figure this out.

Is there a way of deploying the app so it can generate detailed crash dumps? As I indicated, we don't have experience doing so with c++ projects, but more than happy to do the leg work to do so - just need some guidance.

MikeYeager commented 2 months ago

@nicholas-brooks The crash is actually happening in the .NET application. It's most likely one of the interop calls with the C++ app, but we can't be sure based on this log. This particular error message basically means it failed, but doesn't tell us more than that. If you find something in the Event log showing that Photino.Native.dll crashed too then we could look into that. It runs in a separate process, so it would have a separate crash log. All we can see so far is that the failure happens in the .NET app. A repro scenario would be the best way to solve this if you can come up with one. I'll ask around and see if someone here can come up with a troubleshooting plan.

nicholas-brooks commented 2 months ago

@MikeYeager - Thanks Mike. We'll add additional instrumentation to the app then and get the customers to try again.

Out of interest, does photino do anything specific to get Edge WebView2 to install on Windows 10? Or is that managed by Windows? Is there a minimum version that Photino needs for Edge WebView2?

MikeYeager commented 2 months ago

@nicholas-brooks I honestly can't remember which version of Windows 10 started including WebView2. On startup, Photino detects whether WebView2 is installed and, if it doesn't find it, kicks off a download and install, but it's the same process as downloading and installing manually.

philippjbauer commented 1 week ago

@nicholas-brooks Have you been able to find more information on this problem? Or has it resolved itself?

nicholas-brooks commented 1 week ago

@philippjbauer Thanks for giving me a nudge... customer only just started using the app again (with additional logging baked in) however at this stage no more issues. I'm happy to close this off for now.

philippjbauer commented 1 week ago

That's great to hear! Thank you for the feedback