bugGNU Octave - Bugs: bug #55318, __mfile_encoding__ function hangs...

 
 

bug #55318: __mfile_encoding__ function hangs if the GUI is not active

Submitter:  Mike Miller <mtmiller>
Submitted:  Fri 28 Dec 2018 11:54:38 PM UTC
   
 
Category:  Octave Function Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 5.0.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 03 Jan 2019 10:12:41 AM UTC, comment #5: 

Closing as fixed.

Markus Mützel <mmuetzel>
Group administrator
Tue 01 Jan 2019 12:44:55 PM UTC, comment #4: 

I pushed your changeset to the stable branch here:
https://hg.savannah.gnu.org/hgweb/octave/rev/a6694db4bd41

Marking as ready for test.

Markus Mützel <mmuetzel>
Group administrator
Sun 30 Dec 2018 10:49:07 AM UTC, comment #3: 

@Torsten: Your patch looks better. Seeing that this is the only place where octave_link::gui_preference is called, it's probably good to do the check here.

Markus Mützel <mmuetzel>
Group administrator
Sun 30 Dec 2018 10:09:27 AM UTC, comment #2: 

The patch is working for me. However, maybe we should move the check for a running GUI into _octave_link_gui_preference_, which would then just return an empty string in case the GUI is not running (see attached patch). Then the check would be done at a "central" place for future uses of _octave_link_gui_preference_.

(file #45786)

Torsten Lilge <ttl>
Group Member
Sat 29 Dec 2018 02:32:48 PM UTC, comment #1: 

The attached changeset checks whether the GUI is running before calling the function that changes the GUI property.

I am not sure whether this is the right place to fix the error though. Probably calling "__octave_link_gui_preference__" shouldn't be locking the interpreter thread indefinitely.

CC'ing Torsten because I think he better understands the interaction between GUI and interpreter thread.

(file #45769)

Markus Mützel <mmuetzel>
Group administrator
Fri 28 Dec 2018 11:54:38 PM UTC, original submission:  

The internal built-in function '__mfile_encoding__' hangs if it is called from the Octave prompt when the GUI is not active. It returns a value with --gui or with octave-cli.

Since this internal function is only called from the GUI itself to change the internal state of the interpreter, this is only minor, but the function shouldn't block, presumably waiting on the GUI to respond, if the GUI isn't active.

Mike Miller <mtmiller>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #45769:  bug55318_gui_preferences.patch added by mmuetzel (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ttl (Updated the item)
  • -email is unavailable- added by mmuetzel (Updated the item)
  • -email is unavailable- added by mmuetzel
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-03 mmuetzel StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2019-01-01 mmuetzel StatusPatch Reviewed Ready For Test
    2018-12-30 mmuetzel StatusNone Patch Reviewed
    2018-12-30 ttl Attached File- Added bug55318_gui_preferences_v02.patch, #45786
    2018-12-29 mmuetzel Attached File- Added bug55318_gui_preferences.patch, #45769
        Operating SystemGNU/Linux Any
        Carbon-Copy- Added ttl
    2018-12-28 mtmiller Carbon-CopyRemoved 80942 -

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code