galaxysite / gorg64

The organizer includes a clock with an alarm, a scheduler, a notebook and a tool for working with a clipboard. For GNU/Linux 64 bit version.
GNU Affero General Public License v3.0
4 stars 1 forks source link

Random segmentation fault when selectiong a language. #21

Open fredvs opened 2 hours ago

fredvs commented 2 hours ago

I get random segmentation fault when selecting a language. It appears sometimes and I dont see why. There is a error form message "Segmentation fault" but after click [ok] all seems normal. Do you have a idea of what is wrong sometimes? Here the result of debug: gorg64_onset

fredvs commented 2 hours ago

OK, it seems that a check if the file exists helped, I did not have yet a random crash. Will commit asap.

procedure tsettingsfo.onsetval(const sender: TObject; var avalue: msestring;
               var accept: Boolean);
begin
if fileexists(langdir + langdrop.dropdown.cols[1][langdrop.dropdown.ItemIndex]) // this check
then begin
...
end;
fredvs commented 1 hour ago

Aaargh, no, I just have a segmentation fault when selecting a language. The language is assigned but there is the same segmentation fault when selecting a other language. If closing gorg64 and reload, no more segmentation fault (till a random appears).

fredvs commented 1 hour ago

Clearly the segmentation fault is due to the "live change of language":

mainfo.ChangeLang;
  mainfo.updatelang();
  if assigned(eefo) then eefo.onloadlang();

The easiest way to fix the problem is to remove those lines and force to reload gorg64 to see the new language, but it is a few sad...

fredvs commented 1 hour ago

Dont forget the last pull-request otherwise the language is not assigned when selected.