Open Timezyxdev opened 1 year ago
I have the same issue (Combobox crash). The platform I'm using is Macbook M2 Pro. Installed open3d 0.16.1 using pip
Let me know if you find a good UI structure to use in place of dropdowns. I'll do the same. Might as well find a workaround until the bug itself is resolved.
Using gui.ListView() instead seems to be a decent workaround. It functions basically the same but I haven't experienced any crashes using it so far. For example you can replace something like:
self.profiles = gui.Combobox()
for name in sorted(Settings.LIGHTING_PROFILES.keys()):
self.profiles.add_item(name)
self.profiles.add_item(Settings.CUSTOM_PROFILE_NAME)
self.profiles.set_on_selection_changed(self._on_lighting_profile)
with
self.profiles = gui.ListView()
list = []
for name in sorted(Settings.LIGHTING_PROFILES.keys()):
list.append[name]
self.profiles.set_items(list)
self.profiles.set_on_selection_changed(self._on_lighting_profile)
You just have to change your function _on_lighting_profile to accomodate the fact that ListView passes the item name and whether it was a double click or not instead of the item name and index. Also useful is listview.set_max_visible_items() which lets you choose how many items the ListView shows before it adds a scrollbar. Otherwise it seems that the listview will just grow to accommodate all the items in the list.
The only issue I'm still having with this is that the default FileDialog menu includes two dropdown menus which can still cause my application to crash. Does anybody know how this default FileDialog menu could be edited to remove these elements? I know it removes some functionality for the user but I'd rather that then have the possibility of a sudden crash.
Alright, the solution for the above is to go to the file Open3D\cpp\open3d\visualization\gui\FileDialog.cpp and remove or comment out lines 238 and 258 which are the lines that add the Combo Boxes to the file dialog layout. Then you need to build from source to install your custom version of open3d, instructions for which can be found here
Checklist
master
branch).Describe the issue
I have been developing an application working of of the vis_gui.py example provided in the documentation. I have added additional panels with buttons and comboboxes and allowed users to load multiple point clouds. Unfortunately I cannot share my full code but I was able to replicate my issue just using the vis_gui.py example on multiple computers.
After I load in data, even if it's a very dense point cloud, Open3d seems to be able to handle rotations, transformations, and other manipulations of the 3D point cloud without slowdown. However, as soon as I interact with any Combobox in my panels, if there is any slowdown the application will close without any error message. The most extreme example is when I load a dense (41126103 point) cloud into the vis_gui.py example and it becomes very slow. As soon as I begin interacting with a Combobox the app freezes and quickly crashes.
This is more frustrating in my own use case, where the point clouds are a little bit smaller (downsampled from the cloud mentioned above). I load multiple at once and store them in global variables, allowing the user to switch between them, and don't see any slow down. Sometimes interacting with Comboboxes doesn't crash the app, and I can begin selecting from them. However, other times as soon as I begin running my mouse over the items in the Combobox the loading wheel appears and then the app crashes. It's very inconsistent and I don't know if it can even be fixed since the issue seems to appear in the base GUI example as well. This bug occurs in my version of the GUI even when no data has been loaded sometimes. If I just hover my mouse across many options in a Combobox quickly then which option is highlighted will lag and the app will crash. I have not been able to replicate this crash with no data loaded in the vis_gui.py example yet. I'm not sure what about the state of my machine causes this but when it happens once it seems to occur very frequently and is easy to trigger, however after waiting a while it can be very hard to replicate until suddenly it crops up again hours or days later.
The only workaround I have thought of so far is simply not using Comboboxes. However using Comboboxes would be much more convenient as I'm populating them with an unknown number of items, and it's important for me to know which item is selected when the Combobox is used.
Steps to reproduce the bug
Error message
No error message in my Anaconda Prompt window (this is a major part of the problem. I don't know why Open3d is crashing).
Expected behavior
I am expecting the Combobox elements to have slowdown but not to crash the whole application every time they do. This is understandable for the large point cloud example above because the app slows down to the point of not responding, but in my own version with smaller point clouds there's only a little slowdown and the app still crashes.
Open3D, Python and System information
Additional information
No response