SkyLined / BugId

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

Handle non-internal, non-product modules better #113

Open mineechor opened 1 year ago

mineechor commented 1 year ago
BugId.cmd -v %WinDir%\system32\rundll32.exe -- advapi32 CloseThreadWaitChainSession
Traceback (most recent call last):
  File "D:\2022\final\BugId.release.2022-12-08.09.57\BugId.py", line 1294, in <module>
    fSaveInternalExceptionReportAndExit(oException, oTraceBack);
  File "D:\2022\final\BugId.release.2022-12-08.09.57\BugId.py", line 202, in fSaveInternalExceptionReportAndExit
    fOutputExceptionInformation(oException, oTraceBack);
  File "D:\2022\final\BugId.release.2022-12-08.09.57\fOutputExceptionInformation.py", line 55, in fOutputExceptionInformation
    fOutputVersionInformation(
  File "D:\2022\final\BugId.release.2022-12-08.09.57\fOutputVersionInformation.py", line 72, in fOutputVersionInformation
    aoProductDetails = mProductDetails.faoGetProductDetailsForAllLoadedModules();
  File "D:\2022\final\BugId.release.2022-12-08.09.57\modules\mProductDetails\faoGetProductDetailsForAllLoadedModules.py", line 6, in faoGetProductDetailsForAllLoadedModules
    o0ProductDetails = cProductDetails.fo0GetForModule(mLoadedModule);
  File "D:\2022\final\BugId.release.2022-12-08.09.57\modules\mProductDetails\cProductDetails.py", line 31, in fo0GetForModule
    assert mProductModule.__file__ is not None, \
AssertionError: __file__ is None for <module 'mpl_toolkits' (namespace)>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\2022\final\BugId.release.2022-12-08.09.57\BugId.py", line 1297, in <module>
    m0DebugOutput.fTerminateWithException(
TypeError: fTerminateWithException() got an unexpected keyword argument 'bPauseBeforeExit'
SkyLined commented 1 year ago

Thank you for your report.

This code is trying to report (another) internal error and runs into issues when attempting to collect loaded module information to write in the error report.

Apparently you've installed mpl_toolkits, which gets loaded when BugId runs (Y THO?). My code recognizes that mpl_toolkits is not a built-in Python module and assumes it is part of BugId. When it tries to collect information about the module, it fails because the module has its __file__ attribute set to None (Y THO?).

I can probably fix this by ignoring all modules that have __file__ set to None but having random Python modules loaded into BugId may break many assumptions is they behave weirdly like this, so after this fix you may still see more exceptions - please report those too and I will try to fix them as well.

SkyLined commented 1 year ago

Handle non-internal, non-product modules better: https://github.com/SkyLined/mProductDetails/commit/d2b268d2f86422cb0a6b32284adcf643366d51ab

SkyLined commented 1 year ago

Properly implement bPauseBeforeExit https://github.com/SkyLined/mDebugOutput/commit/833cf3baf75cf2b26ca51b48c61d9e3010811a3c

mineechor commented 1 year ago

Thanks

 

842294334 @.***

 

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年12月12日(星期一) 下午5:46 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [SkyLined/BugId] AssertionErro (Issue #113)

Thank you for your report.

This code is trying to report (another) internal error and runs into issues when attempting to collect loaded module information to write in the error report.

Apparently you've installed mpl_toolkits, which gets loaded when BugId runs (Y THO?). My code recognizes that mpl_toolkits is not a built-in Python module and assumes it is part of BugId. When it tries to collect information about the module, it fails because the module has its file attribute set to None (Y THO?).

I can probably fix this by ignoring all modules that have file set to None but having random Python modules loaded into BugId may break many assumptions is they behave weirdly like this, so after this fix you may still see more exceptions - please report those too and I will try to fix them as well.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>