vmagnin / gtk-fortran

A GTK / Fortran binding. The documentation is in the Wiki tab.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hl_cairo_viewer.f90 example: crashes when the Add window is cancelled then called again

vmagnin opened this issue · comments

Describe the bug
At start, if we click on the "Cancel" button of the Add window, then call it again ("Add files" button) and choose a file, the application is crashing:

At line 146 of file gtk-fortran/examples/hl_cairo_viewer.f90
Fortran runtime error: Allocatable argument 'file_list' is not allocated

Error termination. Backtrace:
#0  0x7fbc4b023ad0 in ???
#1  0x7fbc4b024649 in ???
#2  0x7fbc4b024c46 in ???
#3  0x5629beb14518 in add_files
        at gtk-fortran/examples/hl_cairo_viewer.f90:146

It does occur only at start. Not if an image was already selected.

Your system:

  • OS version: Ubuntu 22.10 64 bits
  • Compiler version: gfortran 12.2.0
  • GTK branch: gtk4 (gtk-fortran 4.3.0)