Octave crashes when opening an m file

Bug #1524251 reported by Spyros Theodoritsis

This bug report was converted into a question: question #278620: Octave crashes when opening an m file.

This bug affects 1 person
Affects Status Importance Assigned to Milestone
octave (Ubuntu)

Bug Description

When double clicking on an m file Octave opens and crashes immediately. When opening Octave first and then open the m file from menu then no crash occurs.

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: octave 4.0.0-3ubuntu5
ProcVersionSignature: Ubuntu 4.2.0-19.23-generic 4.2.6
Uname: Linux 4.2.0-19-generic x86_64
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Dec 9 11:23:24 2015
InstallationDate: Installed on 2015-09-23 (76 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
SourcePackage: octave
UpgradeStatus: Upgraded to wily on 2015-11-05 (33 days ago)

Revision history for this message
Spyros Theodoritsis (madmetal) wrote :
Revision history for this message
Mike Miller (mtmiller) wrote :

Thanks for your bug report. Can you please provide the m file that you open in Octave that causes the behavior you are reporting?

Changed in octave (Ubuntu):
status: New → Incomplete
Revision history for this message
Spyros Theodoritsis (madmetal) wrote :

It happens with all .m files, created by Matlab or Octave.

Revision history for this message
Mike Miller (mtmiller) wrote :

Ok, then what I believe you are seeing is the expected behavior in the current version of Octave. To explain a little further:

Double-clicking an m file, say myfile.m, runs the command "octave --force-gui myfile.m". The current behavior of Octave 4.0 is to run the script defined in that file to completion, and then exit. This sounds like what you are seeing.

If you instead run "octave --force-gui --persist myfile.m" then the Octave GUI will stay active and accept further interactive commands.

If you'd like to propose different functionality for what Octave should do when an m file is double-clicked, it would be best to open a feature request bug report against the upstream project here: https://savannah.gnu.org/bugs/?func=additem&group=octave

Revision history for this message
Mike Miller (mtmiller) wrote :

Bug description seems better suited to an explanation of why Octave is behaving the way it is.

Changed in octave (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Kushal Chauhan (kushalchauhan98) wrote :

I found a temporary solution to this problem.
If you want to just open a .m file in Octave's Editor and not execute it while double clicking it, you can do the following:
1. Locate the .desktop file of GNU Octave in /use/share/applications (in nautilus with root persimmions)
2. Right Click -> Properties; In the command field, replace the existing text with :

                         octave --force-gui --persist --eval "edit %F"

For your understanding,
--force-gui forces octave to invoke the GUI
--persist tells octave to NOT exit after execution of command/script
--eval tells octave to execute the following command ("edit %F") in its interpreter, which will open the file in its editor.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.