Octave Gui Bug (Maybe)

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Octave Gui Bug (Maybe)

Patrick Martin
Hello,

I pulled down the most recent source for Octave and it built successfully. When I run octave, it correctly pulls up the gui and the command line works fine. However, the buttons for opening a script file, or calling "edit somthing.m" nothing happens. Did I miss a library during compile time? Should I grab a different branch to compile?

Thanks!
Patrick

--
Patrick Martin, PhD
Assistant Professor
Electrical and Computer Engineering
Department of Physical Sciences
York College of Pennsylvania
This information is intended solely for the use of the individual to whom it is addressed. 
Any review, disclosure, copying, distribution or use of this e-mail communication by 
others is strictly prohibited.  If you are  not the intended recipient, please notify us 
immediately by returning  this message to the sender and delete all copies.


	
	
	
	
Reply | Threaded
Open this post in threaded view
|

Re: Octave Gui Bug (Maybe)

Daniel Sebald
On 06/05/2013 12:50 PM, Patrick Martin wrote:
> Hello,
>
> I pulled down the most recent source for Octave and it built
> successfully. When I run octave, it correctly pulls up the gui and the
> command line works fine. However, the buttons for opening a script file,
> or calling "edit somthing.m" nothing happens. Did I miss a library
> during compile time? Should I grab a different branch to compile?

Hi Patrick,

You are trying to open an existing file?  What happens afterward?  Does
the GUI appear to act as normal or is there strange behavior?  What OS
and what environment are you using, e.g., linux/ubuntu/KDE?

Dan
Reply | Threaded
Open this post in threaded view
|

Re: Octave Gui Bug (Maybe)

Patrick Martin
Yes, I am trying to open an existing m-file that I previously made in Matlab. Typing edit, or clicking on the "Script" button causes no response. I also do not see any errors at the command prompt within the Octave GUI. I am using Ubuntu 12.04 with the XFCE window manager.

Patrick


On Wed, Jun 5, 2013 at 2:01 PM, Daniel J Sebald <[hidden email]> wrote:
On 06/05/2013 12:50 PM, Patrick Martin wrote:
Hello,

I pulled down the most recent source for Octave and it built
successfully. When I run octave, it correctly pulls up the gui and the
command line works fine. However, the buttons for opening a script file,
or calling "edit somthing.m" nothing happens. Did I miss a library
during compile time? Should I grab a different branch to compile?

Hi Patrick,

You are trying to open an existing file?  What happens afterward?  Does the GUI appear to act as normal or is there strange behavior?  What OS and what environment are you using, e.g., linux/ubuntu/KDE?

Dan



--
Patrick Martin, PhD
Assistant Professor
Electrical and Computer Engineering
Department of Physical Sciences
York College of Pennsylvania
This information is intended solely for the use of the individual to whom it is addressed. 
Any review, disclosure, copying, distribution or use of this e-mail communication by 
others is strictly prohibited.  If you are  not the intended recipient, please notify us 
immediately by returning  this message to the sender and delete all copies.


	
	
	
	
Reply | Threaded
Open this post in threaded view
|

Re: Octave Gui Bug (Maybe)

Daniel Sebald
On 06/05/2013 01:24 PM, Patrick Martin wrote:
> Yes, I am trying to open an existing m-file that I previously made in
> Matlab. Typing edit, or clicking on the "Script" button causes no
> response. I also do not see any errors at the command prompt within the
> Octave GUI. I am using Ubuntu 12.04 with the XFCE window manager.

Interesting.  This may be the first example of someone using XFCE and
the GUI.  Could you please try the following?  In the source tree, look
for the file ./libinterp/interpfcn/sighandlers.cc.  Edit that file by
commenting out the following line somewhere around Lines 472-474
(sighandlers.cc)

#ifdef SIGCHLD
// octave_set_signal_handler (SIGCHLD, sigchld_handler);
#endif

and recompile.  Let us know how that goes.  Since Qt tries to use native
resources, this will test whether XFCE is using child processes to some
extent.

Dan


