barotto / IBMulator

The IBM PS/1 emulator.
https://barotto.github.io/IBMulator
GNU General Public License v3.0
111 stars 4 forks source link

Crash when attempting to navigate to the root directory in "File Select" window #62

Closed andornaut closed 3 years ago

andornaut commented 3 years ago

IBMulator crashes when attempting to navigate to the root directory in "File Select" window.

Steps to reproduce

  1. Run ibmulator
  2. Enter CTRL+F3
  3. Navigate to the 3.5" disk drive
  4. Navigate up directories (click ..) until attempting to navigate to the root directory (eg. /)

Expected results

Display file list at root / directory

Actual results

Exits with an error:

[INF0] mch | Machine power on
[ERR0] gui | unable to set the current path to ''
terminate called after throwing an instance of 'std::exception'
  what():  std::exception'

Environment

IBMulator version: 0.12 OS: Linux Distribution: Ubuntu 20.10 Kernel: 5.8.0-53-generic

barotto commented 3 years ago

Bug confirmed, thank you.

Possible workarounds:

1. use your OS's native file dialogs by setting in ibmulator.ini:

[program]
file_dialogs=native

The custom file dialog is still very primitive and needs some work, but in fullscreen mode the native dialogs don't work well.

2. specify the path of the directory containing your disk images in ibmulator.ini:

[program]
media_dir=/PATH/TO/DISK/IMAGES

Paths can be also specified relative to the home directory using the ~ character, like:

media_dir=~/my/disks

If a path doesn't start with / nor ~ then it's relative to the IBMulator's user directory, which is usually the dir containing ibmulator.ini.

andornaut commented 3 years ago

Thanks for letting me know about those workarounds! Setting media_dir works for me.