SkyLined / BugId

Detect, analyze and uniquely identify crashes in Windows applications
https://bugid.skylined.nl
Other
499 stars 90 forks source link

BugId fails with error: "Unexpected last instruction output:" #129

Open maxcoderrrr opened 2 months ago

maxcoderrrr commented 2 months ago

Hi, I was running the latest release of BugId and encountered the following error:

┌───[ Software license warning ]───────────────────────────────────────────────────────────────────────────────────────
│ ▲ You have no license for BugId and your trial period will expire on August 3rd, 2024
│ ▲ You have no license for mBugId and your trial period will expire on August 4th, 2024
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
→ Command line: C:\test\foo.exe C:\x\xx.bar
+ Main process 7496/0x1D48 (foo.exe, x64, IL:3): Attached ("C:\test\foo.exe" C:\x\xx.bar).
+ Sub process 2380/0x94C (foo.exe, x64, IL:3): Attached ("C:\test\foo.exe" C:\x\xx.bar).
- Main process 7496/0x1D48 (foo.exe, x64, IL:3): Terminated.
┌───[ Fatal builtins.AssertionError Exception in thread 2896/0xB50 (cThread#253BEB79810{main = __fRun, #2896, running}) ]───────────────────────────────────────────────────
│ Unexpected last instruction output:
│ 00007ffe`9f606c72 c3              ret
│ 
│ Local variables:
│   asbLastInstructionAndAddress = [<instance builtins:bytes "b'00007ffe`9f606c72 c3              ret'">#253BEB607B0]#253BEBCA340
│   obInstructionPointerDoesNotPointToAllocatedMemoryMatch = None
│   obLastInstructionMatch = None
│   oBugReport = <mBugId.cBugReport.cBugReport.cBugReport object at 0x00000253BEBB5AD0>#253BEBB5AD0
│   oCdbWrapper = <mBugId.cCdbWrapper.cCdbWrapper.cCdbWrapper object at 0x00000253BEB65190>#253BEB65190
│   oException = <mBugId.cException.cException object at 0x00000253BEA80C90>#253BEA80C90
│   oProcess = <mBugId.cProcess.cProcess.cProcess object at 0x00000253BEBB7E10>#253BEBB7E10
│   oWindowsAPIThread = <mWindowsAPI.cThread#253BEB7B090|tid = 0x12FC|pid = 0x94C|access = [SYNCHRONIZE | THREAD_GET_CONTEXT | THREAD_QUERY_INFORMATION | THREAD_QUERY_LIMITED_INFORMATION]|TEB @ 0x17701F6000|stack @ 0x1771590000 - 0x17711A8000>#253BEB7B090
│   sViolationTypeId = 'R'
│   sViolationTypeNotes = None
│   uAccessViolationAddress = 18446744073709551615
│ 
│ Stack for thread 2896/0xB50 (cThread#253BEB79810{main = __fRun, #2896, running}):
│ ─┐ __fRun @ C:\BugId3\modules\mBugId\cCdbWrapper\cCdbWrapper_cHelperThread.py:66
│  │ 65:      try:
│  │ 66:        oSelf.__fActivity(*oSelf.__axActivityArguments);
│  ├─┐ cCdbWrapper_fCdbStdInOutHelperThread @ C:\BugId3\modules\mBugId\cCdbWrapper\cCdbWrapper_fCdbStdInOutHelperThread.py:54
│  ╷ │ 53:    oCdbWrapper.fbFireCallbacks("Log message", "Main loop #%d" % uMainLoopCounter);
│  ╷ │ 54:    (bEventIsFatal, bEventHasBeenHandled) = oCdbWrapper.ftbHandleLastCdbEvent(asbOutputWhileRunningApplication);
│  ╷ ├─┐ cCdbWrapper_ftbHandleLastCdbEvent @ C:\BugId3\modules\mBugId\cCdbWrapper\cCdbWrapper_ftbHandleLastCdbEvent.py:214
│  ╷ ╷ │ 213:    oCdbWrapper.o0ReservedMemoryVirtualAllocation = None;
│  ╷ ╷ │ 214:  o0BugReport = cBugReport.fo0CreateForException(
│  ╷ ╷ ├─┐ cBugReport?.fo0CreateForException @ C:\BugId3\modules\mBugId\cBugReport\cBugReport.py:148
│  ╷ ╷ ╷ │ 147:    if oException.uCode in dfoAnalyzeException_by_uExceptionCode:
│  ╷ ╷ ╷ │ 148:      o0BugReport = dfoAnalyzeException_by_uExceptionCode[oException.uCode](o0BugReport, oProcess, oWindowsAPIThread, oException);
│  ╷ ╷ ╷ ├─┐ cBugReport_foAnalyzeException_STATUS_ACCESS_VIOLATION @ C:\BugId3\modules\mBugId\cBugReport\cBugReport_foAnalyzeException_STATUS_ACCESS_VIOLATION.py:107
│  ╷ ╷ ╷ ╷ │ 106:      obLastInstructionMatch = grbInstruction.match(asbLastInstructionAndAddress[0]);
│  ╷ ╷ ╷ ╷ │ 107:      assert obLastInstructionMatch, \
│  ╒═══════╛ ▲ Assertion failed: 'Unexpected last instruction output:\r\n00007ffe`9f606c72 c3              ret'
│  │ __fRun @ C:\BugId3\modules\mBugId\cCdbWrapper\cCdbWrapper_cHelperThread.py:74
│  │ 73:        cException, oException, oTraceBack = sys.exc_info();
│  │ 74:        if not oSelf.__oCdbWrapper.fbFireCallbacks("Internal exception", oSelf.__oThread, oException, oTraceBack):
│ ═╛ ▲ Application terminated because exception was not handled.
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Please report the above details at the below web-page so it can be addressed:
    https://github.com/SkyLined/BugId/issues/new
If you do not have a github account, or you want to report this issue
privately, you can also send an email to:
    BugId@skylined.nl

In your report, please copy ALL the information about the exception reported
above, as well as the stack trace and BugId version information. This makes
it easier to determine the cause of this issue and makes for faster fixes.

If you can reproduce the issue, it would help a lot if you can run BugId in
verbose mode by adding the --verbose command-line argument.
as in: BugId -v --isa=x64 C:\test\foo.exe -- C:\x\xx.bar

  ____________________________________________________________________________
                              __
   ││▌║█▐▐║▌▌█│║║│      _,siSP**YSis,_       ╒╦╦══╦╗             ╒╦╦╕    ╔╦╕
   ││▌║█▐▐║▌▌█│║║│    ,SP*'`    . `'*YS,      ║╠══╬╣ ╔╗ ╔╗ ╔╦═╦╗  ║║  ╔╦═╬╣
   ╵2808197631337╵   dS'  _    |    _ 'Sb    ╘╩╩══╩╝ ╚╩═╩╝ ╚╩═╬╣ ╘╩╩╛ ╚╩═╩╝
                    dP     \,-` `-<` `  Y;                 ╚╩═╩╝    ╮╷╭
      ╮╷╭          ,S`  \+' \      \    `Sissssssssssssssssssss,   :O()    ╲ö╱
     :O()          (S   (   | --====)   :SSSSSSSSSSSSSSSSSSSSSSD    ╯╵╰    ─O─
      ╯╵╰  ╮╷╭     'S,  /+, /      /    ,S?********************'           ╱O╲
           ()O:     Yb    _/'-_ _-<._.  dP
           ╯╵╰       YS,       |      ,SP         https://bugid.skylined.nl
  ____________________`Sbs,_    ' _,sdS`______________________________________
                        `'*YSissiSY*'`
                              ``
┌───[ Version information ]─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ ▲ BugId version: 2023-06-01 14:23 (in trial period).
│ ▲ mBugId version: 2022-12-12 12:05 (in trial period).
│ √ mConsole version: 2022-12-12 12:05.
│ √ mDateTime version: 2022-12-12 12:04.
│ √ mDebugOutput version: 2022-12-12 12:05.
│ √ mFileSystemItem version: 2022-12-12 12:05.
│ √ mHumanReadable version: 2022-12-12 12:04.
│ √ mMultiThreading version: 2022-12-12 12:05.
│ √ mNotProvided version: 2022-12-12 12:04.
│ √ mProductDetails version: 2022-12-12 12:05.
│ √ mRegistry version: 2022-12-12 12:05.
│ √ mWindowsAPI version: 2022-12-12 12:05.
│ √ mWindowsSDK version: 2022-12-12 12:04.
│ • Platform OS: Windows-10-10.0.19045-SP0 on AMD64 processor.
│ • Python version: 3.11.1, 64 bit.
│ • cdb.exe (x86) version: 10.0.17763.132.
│ • cdb.exe (x64) version: 10.0.17763.132.
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Thank you in advance for helping to improve BugId!
√ A copy of the error report can be found in C:\BugId3\Internal error reports\2024-07-04 10։14։55.755784 BugId error report #2.txt.

The issue was triggered when the application tried to return to a corrupted stack. Any help to fix this issue would be great.