>
> Patrick
>
>
> On Wed, Jun 5, 2013 at 2:01 PM, Daniel J Sebald <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     On 06/05/2013 12:50 PM, Patrick Martin wrote:
>
>         Hello,
>
>         I pulled down the most recent source for Octave and it built
>         successfully. When I run octave, it correctly pulls up the gui
>         and the
>         command line works fine. However, the buttons for opening a
>         script file,
>         or calling "edit somthing.m" nothing happens. Did I miss a library
>         during compile time? Should I grab a different branch to compile?
>
>
>     Hi Patrick,
>
>     You are trying to open an existing file?  What happens afterward?
>       Does the GUI appear to act as normal or is there strange behavior?
>       What OS and what environment are you using, e.g., linux/ubuntu/KDE?
>
>     Dan
Reply | Threaded
Open this post in threaded view
|

Re: Octave Gui Bug (Maybe)

John Donoghue-3
In reply to this post by Patrick Martin
Date: Wed, 5 Jun 2013 14:24:36 -0400
From: Patrick Martin <[hidden email]>
To: [hidden email]
Subject: Re: Octave Gui Bug (Maybe)
Message-ID:
        <[hidden email]>
Content-Type: text/plain; charset="iso-8859-1"

Yes, I am trying to open an existing m-file that I previously made in
Matlab. Typing edit, or clicking on the "Script" button causes no response.
I also do not see any errors at the command prompt within the Octave GUI. I
am using Ubuntu 12.04 with the XFCE window manager.

Patrick


On Wed, Jun 5, 2013 at 2:01 PM, Daniel J Sebald <[hidden email]>wrote:

> On 06/05/2013 12:50 PM, Patrick Martin wrote:
>
>> Hello,
>>
>> I pulled down the most recent source for Octave and it built
>> successfully. When I run octave, it correctly pulls up the gui and the
>> command line works fine. However, the buttons for opening a script file,
>> or calling "edit somthing.m" nothing happens. Did I miss a library
>> during compile time? Should I grab a different branch to compile?
>>
>
> Hi Patrick,
>
> You are trying to open an existing file?  What happens afterward?  Does
> the GUI appear to act as normal or is there strange behavior?  What OS and
> what environment are you using, e.g., linux/ubuntu/KDE?
>
> Dan
>

 
Out of interest sake, if you click on the "new" file button on the editor, does it display a new file window? I am wondering whether QScintilla was enabled?
 
John
Reply | Threaded
Open this post in threaded view
|

Re: Octave Gui Bug (Maybe)

PhilipNienhuis
In reply to this post by Patrick Martin
Patrick Martin wrote
Hello,

I pulled down the most recent source for Octave and it built successfully.
When I run octave, it correctly pulls up the gui and the command line works
fine. However, the buttons for opening a script file, or calling "edit
somthing.m" nothing happens. Did I miss a library during compile time?
Should I grab a different branch to compile?
I sometimes see the same thing.
The remedy is to click "Window" and then "Show editor".

Apparently the GUI doesn't properly pick up the "edit" command from the terminal.

Philip
Reply | Threaded
Open this post in threaded view
|

Re: Octave Gui Bug (Maybe)

Daniel Sebald
In reply to this post by John Donoghue-3
On 06/05/2013 03:09 PM, John Donoghue wrote:
[snip]

>     >  On 06/05/2013 12:50 PM, Patrick Martin wrote:
>     >
>     > > Hello,
>     > >
>     > > I pulled down the most recent source for Octave and it built
>     > > successfully. When I run octave, it correctly pulls up the gui
>     and the
>     > > command line works fine. However, the buttons for opening a
>     script file,
>     > > or calling "edit somthing.m" nothing happens. Did I miss a library
>     > > during compile time? Should I grab a different branch to compile?
[snip]

> Out of interest sake, if you click on the "new" file button on the
> editor, does it display a new file window? I am wondering whether
> QScintilla was enabled?
> John

Good point.  Alternately, try something like this in the build directory:

[sebald@ build1]$ grep QSCINTILLA config.h
#define HAVE_QSCINTILLA 1


