Skip to content

NativeAOT: Reporting of the exceptions in the event viewer #73998

Closed

Description

@kant2002

I compile WinForms application and it crashes with "marshalling not supported", this message is only visible in the WinDbg, but not in the console and not in the EventViewer.

Faulting application name: WindowsFormsApp1.exe, version: 1.0.0.0, time stamp: 0x6090d7e5
Faulting module name: WindowsFormsApp1.exe, version: 1.0.0.0, time stamp: 0x6090d7e5
Exception code: 0x4b1b53b5
Fault offset: 0x0000000000bedd88
Faulting process id: 0x38a8
Faulting application start time: 0x01d740a4363a160b
Faulting application path: ...\WindowsFormsApp1.exe
Faulting module path: ...\WindowsFormsApp1.exe
Report Id: e4b0ae11-b78f-48f7-a3e5-1255eb71649d
Faulting package full name: 
Faulting package-relative application ID: 

Would be good to have actual error message here as well.

Activity

  1. hez2010 commented on May 5, 2021

    @hez2010
    Contributor

    In general the error message will be printed to stderr, but for a WinExe it will be redirected to NUL for performance by default. You can overwrite the behavior and print it to a specified file via command line:

    WindowsFormsApp1.exe 2>err.log
    
  2. kant2002 commented on May 6, 2021

    @kant2002
    ContributorAuthor

    @hez2010 This does not works for WinForms application. Or at least this does not works for me. Empty file produced.

  3. hez2010 commented on May 6, 2021

    @hez2010
    Contributor

    @kant2002 I've tested your CoreRTWinFormsTestBed and this approach works for me. Did you forget to put a 2 before >err.log?

    Update: it only works in cmd. It won't work if you're using powershell.

  4. hez2010 commented on May 6, 2021

    @hez2010
    Contributor

    Or you can use & .\WindowsFormsApp1.exe 2>&1 | Out-String in powershell.

  5. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Aug 16, 2022
  6. added this to the 8.0.0 milestone on Aug 16, 2022
  7. ghost removed
    untriagedNew issue has not been triaged by the area owner
    on Aug 16, 2022
  8. modified the milestones: 8.0.0, 9.0.0 on Aug 2, 2023
  9. added a commit that references this issue on Feb 8, 2024
    c4a2a6f
  10. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Feb 8, 2024
  11. added a commit that references this issue on Feb 12, 2024
    271f5f1
  12. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Feb 12, 2024
  13. locked and limited conversation to collaborators on Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions