Bug 406776 - Variables are not displayed in the workspace
Summary: Variables are not displayed in the workspace
Status: RESOLVED FIXED
Alias: None
Product: cantor
Classification: Applications
Component: octave-backend (show other bugs)
Version: 19.04
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Semke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-22 15:05 UTC by avlas
Modified: 2019-04-23 13:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 19.04.1


Attachments
Octave variable (125.81 KB, image/jpeg)
2019-04-22 17:44 UTC, Alexander Semke
Details
Octave variable 2 (91.39 KB, image/png)
2019-04-22 18:32 UTC, Alexander Semke
Details
f_test function usage (19.82 KB, image/png)
2019-04-22 19:31 UTC, Nikita Sirgienko
Details
Cantor crash (7.48 KB, text/plain)
2019-04-22 20:41 UTC, avlas
Details
cantor version (61.84 KB, image/png)
2019-04-22 22:10 UTC, avlas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description avlas 2019-04-22 15:05:46 UTC
Octave variables are not displayed in the Cantor's workspace. If there is a way to debug this issue, please let me know.

[ moved to become a specific bug from https://bugs.kde.org/show_bug.cgi?id=406684 ]
Comment 1 Alexander Semke 2019-04-22 17:44:45 UTC
Created attachment 119567 [details]
Octave variable
Comment 2 Alexander Semke 2019-04-22 17:46:44 UTC
(In reply to avlas from comment #0)
> Octave variables are not displayed in the Cantor's workspace. If there is a
> way to debug this issue, please let me know.
The variables are shown in the variable panel as shown on the screenshot attached. What do you mean with the variable is not displayed? You create a variable and you don't get any input and nothing is shown in the variable panel?
Comment 3 avlas 2019-04-22 17:48:27 UTC
(In reply to Alexander Semke from comment #2)
> (In reply to avlas from comment #0)
> > Octave variables are not displayed in the Cantor's workspace. If there is a
> > way to debug this issue, please let me know.
> The variables are shown in the variable panel as shown on the screenshot
> attached. What do you mean with the variable is not displayed? You create a
> variable and you don't get any input and nothing is shown in the variable
> panel?

I mean that in my system they do not appear in the panel.
Comment 4 Alexander Semke 2019-04-22 17:54:56 UTC
(In reply to avlas from comment #3)
> (In reply to Alexander Semke from comment #2)
> > (In reply to avlas from comment #0)
> > > Octave variables are not displayed in the Cantor's workspace. If there is a
> > > way to debug this issue, please let me know.
> > The variables are shown in the variable panel as shown on the screenshot
> > attached. What do you mean with the variable is not displayed? You create a
> > variable and you don't get any input and nothing is shown in the variable
> > panel?
> 
> I mean that in my system they do not appear in the panel.
Is your input processed by octave at all? Can you please start cantor in the terminal, enter the variable and paste here the debug output? The relevant part of the output starts with "evaluating:...".
Comment 5 avlas 2019-04-22 17:57:49 UTC
(In reply to Alexander Semke from comment #4)
> (In reply to avlas from comment #3)
> > (In reply to Alexander Semke from comment #2)
> > > (In reply to avlas from comment #0)
> > > > Octave variables are not displayed in the Cantor's workspace. If there is a
> > > > way to debug this issue, please let me know.
> > > The variables are shown in the variable panel as shown on the screenshot
> > > attached. What do you mean with the variable is not displayed? You create a
> > > variable and you don't get any input and nothing is shown in the variable
> > > panel?
> > 
> > I mean that in my system they do not appear in the panel.
> Is your input processed by octave at all? Can you please start cantor in the
> terminal, enter the variable and paste here the debug output? 

The variables are processed alright, it's rather a matter of the panel not showing them.


> The relevant
> part of the output starts with "evaluating:...".

Will do... thanks!

Btw, what version of Octave do you use? I use Octave 5.1.
Comment 6 Alexander Semke 2019-04-22 18:00:36 UTC
(In reply to avlas from comment #5)
> Btw, what version of Octave do you use? I use Octave 5.1.
I'm using Octave 5.1.0 on openSUSE LEAP 15.
Comment 7 avlas 2019-04-22 18:13:06 UTC
(In reply to Alexander Semke from comment #6)
> (In reply to avlas from comment #5)
> > Btw, what version of Octave do you use? I use Octave 5.1.
> I'm using Octave 5.1.0 on openSUSE LEAP 15.

Can you please restart cantor and do the following?

#1: plot(1:10)
#2: x = 2

It seems that it just doing #2 above works, but not if one does #1 first.

This is what I see in the terminal:

evaluating:  "x =2"
evaluate
wsStatusChange 0
currentExpressionStatusChanged
readOutput
start parsing     "x =  2\n"
readOutput
start parsing     "CANTOR_OCTAVE_BACKEND_PROMPT:5> "
parseOutput:  "x =  2\n"
setting result to a type  1  result
update Entry
currentExpressionStatusChanged
Entry Appended
Comment 8 Alexander Semke 2019-04-22 18:32:51 UTC
Created attachment 119568 [details]
Octave variable 2
Comment 9 avlas 2019-04-22 18:36:06 UTC
(In reply to Alexander Semke from comment #8)
> Created attachment 119568 [details]
> Octave variable 2

I see. Wondering why it fails here. Do you see anything wrong in the terminal info?
Comment 10 Alexander Semke 2019-04-22 18:37:56 UTC
(In reply to avlas from comment #7)
> (In reply to Alexander Semke from comment #6)
> > (In reply to avlas from comment #5)
> > > Btw, what version of Octave do you use? I use Octave 5.1.
> > I'm using Octave 5.1.0 on openSUSE LEAP 15.
> 
> Can you please restart cantor and do the following?
> 
> #1: plot(1:10)
> #2: x = 2
I added another screenshot. For the plot there is no variable created and added to the panel. For the second assignment there is the variable 'x' shown. Do you also have this? Or nothing?

> 
> It seems that it just doing #2 above works, but not if one does #1 first.
> 
> This is what I see in the terminal:
> 
> evaluating:  "x =2"
> evaluate
> wsStatusChange 0
> currentExpressionStatusChanged
> readOutput
> start parsing     "x =  2\n"
> readOutput
> start parsing     "CANTOR_OCTAVE_BACKEND_PROMPT:5> "
> parseOutput:  "x =  2\n"
> setting result to a type  1  result
> update Entry
> currentExpressionStatusChanged
> Entry Appended
Comment 11 Alexander Semke 2019-04-22 18:39:58 UTC
(In reply to avlas from comment #9)
> (In reply to Alexander Semke from comment #8)
> > Created attachment 119568 [details]
> > Octave variable 2
> 
> I see. Wondering why it fails here. Do you see anything wrong in the
> terminal info?
I don't see any 'start parsing     "__cantor_delimiter_line__\n"' in your output... Somewhere else you mentioned an issues with __cantor_delimeter_line__ on your computer. What was it?
Comment 12 Alexander Semke 2019-04-22 18:44:51 UTC
(In reply to Alexander Semke from comment #11)
> (In reply to avlas from comment #9)
> > (In reply to Alexander Semke from comment #8)
> > > Created attachment 119568 [details]
> > > Octave variable 2
> > 
> > I see. Wondering why it fails here. Do you see anything wrong in the
> > terminal info?
> I don't see any 'start parsing     "__cantor_delimiter_line__\n"' in your
> output... Somewhere else you mentioned an issues with
> __cantor_delimeter_line__ on your computer. What was it?

Can you please add here the full output after you've started Cantor? So, start cantor, execute those two commands and add the output here. Maybe as a text file.
Comment 13 avlas 2019-04-22 18:45:36 UTC
This is the full info from the terminal (there is always a first error because the system path is not visible to flatpak, I workarounded this by copying the content in $HOME and adding it to the path): 

dir:  "/usr/lib/x86_64-linux-gnu/qt5/plugins/cantor/backends"
Creating NullBackend
Creating PythonBackend
dir:  "/usr/bin/cantor/backends"
Backend  "Octave"  offers extensions:  ("HistoryExtension", "ScriptExtension", "PlotExtension", "LinearAlgebraExtension", "VariableManagementExtension", "PackagingExtension")
OctaveSession(0x5629619bbf30) Cantor::VariableManagementExtension(0x5629619ab6f0, name = "VariableManagementExtension")
"/usr/share/cantor/octavebackend/"
new worksheetaccess interface
loading assistants...
dir:  "/usr/lib/x86_64-linux-gnu/qt5/plugins/cantor/assistants"
plugin  "GràficAvançat"  is not supported by  "Octave"
plugin  "Crea una matriu"  is supported by  "Octave" , requires extensions  ("LinearAlgebraExtension")
plugin  "Deriva"  is not supported by  "Octave"
plugin  "Valors propis (autovalors)"  is supported by  "Octave" , requires extensions  ("LinearAlgebraExtension", "HistoryExtension")
plugin  "Vectors propis (autovectors)"  is supported by  "Octave" , requires extensions  ("LinearAlgebraExtension", "HistoryExtension")
plugin  "Importació de paquet"  is supported by  "Octave" , requires extensions  ("PackagingExtension")
plugin  "Integra"  is not supported by  "Octave"
plugin  "Inverteix una matriu"  is supported by  "Octave" , requires extensions  ("LinearAlgebraExtension", "HistoryExtension")
plugin  "Plot2d"  is supported by  "Octave" , requires extensions  ("PlotExtension")
plugin  "Plot3d"  is supported by  "Octave" , requires extensions  ("PlotExtension")
plugin  "Gràfic de Qalculate"  is not supported by  "Octave"
plugin  "ExecutaScript"  is supported by  "Octave" , requires extensions  ("ScriptExtension")
plugin  "Resol"  is not supported by  "Octave"
dir:  "/usr/bin/cantor/assistants"
loading panel plugins for session of type  "Octave"
dir:  "/usr/lib/x86_64-linux-gnu/qt5/plugins/cantor/panels"
plugin  "Ajuda"  is supported, requires extensions  ("")
plugin  "Gestor de variables"  is supported, requires extensions  ("VariableManagementExtension")
dir:  "/usr/bin/cantor/panels"
Entry Appended
adding panel for  "Ajuda"
adding panel for  "Gestor de variables"
ShortcutOverride 16777220 QFlags<Qt::KeyboardModifier>(ShiftModifier)
login
starting  ("/var/lib/flatpak/exports/bin/org.octave.Octave", "--silent", "--interactive", "--persist", "--eval", "PS1('CANTOR_OCTAVE_BACKEND_PROMPT:\\#> ');", "--eval", "PS2('CANTOR_OCTAVE_BACKEND_SUBPROMPT:\\#> ');", "--eval", "addpath /usr/share/cantor/octavebackend/;", "--eval", "printf('%s\\n', ['____TMP_DIR____ = ' tempdir]);", "--eval", "suppress_verbose_help_message(1);", "--eval", "set (0, \"defaultfigurevisible\",\"off\");", "--eval", "graphics_toolkit gnuplot;")
login input:  "____TMP_DIR____ = /tmp/\n"
Got temporary file dir: "/tmp/"
wsStatusChange 1
login done
evaluating:  "plot(1:100)"
evaluate
Executing a plot command
wsStatusChange 0
currentExpressionStatusChanged
readOutput
start parsing     "CANTOR_OCTAVE_BACKEND_PROMPT:1> "
readError
currentExpressionStatusChanged
evaluating:  "printf('__cantor_delimiter_line__\\n');__cantor_list__ = who();__cantor_parse_values__ = true;for __cantor_index__ = 1:length(__cantor_list__)  __cantor_varname__ = char(__cantor_list__{__cantor_index__});  printf([__cantor_varname__ '\\n']);  if (__cantor_parse_values__)    try      eval(['__cantor_string__ = disp(' __cantor_varname__ ');']);      printf(__cantor_string__);    catch      printf(['<unprintable value>' '\\n']);    end_try_catch;  endif;  printf('__cantor_delimiter_line__\\n')endfor;clear __cantor_list__;clear __cantor_index__;clear __cantor_varname__;clear __cantor_parse_values__;clear __cantor_string__;"
evaluate
wsStatusChange 0
currentExpressionStatusChanged
readError
currentExpressionStatusChanged
wsStatusChange 1
Octave code for parsing variables finish with error message:  "warning: your version of GraphicsMagick limits images to 8 bits per pixel\n"
readError
readOutput
start parsing     "CANTOR_OCTAVE_BACKEND_PROMPT:2> "
readOutput
start parsing     "__cantor_delimiter_line__\n"
readOutput
start parsing     "CANTOR_OCTAVE_BACKEND_PROMPT:3> "
ShortcutOverride 16777220 QFlags<Qt::KeyboardModifier>(ShiftModifier)
evaluating:  "plot(1:100)"
evaluate
Executing a plot command
wsStatusChange 0
currentExpressionStatusChanged
readOutput
start parsing     "CANTOR_OCTAVE_BACKEND_PROMPT:4> "
parseOutput:  ""
parsePlotFile
OctaveExpression::parsePlotFile:  "/tmp/c-ob-qcGjuu.eps"
setting result to a type  5  result
update Entry
rendering eps file:  QUrl("file:///tmp/c-ob-qcGjuu.eps")
scale:  1.8
dimension:  864 x 604.8
currentExpressionStatusChanged
Entry Appended
ShortcutOverride 16777220 QFlags<Qt::KeyboardModifier>(ShiftModifier)
evaluating:  "x = 2"
evaluate
wsStatusChange 0
currentExpressionStatusChanged
readOutput
start parsing     "x =  2\n"
readOutput
start parsing     "CANTOR_OCTAVE_BACKEND_PROMPT:5> "
parseOutput:  "x =  2\n"
setting result to a type  1  result
update Entry
currentExpressionStatusChanged
Entry Appended
Comment 14 avlas 2019-04-22 18:46:19 UTC
> Maybe as a text file.

Sorry, we crossed emails
Comment 15 avlas 2019-04-22 18:59:09 UTC
I think this issue may be related to the other one I mentioned about warnings.

Could you please try the following?

create a function which filename is called f_test.m with the following content:

function x = test(y)
  x = y.^2;
end

now open cantor and do:

y = f_test(3)

this should trigger a warning because the name of the function does not match the name of the file

in my case no more than the warning is displayed, and I need to press shift-enter again to see the output in the terminal:

y = 9

but nothing appears in the workspace panel

if I'm not wrong warnings (and perhaps other signals too) trigger this behavior

because of a flatpak issue, I got a warning from plotting (this is being fixed while we are talking), but the point here is that warnings trigger this weird behavior, at least in my system.

could you please try to reproduce?
then
Comment 16 Nikita Sirgienko 2019-04-22 19:10:54 UTC
Hi avlas, Octave writes error messages and warnings into stderr. In Cantor we don't distinguish between warnings and errors. And, if a expression finished with error, Cantor show only error and don't show output of failed command.
Comment 17 avlas 2019-04-22 19:14:17 UTC
(In reply to Nikita Sirgienko from comment #16)
> Hi avlas, Octave writes error messages and warnings into stderr. In Cantor
> we don't distinguish between warnings and errors. And, if a expression
> finished with error, Cantor show only error and don't show output of failed
> command.

That sounds good. But the output should still appear for warnings in addition to the warning message, right? 

For whatever reason this doesn't seem to be the case in my system. 

Did you have a chance to try the f_test I mentioned?
Comment 18 Nikita Sirgienko 2019-04-22 19:19:38 UTC
About plot and variable model: Octave (and it isn't correct behaviour) could print warning with some delay after printing prompt. So, according your log, Cantor get warning message, when he finished with "plot" command (and waits for plot file) and computing an internal command for updating variable panel. So, Cantor thinks, that the internal command failed and don't updates the panel.
Comment 19 Nikita Sirgienko 2019-04-22 19:31:44 UTC
Created attachment 119570 [details]
f_test function usage
Comment 20 Nikita Sirgienko 2019-04-22 19:36:43 UTC
(In reply to avlas from comment #17)
> (In reply to Nikita Sirgienko from comment #16)
> > Hi avlas, Octave writes error messages and warnings into stderr. In Cantor
> > we don't distinguish between warnings and errors. And, if a expression
> > finished with error, Cantor show only error and don't show output of failed
> > command.
> 
> That sounds good. But the output should still appear for warnings in
> addition to the warning message, right? 

No, I mean, in this moment, Cantor don't show output for warnings (yes, it's not very compfort for user). See https://bugs.kde.org/show_bug.cgi?id=406777 for my advanced explanetion.

> For whatever reason this doesn't seem to be the case in my system. 
> 
> Did you have a chance to try the f_test I mentioned?
Yes, you can see a result of this in attachments.
Comment 21 avlas 2019-04-22 19:52:48 UTC
(In reply to Nikita Sirgienko from comment #20)
> (In reply to avlas from comment #17)
> > (In reply to Nikita Sirgienko from comment #16)
> > > Hi avlas, Octave writes error messages and warnings into stderr. In Cantor
> > > we don't distinguish between warnings and errors. And, if a expression
> > > finished with error, Cantor show only error and don't show output of failed
> > > command.
> > 
> > That sounds good. But the output should still appear for warnings in
> > addition to the warning message, right? 
> 
> No, I mean, in this moment, Cantor don't show output for warnings (yes, it's
> not very compfort for user). See https://bugs.kde.org/show_bug.cgi?id=406777
> for my advanced explanetion.
> 
> > For whatever reason this doesn't seem to be the case in my system. 
> > 
> > Did you have a chance to try the f_test I mentioned?
> Yes, you can see a result of this in attachments.

Thank you for testing and for the explanation.

Unfortunately it is not very obvious to reproduce :/

One last way I can imagine to try to reproduce my issue is the following:

- Move the functions of the backend to a different location in the filesystem and add the new location to octave's path (in .octaverc).

This is basically what I need to do given that Octave's flatpak cannot reach  system's location: "warning: addpath: /usr/share/cantor/octavebackend/: The file or directory does not exist"

I even tried moving it to the home share folder $HOME/.local/share/cantor/octavebackend/ but this didn't work either.

Perhaps one thing that might help would be checking if backend functions are in octave's path, instead of just looking for them in the expected filesystem location.
Comment 22 Nikita Sirgienko 2019-04-22 20:10:05 UTC
(In reply to avlas from comment #21)
> (В ответ на Никиту Сиргиенко из комментария № 20 )
>  > (В ответ на Авлас из комментария № 17 ) 
> >> (В ответ на Никиту Сиргиенко из комментария № 16 ) 
> >>> Привет, Авлас, Octave записывает сообщения об ошибках и предупреждения в stderr. В Канторе 
> >>> мы не различаем предупреждения и ошибки. И, если выражение 
> >>> завершилось с ошибкой, Кантор показывает только ошибку и не показывает вывод команды «>>> 
> . 
> >> 
> >> Это звучит хорошо. Но вывод все равно должен появляться для предупреждений в 
> >> дополнении к предупреждающему сообщению, верно? 
> >> 
> Нет, я имею в виду, в этот момент Кантор не
> > Не очень комфортно для пользователя). См. Https://bugs.kde.org/show_bug.cgi?id=406777 
> > мое расширенное объяснение. 
> >>> 
> По какой-то причине в моей системе это не так. 
> >> 
> >> Возможно , у вас есть шанс попробовать f_test я говорил? 
> > Да, вы можете увидеть результат этого во вложениях. 
> 
> Спасибо за тестирование и за объяснение. 
> 
> К сожалению, это не очень очевидно для воспроизведения: / 
> 
> Один из последних способов воспроизвести мою проблему заключается в
> следующем: 
> 
> - Переместите функции бэкэнда в другое место в файловой системе и добавьте
> новое местоположение в путь октавы (в .octaverc).
> 
> Это в основном то, что мне нужно сделать, учитывая, что flatpak Octave не
> может добраться до местоположения системы: «предупреждение: addpath: / usr /
> share / cantor / octavebackend /: файл или каталог не существует» 
It's strange, actually. Cantor searchs directory "octavebackend" in "~/.local/share/cantor", "/usr/local/share/cantor", "/usr/share/cantor". So, this is strange, that the directory was found, but don't exist.
But, it is current behaviour. I am not familiar with flatpak, it's used kde apllication releases (19.04 in this moment), or current code in repository?
 
> Я даже попытался переместить его в папку домашнего ресурса $ HOME / .local /
> share / cantor / octavebackend /, но это тоже не сработало. 
> 
> Возможно, одна вещь, которая могла бы помочь, это проверить, находятся ли
> бэкэнд-функции в пути октавы, вместо того, чтобы просто искать их в
> ожидаемом местоположении файловой системы.
Comment 23 avlas 2019-04-22 20:41:23 UTC
Created attachment 119572 [details]
Cantor crash

Sometimes Cantor crashes while doing these tests. This is a backtrace of one of them.
Comment 24 Nikita Sirgienko 2019-04-22 20:49:26 UTC
(In reply to avlas from comment #23)
> Created attachment 119572 [details]
> Cantor crash
> 
> Sometimes Cantor crashes while doing these tests. This is a backtrace of one
> of them.

Thanks, this is helps (Some precondition failed and Cantor crashes), but I still don't understand, why they precondition failed.
Comment 25 avlas 2019-04-22 21:45:19 UTC
(In reply to Nikita Sirgienko from comment #24)
> (In reply to avlas from comment #23)
> > Created attachment 119572 [details]
> > Cantor crash
> > 
> > Sometimes Cantor crashes while doing these tests. This is a backtrace of one
> > of them.
> 
> Thanks, this is helps (Some precondition failed and Cantor crashes), but I
> still don't understand, why they precondition failed.


Mmm, maybe the flatpak container does not have access to ~/.local/share/cantor either :/
Comment 26 avlas 2019-04-22 21:55:44 UTC
(In reply to avlas from comment #25)
> (In reply to Nikita Sirgienko from comment #24)
> > (In reply to avlas from comment #23)
> > > Created attachment 119572 [details]
> > > Cantor crash
> > > 
> > > Sometimes Cantor crashes while doing these tests. This is a backtrace of one
> > > of them.
> > 
> > Thanks, this is helps (Some precondition failed and Cantor crashes), but I
> > still don't understand, why they precondition failed.
> 
> 
> Mmm, maybe the flatpak container does not have access to
> ~/.local/share/cantor either :/

Well it does (but only when I put it in .octaverc):

evaluate
wsStatusChange 0
currentExpressionStatusChanged
readOutput
start parsing     "'cantor_print' is a function from the file /home/jsardid/.local/share/cantor/octavebackend/cantor_print.m\n"
readOutput
start parsing     "CANTOR_OCTAVE_BACKEND_PROMPT:2> "
parseOutput:  "'cantor_print' is a function from the file /home/jsardid/.local/share/cantor/octavebackend/cantor_print.m\n"
setting result to a type  1  result
currentExpressionStatusChanged
wsStatusChange 1
readOutput
start parsing     "__cantor_delimiter_line__\n"
readOutput
start parsing     "ans\n"
readOutput
start parsing     "0\n"
start parsing     "__cantor_delimiter_line__\n"
readOutput
start parsing     "CANTOR_OCTAVE_BACKEND_PROMPT:3> "
Comment 27 avlas 2019-04-22 21:57:16 UTC
(In reply to Nikita Sirgienko from comment #24)
> (In reply to avlas from comment #23)
> > Created attachment 119572 [details]
> > Cantor crash
> > 
> > Sometimes Cantor crashes while doing these tests. This is a backtrace of one
> > of them.
> 
> Thanks, this is helps (Some precondition failed and Cantor crashes), but I
> still don't understand, why they precondition failed.

Are you 100% sure cantor looks in ~/.local/share/cantor location? I only see it checking in /usr/share/cantor:

starting  ("/var/lib/flatpak/exports/bin/org.octave.Octave", "--silent", "--interactive", "--persist", "--eval", "PS1('CANTOR_OCTAVE_BACKEND_PROMPT:\\#> ');", "--eval", "PS2('CANTOR_OCTAVE_BACKEND_SUBPROMPT:\\#> ');", "--eval", "addpath /usr/share/cantor/octavebackend/;", "--eval", "printf('%s\\n', ['____TMP_DIR____ = ' tempdir]);", "--eval", "suppress_verbose_help_message(1);", "--eval", "set (0, \"defaultfigurevisible\",\"off\");", "--eval", "graphics_toolkit gnuplot;")
login input:  "____TMP_DIR____ = /tmp/\n"
Comment 28 Nikita Sirgienko 2019-04-22 22:07:08 UTC
(In reply to avlas from comment #27)
> (In reply to Nikita Sirgienko from comment #24)
> > (In reply to avlas from comment #23)
> > > Created attachment 119572 [details]
> > > Cantor crash
> > > 
> > > Sometimes Cantor crashes while doing these tests. This is a backtrace of one
> > > of them.
> > 
> > Thanks, this is helps (Some precondition failed and Cantor crashes), but I
> > still don't understand, why they precondition failed.
> 
> Are you 100% sure cantor looks in ~/.local/share/cantor location? I only see
> it checking in /usr/share/cantor:
> 
> starting  ("/var/lib/flatpak/exports/bin/org.octave.Octave", "--silent",
> "--interactive", "--persist", "--eval",
> "PS1('CANTOR_OCTAVE_BACKEND_PROMPT:\\#> ');", "--eval",
> "PS2('CANTOR_OCTAVE_BACKEND_SUBPROMPT:\\#> ');", "--eval", "addpath
> /usr/share/cantor/octavebackend/;", "--eval", "printf('%s\\n',
> ['____TMP_DIR____ = ' tempdir]);", "--eval",
> "suppress_verbose_help_message(1);", "--eval", "set (0,
> \"defaultfigurevisible\",\"off\");", "--eval", "graphics_toolkit gnuplot;")
> login input:  "____TMP_DIR____ = /tmp/\n"

Depends of Cantor version, 19.04 and current master branch does, but older versions use only /usr/share/cantor/octavebackend.
Also, directory, used in `addpath` statement, is a first 'octavebackend' directory found by Cantor in paths, that I mentioned.
There is 'About Cantor' in 'Help' menu. The version, mentioned there, is 19.04?
Comment 29 avlas 2019-04-22 22:10:24 UTC
Created attachment 119575 [details]
cantor version

Cantor version 19.04
Comment 30 avlas 2019-04-22 22:16:01 UTC
(In reply to avlas from comment #29)
> Created attachment 119575 [details]
> cantor version
> 
> Cantor version 19.04

Could you please test manually moving the files out of /usr/share/cantor/octavebackend/ and setting them in ~/local/share/cantor/octavebackend?

Perhaps the best/easiest of all would be to replicate what I have (installing octave from flatpak):

"flatpak install flathub org.octave.Octave"

and configure the executable to: /var/lib/flatpak/exports/bin/org.octave.Octave
Comment 31 Nikita Sirgienko 2019-04-22 22:47:20 UTC
(In reply to avlas from comment #30)
> (In reply to avlas from comment #29)
> > Created attachment 119575 [details]
> > cantor version
> > 
> > Cantor version 19.04
> 
> Could you please test manually moving the files out of
> /usr/share/cantor/octavebackend/ and setting them in
> ~/local/share/cantor/octavebackend?
> 
> Perhaps the best/easiest of all would be to replicate what I have
> (installing octave from flatpak):
> 
> "flatpak install flathub org.octave.Octave"
> 
> and configure the executable to:
> /var/lib/flatpak/exports/bin/org.octave.Octave

Yes, you right, I was mistaken. 19.04 has fix for file location, but unlike of master branch, the patch haven't code for octave, my fault.
I will add fix for this tommorow, and it will be in 19.04.1
Comment 32 avlas 2019-04-23 00:08:14 UTC
Excellent, thank you very much!
Comment 33 Nikita Sirgienko 2019-04-23 12:04:56 UTC
Git commit 4b78512e9a83f67984583b4e393963c77b026e98 by Nikita Sirgienko.
Committed on 23/04/2019 at 12:01.
Pushed by sirgienko into branch 'Applications/19.04'.

[Octave] Some fixes:
  - add paths for all found octave script directory to Octave
  - improve parsing logic, for preventing loosing some output from octave (from printf)
FIXED-IN: 19.04.1

M  +21   -3    src/backends/octave/octavesession.cpp
M  +10   -0    src/lib/session.cpp
M  +1    -0    src/lib/session.h

https://commits.kde.org/cantor/4b78512e9a83f67984583b4e393963c77b026e98
Comment 34 Nikita Sirgienko 2019-04-23 12:10:36 UTC
Actually, we will have some warnings from flakpak Octave about non-existings paths, because Cantor searchs 'octavebackend' in host filesystem (for example, /usr/local/share/cantor) and in this filesystem the directory exists, but in container filesystem this is not true.
Comment 35 avlas 2019-04-23 13:47:40 UTC
(In reply to Nikita Sirgienko from comment #34)
> Actually, we will have some warnings from flakpak Octave about non-existings
> paths, because Cantor searchs 'octavebackend' in host filesystem (for
> example, /usr/local/share/cantor) and in this filesystem the directory
> exists, but in container filesystem this is not true.

That's right. 

There could be ways to workaround this, but I would suggest to wait and see if https://bugs.kde.org/show_bug.cgi?id=406777 fixes the issue, so warnings are not harmful anymore.