In any case, I've looked into this further and the way that things are
set up is sort of a bug.  It may well be that Patrick's system doesn't
have QScintilla, but Octave GUI should fall back on the editor that is
shown in

>> edit get all
ans =

   scalar structure containing the fields:

     EDITOR = emacs %s
     HOME = /home/sebald/octave
     AUTHOR = Daniel J Sebald
     EMAIL = [](0x0)
     LICENSE = GPL
     MODE = async
     EDITINPLACE =  1

if that is true.  However, I know it isn't doing that.  Here is the hunk
of code for opening the file via "status = __octave_link_edit_file__
(file);"

bool
octave_qt_link::do_edit_file (const std::string& file)
{
   emit edit_file_signal (QString::fromStdString (file));

   return true;
}

It is returning true in all cases, even if QScintilla editor isn't
present.  The minimal fix should be something like:

bool
octave_qt_link::do_edit_file (const std::string& file)
{
#ifdef HAVE_QSCINTILLA
   emit edit_file_signal (QString::fromStdString (file));
   return true;
#else
   return false;
#endif
}

But even that isn't proper in some respects.  The way this should work
is that the routine should emit the signal and then go into a wait state
until it gets a wakeup and info about the success of the opening of the
file from some other signal.  If QScintilla isn't present that editor
slot should be a rudimentary thing that simply sets the result to false
then wakes the worker (Octave) process.

Torsten, if you are following, would you like to look into this?
Otherwise I will a changeset this weekend.

Dan
Reply | Threaded
Open this post in threaded view
|

Re: Octave Gui Bug (Maybe)

Daniel Sebald
In reply to this post by PhilipNienhuis
On 06/05/2013 06:35 PM, PhilipNienhuis wrote:

> Patrick Martin wrote
>> Hello,
>>
>> I pulled down the most recent source for Octave and it built successfully.
>> When I run octave, it correctly pulls up the gui and the command line
>> works
>> fine. However, the buttons for opening a script file, or calling "edit
>> somthing.m" nothing happens. Did I miss a library during compile time?
>> Should I grab a different branch to compile?
>
> I sometimes see the same thing.
> The remedy is to click "Window" and then "Show editor".
>
> Apparently the GUI doesn't properly pick up the "edit" command from the
> terminal.

Hmm, this looks like a separate bug from what I just posted.  I
investigated what you described and noticed too that when starting the
GUI, even though the editor is open but its tab is "hidden", there is no
check in the box "Show editor" under the "Window" menu.  But if I click
on the "Editor" tab, the box "Show editor" will be checked.  Selecting
the "Command Window" tab does not clear the check box.  Checking and
unchecking the "Show editor" box will make the whole "Editor" tab appear
and disappear.  So something isn't consistent there.

Dan
Reply | Threaded
Open this post in threaded view
|

Re: Octave Gui Bug (Maybe)

Patrick Martin
In reply to this post by Daniel Sebald
Thanks for digging into this issue! I logged into my Gnome desktop environment and it does not work either. In fact, if I go to the menu and select "Open.." no file browser window pops up.

I did check my ubuntu synaptic manager and saw that libqscintilla is not installed. I have now installed it. Should I recompile and add back in the line you told me to comment?

Patrick


On Wed, Jun 5, 2013 at 8:02 PM, Daniel J Sebald <[hidden email]> wrote:
On 06/05/2013 03:09 PM, John Donoghue wrote:
[snip]

    >  On 06/05/2013 12:50 PM, Patrick Martin wrote:
    >
    > > Hello,
    > >
    > > I pulled down the most recent source for Octave and it built
    > > successfully. When I run octave, it correctly pulls up the gui
    and the
    > > command line works fine. However, the buttons for opening a
    script file,
    > > or calling "edit somthing.m" nothing happens. Did I miss a library
    > > during compile time? Should I grab a different branch to compile?
[snip]


Out of interest sake, if you click on the "new" file button on the
editor, does it display a new file window? I am wondering whether
QScintilla was enabled?
John

Good point.  Alternately, try something like this in the build directory:

[sebald@ build1]$ grep QSCINTILLA config.h
#define HAVE_QSCINTILLA 1


In any case, I've looked into this further and the way that things are set up is sort of a bug.  It may well be that Patrick's system doesn't have QScintilla, but Octave GUI should fall back on the editor that is shown in

edit get all
ans =

  scalar structure containing the fields:

    EDITOR = emacs %s
    HOME = /home/sebald/octave
    AUTHOR = Daniel J Sebald
    EMAIL = [](0x0)
    LICENSE = GPL
    MODE = async
    EDITINPLACE =  1

if that is true.  However, I know it isn't doing that.  Here is the hunk of code for opening the file via "status = __octave_link_edit_file__ (file);"

bool
octave_qt_link::do_edit_file (const std::string& file)
{
  emit edit_file_signal (QString::fromStdString (file));

  return true;
}

It is returning true in all cases, even if QScintilla editor isn't present.  The minimal fix should be something like:

bool
octave_qt_link::do_edit_file (const std::string& file)
{
#ifdef HAVE_QSCINTILLA
  emit edit_file_signal (QString::fromStdString (file));
  return true;
#else
  return false;
#endif
}

But even that isn't proper in some respects.  The way this should work is that the routine should emit the signal and then go into a wait state until it gets a wakeup and info about the success of the opening of the file from some other signal.  If QScintilla isn't present that editor slot should be a rudimentary thing that simply sets the result to false then wakes the worker (Octave) process.

Torsten, if you are following, would you like to look into this? Otherwise I will a changeset this weekend.

Dan



--
Patrick Martin, PhD
Assistant Professor
Electrical and Computer Engineering
Department of Physical Sciences
York College of Pennsylvania
This information is intended solely for the use of the individual to whom it is addressed. 
Any review, disclosure, copying, distribution or use of this e-mail communication by 
others is strictly prohibited.  If you are  not the intended recipient, please notify us 
immediately by returning  this message to the sender and delete all copies.


	
	
	
	
Reply | Threaded
Open this post in threaded view
|

Re: Octave Gui Bug (Maybe)

Daniel Sebald
On 06/06/2013 06:57 AM, Patrick Martin wrote:
> Thanks for digging into this issue! I logged into my Gnome desktop
> environment and it does not work either. In fact, if I go to the menu
> and select "Open.." no file browser window pops up.
>
> I did check my ubuntu synaptic manager and saw that libqscintilla is not
> installed. I have now installed it. Should I recompile and add back in
> the line you told me to comment?

Yes.  "hg revert --all" in the project sourcetree will also restore the
file without having to edit.  Installing libqscintilla is what you need
to do.  To make sure you have all the necessary header files and
utilities, do this check after configure and before recompiling to
possibly save some time:

   [sebald@ build1]$ grep QSCINTILLA config.h
   #define HAVE_QSCINTILLA 1

I will enter a bug report for what you've uncovered, thank you.  And
please continue to be a test-source for XFCE.

Dan
Reply | Threaded
Open this post in threaded view
|

Re: Octave Gui Bug (Maybe)

Patrick Martin
I reverted the tree as instructed and I checked the config.h file and I get:

#undef HAVE_QSCINTILLA

but it is commented out.

Patrick Martin, Ph.D.
Assistant Professor
Electrical and Computer Engineering
York College of Pennsylvania

On Jun 6, 2013, at 11:53 AM, Daniel J Sebald <[hidden email]> wrote:

> On 06/06/2013 06:57 AM, Patrick Martin wrote:
>> Thanks for digging into this issue! I logged into my Gnome desktop
>> environment and it does not work either. In fact, if I go to the menu
>> and select "Open.." no file browser window pops up.
>>
>> I did check my ubuntu synaptic manager and saw that libqscintilla is not
>> installed. I have now installed it. Should I recompile and add back in
>> the line you told me to comment?
>
> Yes.  "hg revert --all" in the project sourcetree will also restore the file without having to edit.  Installing libqscintilla is what you need to do.  To make sure you have all the necessary header files and utilities, do this check after configure and before recompiling to possibly save some time:
>
>  [sebald@ build1]$ grep QSCINTILLA config.h
>  #define HAVE_QSCINTILLA 1
>
> I will enter a bug report for what you've uncovered, thank you.  And please continue to be a test-source for XFCE.
>
> Dan
This information is intended solely for the use of the individual to whom it is addressed.
Any review, disclosure, copying, distribution or use of this e-mail communication by
others is strictly prohibited.  If you are  not the intended recipient, please notify us
immediately by returning  this message to the sender and delete all copies.

