octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #65312] "__run_test_suite__" ran in GUI hangs


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #65312] "__run_test_suite__" ran in GUI hangs Octave in some configurations
Date: Wed, 14 Feb 2024 12:20:33 -0500 (EST)

Follow-up Comment #4, bug#65312 (group octave):

Nice catch!

I also thought sometimes that the GUI and the interpreter are "fighting" over
the current working directory if it changes often.

Does the following change avoid the issue for you? Also with checked
"Synchronize Octave working directory..."?


diff -r 92a2e883af17 scripts/testfun/__run_test_suite__.m
--- a/scripts/testfun/__run_test_suite__.m      Wed Feb 14 15:07:28 2024 +0100
+++ b/scripts/testfun/__run_test_suite__.m      Wed Feb 14 18:14:39 2024 +0100
@@ -56,12 +56,19 @@
   orig_wquiet = warning ("query", "quiet");
   orig_wstate = warning ();
   orig_mfile_encoding = mfile_encoding ("utf-8");
+  if (isguirunning ())
+    orig_sync_dir = ...
+      __event_manager_gui_preference__
("filesdockwidget/sync_octave_directory");
+  endif
   logfile = make_absolute_filename ("fntests.log");
   unwind_protect
     page_screen_output (false);
     warning ("on", "quiet");
     warning ("off", "Octave:deprecated-function");
     warning ("off", "Octave:legacy-function");
+    if (isguirunning ())
+      __event_manager_gui_preference__
("filesdockwidget/sync_octave_directory", "false");
+    endif
     nfail = dp = dn = dxf = dxb = dsk = drtsk = drgrs = 0;
     try
       fid = fopen (logfile, "wt");
@@ -157,6 +164,9 @@
     warning ("off", "all");
     warning (orig_wstate);
     warning (orig_wquiet.state, "quiet");
+    if (isguirunning ())
+      __event_manager_gui_preference__
("filesdockwidget/sync_octave_directory", orig_sync_dir);
+    endif
     mfile_encoding (orig_mfile_encoding);
     page_screen_output (pso);
   end_unwind_protect


This just treads the symptom. I don't know where the actual issue would need
to be fixed. (Maybe, it's a race condition for changing the directory from the
interpreter thread and the GUI thread?)



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65312>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]