gaasedelen / lighthouse

A Coverage Explorer for Reverse Engineers
MIT License
2.2k stars 302 forks source link

AttributeError: type object 'SortOrder' has no attribute 'DescendingOrder' #143

Open yanan-sjh opened 2 months ago

yanan-sjh commented 2 months ago

[Lighthouse] Enabling painting... [Lighthouse] Successfully loaded 1 coverage file(s)... Traceback (most recent call last): File "C:/Users/11955/AppData/Roaming/Hex-Rays/IDA Pro/plugins\lighthouse\ui\coverage_table.py", line 1059, in sort direction = (sort_order == QtCore.Qt.SortOrder.DescendingOrder) AttributeError: type object 'SortOrder' has no attribute 'DescendingOrder' Traceback (most recent call last): File "C:/Users/11955/AppData/Roaming/Hex-Rays/IDA Pro/plugins\lighthouse\ui\coverage_table.py", line 1059, in sort direction = (sort_order == QtCore.Qt.SortOrder.DescendingOrder) AttributeError: type object 'SortOrder' has no attribute 'DescendingOrder' Traceback (most recent call last): File "C:/Users/11955/AppData/Roaming/Hex-Rays/IDA Pro/plugins\lighthouse\integration\ida_integration.py", line 343, in activate self.action_function() File "C:/Users/11955/AppData/Roaming/Hex-Rays/IDA Pro/plugins\lighthouse\integration\core.py", line 394, in interactive_load_file self.open_coverage_overview(lctx.dctx) File "C:/Users/11955/AppData/Roaming/Hex-Rays/IDA Pro/plugins\lighthouse\integration\core.py", line 207, in open_coverage_overview disassembler.show_dockable("Coverage Overview") File "C:/Users/11955/AppData/Roaming/Hex-Rays/IDA Pro/plugins\lighthouse\util\disassembler\ida_api.py", line 174, in show_dockable widget = make_dockable(dockable_name, parent, dctx) File "C:/Users/11955/AppData/Roaming/Hex-Rays/IDA Pro/plugins\lighthouse\integration\core.py", line 50, in create_coverage_overview overview = CoverageOverview(lctx, widget) File "C:/Users/11955/AppData/Roaming/Hex-Rays/IDA Pro/plugins\lighthouse\ui\coverage_overview.py", line 42, in init self.refresh() File "C:/Users/11955/AppData/Roaming/Hex-Rays/IDA Pro/plugins\lighthouse\util\disassembler\ida_api.py", line 48, in wrapper thunk() File "C:/Users/11955/AppData/Roaming/Hex-Rays/IDA Pro/plugins\lighthouse\util\disassembler\ida_api.py", line 44, in thunk output[0] = function(*args, *kwargs) File "C:/Users/11955/AppData/Roaming/Hex-Rays/IDA Pro/plugins\lighthouse\ui\coverage_overview.py", line 232, in refresh self._table_model.refresh() File "C:/Users/11955/AppData/Roaming/Hex-Rays/IDA Pro/plugins\lighthouse\ui\coverage_table.py", line 1345, in refresh self._internal_refresh() File "C:/Users/11955/AppData/Roaming/Hex-Rays/IDA Pro/plugins\lighthouse\util\disassembler\ida_api.py", line 48, in wrapper thunk() File "C:/Users/11955/AppData/Roaming/Hex-Rays/IDA Pro/plugins\lighthouse\util\disassembler\ida_api.py", line 44, in thunk output[0] = function(args, **kwargs) File "C:/Users/11955/AppData/Roaming/Hex-Rays/IDA Pro/plugins\lighthouse\ui\coverage_table.py", line 1355, in _internal_refresh self.sort(self._last_sort, self._last_sort_order) File "C:/Users/11955/AppData/Roaming/Hex-Rays/IDA Pro/plugins\lighthouse\ui\coverage_table.py", line 1059, in sort direction = (sort_order == QtCore.Qt.SortOrder.DescendingOrder)

This is the issue I encountered while loading the coverage file. Is it a problem with my configuration? How can I resolve it?

yanan-sjh commented 2 months ago

Replacing QtCore.Qt.SortOrder.DescendingOrder with QtCore.Qt.DescendingOrder can solve the above problem.

# direction = (sort_order == QtCore.Qt.SortOrder.DescendingOrder)
direction = (sort_order == QtCore.Qt.DescendingOrder)