Reply | Threaded
Open this post in threaded view
|

Re: Octave Gui Bug (Maybe)

Daniel Sebald
On 06/06/2013 08:49 PM, Patrick Martin wrote:
> I reverted the tree as instructed and I checked the config.h file and I get:
>
> #undef HAVE_QSCINTILLA
>
> but it is commented out.

After running "configure" with the QScintilla library installed you are
not seeing

#define HAVE_QSCINTILLA 1

in config.h?  There needs to be a "#define HAVE_QSCINTILLA" for the GUI
editor to be built.  Look through config.log and search for "intilla" or
"INTILLA" and see if there are "no"s where there should be "yes"s.  That
might give more info about what is missing.

Dan
Reply | Threaded
Open this post in threaded view
|

Re: Octave Gui Bug (Maybe)

Patrick Martin
Ah yes - I forgot to re-run configure. Once I did, it found scintilla
and compiled. I ran the test binary run-octave and I can now open the
editor! A couple new things occur: first, the break point button
throws an error in the octave terminal. Second, I cannot close the
program via the window X or by using the main menu. Could I be missing
another dependency?

Patrick Martin, Ph.D.
Assistant Professor
Electrical and Computer Engineering
York College of Pennsylvania

On Jun 7, 2013, at 1:36 AM, Daniel J Sebald <[hidden email]> wrote:

> On 06/06/2013 08:49 PM, Patrick Martin wrote:
>> I reverted the tree as instructed and I checked the config.h file and I get:
>>
>> #undef HAVE_QSCINTILLA
>>
>> but it is commented out.
>
> After running "configure" with the QScintilla library installed you are not seeing
>
> #define HAVE_QSCINTILLA 1
>
> in config.h?  There needs to be a "#define HAVE_QSCINTILLA" for the GUI editor to be built.  Look through config.log and search for "intilla" or "INTILLA" and see if there are "no"s where there should be "yes"s.  That might give more info about what is missing.
>
> Dan
This information is intended solely for the use of the individual to whom it is addressed.
Any review, disclosure, copying, distribution or use of this e-mail communication by
others is strictly prohibited.  If you are  not the intended recipient, please notify us
immediately by returning  this message to the sender and delete all copies.

Reply | Threaded
Open this post in threaded view
|

Re: Octave Gui Bug (Maybe)

Patrick Martin
In reply to this post by Daniel Sebald
Hi Dan,

Disregard my prior email. I cleaned out everything and recompiled. Both the debug and closing errors went away.

Thanks for your help!

Patrick Martin
Assistant Professor
Electrical and Computer Engineering
York College of Pennsylvania

On Jun 7, 2013, at 1:36 AM, Daniel J Sebald <[hidden email]> wrote:

> On 06/06/2013 08:49 PM, Patrick Martin wrote:
>> I reverted the tree as instructed and I checked the config.h file and I get:
>>
>> #undef HAVE_QSCINTILLA
>>
>> but it is commented out.
>
> After running "configure" with the QScintilla library installed you are not seeing
>
> #define HAVE_QSCINTILLA 1
>
> in config.h?  There needs to be a "#define HAVE_QSCINTILLA" for the GUI editor to be built.  Look through config.log and search for "intilla" or "INTILLA" and see if there are "no"s where there should be "yes"s.  That might give more info about what is missing.
>
> Dan
This information is intended solely for the use of the individual to whom it is addressed.
Any review, disclosure, copying, distribution or use of this e-mail communication by
others is strictly prohibited.  If you are  not the intended recipient, please notify us
immediately by returning  this message to the sender and delete all copies.