Open DrDrwx opened 3 years ago
Can Confirm that everything works fine on Windows.
So this only happens if your user name is file permissions? lol
Apparently? I'm not too sure, just seems broken for me lmao
I can reproduce this. My username for testing was cstuart. For me it wasn't just with my own username - any file dialog started in a subdirectory of /home// will segfault when I click on that second directory button.
Version: 0.8.64 on Python 3.7 Operating System: Scientific Linux 7.4
Segfault will happen even if I have used other directory buttons in between (e.g. start in /home/abc/def/ghi/jkl and click ghi followed by abc: segfault). Segfault will happen even if I have used the directory listing to move into another directory (e.g. start in /home/abc/def, move into /home/abc/def/ghi, click abc and it crashes). Segfault will happen even if the first directory name is /solhome not /home. I also get a segfault if I start in /home/abc/def/, click 'home' at the top and then click abc in the directory listing. I also get a segfault if I start in /home/ and then click abc in the directory listing.
Segfault didn't happen however if I started in /etc/systemd/system and clicked systemd.
I have a suspicion it is related to crossing filesystems? I'm not exactly sure though, since some other mounted drives on my system didn't produce the segfault. I do often find myself in folders that don't work (nothing is marked as [file] or [dir] so I can't navigate into the directories. The obvious place this happens for me is when I navigate to '/'. I assume this is a different bug but I haven't got round to reporting that yet.
Useful example if you want to test out lots of different starting folders:
from pathlib import Path
import dearpygui.dearpygui as dpg
with dpg.window() as window_id:
dpg.set_primary_window(window_id, True)
starting_file_item = dpg.add_input_text(label='File dialog starting file', default_value=Path().absolute())
# Add a button to create a file dialog
def callback():
starting_path = Path(dpg.get_value(starting_file_item))
if starting_path.is_dir(): starting_path /= 'foobar'
with dpg.file_dialog(
directory_selector=False,
show=True,
default_path=str(starting_path.parent),
default_filename=starting_path.name,
):
dpg.add_file_extension("")
dpg.add_button(label='Open file dialog', callback=callback)
dpg.start_dearpygui()
Can we verify this is occuring in 1.0?
Version of Dear PyGui
Version: DPG 0.8.38 Operating System: 5.4.0-77-generic #86~18.04.1-Ubuntu SMP Fri Jun 18 01:23:22 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux, Ubuntu 18.04.5 LTS
Python 3.8.0 (default, Feb 25 2021, 22:10:10), [GCC 8.4.0] on linux
Bug
DPG SegFaults when clicking the username/user home button along the top, within the file explorer widget. In this instance, drwx.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expected behaviour was for the window to display files within my home directory.
Screenshots/Video
Standalone, minimal, complete and verifiable example