SkyLined / BugId

Detect, analyze and uniquely identify crashes in Windows applications

Home Page:https://bugid.skylined.nl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BugId fails with error: "NoneType instance has no attribute bAllocated"

maxcoderrrr opened this issue · comments

Hi,

Testing some inputs on an x86 environment resulted in a couple different errors from BugId. One of them that frequenly occured is this:

→ Command line: C:\test\foo.exe C:\test\foo.bar
+ Main process 6368/0x18E0 (foo.exe.exe, x86, IL:3): Attached ("C:\test\foo.exe" C:\test\foo.bar).
┌───[ Fatal builtins.AttributeError Exception in thread 1016/0x3F8 (cThread#361A570{main = __fRun, #1016, running}) ]─────────────────────────────────────────────────────────────
│ NoneType instance has no attribute bAllocated.
│ instance: None.
│
│ Local variables:
│   cAddressType = <class 'mWindowsSDK.mWindowsPrimitiveTypes.UINT64'>#2835B68
│   o0VirtualAllocation = None
│   oProcess = <mBugId.cProcess.cProcess.cProcess object at 0x04064830>#4064830
│   uMemoryAddress = 3516767946
│
│ Stack for thread 1016/0x3F8 (cThread#361A570{main = __fRun, #1016, 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:134
│  ╷ ╷ ╷ │ 133:    # Create a preliminary error report.
│  ╷ ╷ ╷ │ 134:    o0BugReport = cBugReport.foCreate(
│  ╷ ╷ ╷ ├─┐ cBugReport?.foCreate @ C:\BugId3\modules\mBugId\cBugReport\cBugReport.py:181
│  ╷ ╷ ╷ ╷ │ 180:    );
│  ╷ ╷ ╷ ╷ │ 181:    fApplyBugTranslationsToBugReport(oCdbWrapper, oBugReport);
│  ╷ ╷ ╷ ╷ ├─┐ fApplyBugTranslationsToBugReport @ C:\BugId3\modules\mBugId\mBugTranslations\fApplyBugTranslationsToBugReport.py:65
│  ╷ ╷ ╷ ╷ ╷ │ 64:    for oBugTranslation in aoBugTranslations:
│  ╷ ╷ ╷ ╷ ╷ │ 65:      if oBugTranslation.fbApplyToBugReport(oCdbWrapper, oBugReport):
│  ╷ ╷ ╷ ╷ ╷ ├─┐ cBugTranslation?.fbApplyToBugReport @ C:\BugId3\modules\mBugId\mBugTranslations\cBugTranslation.py:137
│  ╷ ╷ ╷ ╷ ╷ ╷ │ 136:    # If more top frames may be irrelevant, see if they are there and hide them:
│  ╷ ╷ ╷ ╷ ╷ ╷ │ 137:    if (oSelf.bAdditionalIrrelevantNoneTopStackFrames or oSelf.rb0AdditionalIrrelevantStackFrameSymbols) and oBugReport.o0Stack:
│  ╷ ╷ ╷ ╷ ╷ ╷ ├─┐ o0Stack @ C:\BugId3\modules\mBugId\cBugReport\cBugReport.py:101
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ │ 100:    if oSelf.__o0Stack is None:
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ │ 101:      oSelf.__o0Stack = cStack.foCreate(oSelf.__oProcess, oSelf.__oWindowsAPIThread, oSelf.uStackFramesCount);
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ ├─┐ cStack?.foCreate @ C:\BugId3\modules\mBugId\cStack.py:317
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ │ 316:          oStack.__du0CallTargetAddress_by_uReturnAddress[u0ReturnAddress] = \
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ │ 317:              oProcess.fu0GetTargetAddressForCallInstructionReturnAddress(u0ReturnAddress);
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ├─┐ cProcess_fu0GetTargetAddressForCallInstructionReturnAddress @ C:\BugId3\modules\mBugId\cProcess\cProcess_fu0GetTargetAddressForCallInstructionReturnAddress.py:85
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ │ 84:      uCallMemoryAddress = uReturnAddress + o0CallInstructionStructure.i32Offset;
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ │ 85:      u0CallTargetAddress = fu0ReadAddressFromMemory(UINT64, uCallMemoryAddress);
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ├─┐ fu0ReadAddressFromMemory @ C:\BugId3\modules\mBugId\cProcess\cProcess_fu0GetTargetAddressForCallInstructionReturnAddress.py:49
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ │ 48:    o0VirtualAllocation = oProcess.fo0GetVirtualAllocationForAddress(uMemoryAddress);
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ │ 49:    if not o0VirtualAllocation.bAllocated:
│  ╒═══════════════════╛ ▲ AttributeError("'NoneType' object has no attribute 'bAllocated'")
│  │ __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=x86 --n0ApplicationMaxRunTimeInSeconds=120 C:\test\foo.exe -- C:\test\foo.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: 2022-12-12 12:05 (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.
│ • Windows version: Windows 10 Pro release 2009, build 19044 x86.
│ • Python version: 3.11.1 x86.
│ • cdb.exe (x86) version: 10.0.17763.132.
│ • cdb.exe (x64) version: not available.
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Thank you in advance for helping to improve BugId!
√ A copy of the error report can be found in C:\BugId3\Internal error reports\2023-12-03 23։46։54.398183 BugId error report #25.txt.

This seems to be similar to a previous bug that was present in BugId.release.2022-01-05.09.41 (see my comment in #114). Perhaps it was only fixed for x64, but not for x86?

I fixed this in June of 2023 but forgot to close the bug.
SkyLined/mBugId@93605b0

This fix is not yet in the release version. I will see if I can create a new release version soon