Bjr à vous,
Je vous fais part d'un bug inacceptable de la LCL, s'agissant d'un fondamental censé être testé et validé.
Environnement:
Un Linux Mint 32 bit tout neuf et mis à jour
Lazarus 2.0.6 et fpc 3.0.4 tout frais
Window manager: xfce
Soit une fiche principale avec un menu Fichier -> Ouvrir.
L'item de menu est associé à un TAction nommé acOpen
Je crée un TOpenDialog d'ouverture de fichier, à la volée, tel que je le pratique depuis 15 ans
et j'obtiens un crash au droit du Execute, avec les messages suivants:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 procedure TRPIMainWnd.acOpenExecute(Sender: TObject); begin with TOpenDialog.Create(Application) do begin try InitialDir := ExtractFilePath(ParamStr(0)); // dossier de l'exécutable Filter := 'GHTopo XTB|*.xtb'; if (Execute) then // <-- crash !!! begin // traitement ShowMessage(FileName); end; finally Release; end; end; end;
ce qui est parfaitement inacceptable, s'agissant quand même d'un fondamental !!!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 The program 'GHTopoRPI' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 5414 error_code 3 request_code 12 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.)
La seule parade est de lancer l'application avec le paramètre --sync
Comment peut-on accepter de tels dysfonctionnements entraînant crises de nerfs, pertes de temps ???
Partager