Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mineechor opened this issue Dec 12, 2022 · 4 comments
Open

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

mineechor opened this issue Dec 12, 2022 · 4 comments

Comments

@mineechor
Copy link

mineechor commented Dec 12, 2022

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
Copy link
Owner

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
Copy link
Owner

Handle non-internal, non-product modules better:
SkyLined/mProductDetails@d2b268d

@SkyLined SkyLined changed the title AssertionErro Handle non-internal, non-product modules better Dec 12, 2022
@SkyLined
Copy link
Owner

Properly implement bPauseBeforeExit
SkyLined/mDebugOutput@833cf3b

@mineechor
Copy link
Author

mineechor commented Dec 12, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants