Bug 420708 - Crash using ezsurf
Summary: Crash using ezsurf
Status: RESOLVED FIXED
Alias: None
Product: cantor
Classification: Applications
Component: octave-backend (show other bugs)
Version: 20.04
Platform: Manjaro Linux
: NOR crash
Target Milestone: ---
Assignee: Nikita Sirgienko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-28 16:32 UTC by heqromancer
Modified: 2020-05-11 20:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 20.07.70
Sentry Crash Report:


Attachments
Worked plot (186.40 KB, image/png)
2020-04-28 17:24 UTC, Nikita Sirgienko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description heqromancer 2020-04-28 16:32:57 UTC
SUMMARY
Cantor crashes when using ezsurf

STEPS TO REPRODUCE
1. Type in the following:
pkg load symbolic
syms x
syms y
syms function(x,y)
function(x,y)=sin(x)+y
ezsurf(function(x,y))
2. Press "Evaluate worksheet"


OBSERVED RESULT
Crash; in fact, it will just crash no matter the function to print out.

EXPECTED RESULT
I do not know what the expected result is.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 5.18.4
(available in About System)
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
Comment 1 Nikita Sirgienko 2020-04-28 16:43:23 UTC
Hi, could you please specify the Cantor version?
Comment 2 heqromancer 2020-04-28 16:45:32 UTC
(In reply to Nikita Sirgienko from comment #1)
> Hi, could you please specify the Cantor version?

Done. I'm sorry about missing that essential part!
Comment 3 Nikita Sirgienko 2020-04-28 16:53:18 UTC
Also, if I am not mistaken, your code just not workable. You declare symbolic function named 'function', but the word 'function' reserved by Octave, so, if you will run this in Octave, you will got something like that

````
>> syms function(x,y)
error: assignin: invalid assignment to keyword 'function'
error: called from
    syms at line 175 column 7
````


Could you will try this?
````
pkg load symbolic
syms x
syms y
syms f(x,y)
f(x,y)=sin(x)+y
ezsurf(f(x,y))
````
Comment 4 heqromancer 2020-04-28 17:01:45 UTC
(In reply to Nikita Sirgienko from comment #3)
> Also, if I am not mistaken, your code just not workable. You declare
> symbolic function named 'function', but the word 'function' reserved by
> Octave, so, if you will run this in Octave, you will got something like that
> 
> ````
> >> syms function(x,y)
> error: assignin: invalid assignment to keyword 'function'
> error: called from
>     syms at line 175 column 7
> ````
> 
> 
> Could you will try this?
> ````
> pkg load symbolic
> syms x
> syms y
> syms f(x,y)
> f(x,y)=sin(x)+y
> ezsurf(f(x,y))
> ````

I feel so dumb right now. I was translating word by word and I wrote "function". 

It also crashes the way you proposed.
Comment 5 Nikita Sirgienko 2020-04-28 17:10:24 UTC
Could you please go to Octave settings, disable checkbox 'Integrate Plots in Worksheet', start new octave worksheet and write this command?
Comment 6 Nikita Sirgienko 2020-04-28 17:24:32 UTC
Created attachment 127952 [details]
Worked plot
Comment 7 heqromancer 2020-04-28 17:45:38 UTC
(In reply to Nikita Sirgienko from comment #5)
> Could you please go to Octave settings, disable checkbox 'Integrate Plots in
> Worksheet', start new octave worksheet and write this command?

Indeed. It shows the expected output (the picture) for around two to three seconds; right after that, it crashes.

Tested it across another laptop with Manjaro KDE and the exact same versions of KDE, KDE Frameworks, Qt, and Cantor with the same result: it gets to work, then crashes after a handful of seconds.
Comment 8 Nikita Sirgienko 2020-04-28 17:51:54 UTC
I see. Do you have crash report from Cantor or something like that? Also, do you have installed Cantor from Manjaro repos or built manually from source?
Comment 9 heqromancer 2020-04-28 17:54:34 UTC
(In reply to Nikita Sirgienko from comment #8)
> I see. Do you have crash report from Cantor or something like that? Also, do
> you have installed Cantor from Manjaro repos or built manually from source?

Unfortunately, if there is I have yet to find out how to get it. If I should be expecting some kind of output after the crash, then there is none; it feels just like clicking the exit button. 

I installed Cantor from the manjaro repository.
Comment 10 Nikita Sirgienko 2020-04-28 18:19:27 UTC
Well, I think, I known the problem. Looks like one of library (image library), used by Cantor, named 'LibSpectre', broken. So, when Cantor try to use this library, the library just have crashed and this is crashes Cantor too. This problem have already discovered on openSuse, but now we know, that Manjaro is damaged by this bug too.
In this situation, I usually have recommends to disable integrated plots (them will just appears in separate window instead of Cantor window), but because of another bug in 20.04 (already fixed, but the fix will appear only in 20.04.1 (after May 11, according KDE scheldure, but I haven't known a lot of about Manjaro packages sheldure)), this strategy won't work in the Octave backend until 20.04.1
I also have plan to add some settings for the Octave backend (allow force use a png format for plots, which less functional, but don't use libspectre) , which will also allow to avoid libspectre problem, but this also will be available only after 20.04.1
Comment 11 Nikita Sirgienko 2020-05-11 20:26:47 UTC
After 20.08 version appears possibility to change used format of plot files  So, for solving your problem, you just should change the value (in Octave settings) from 'eps' to 'png' and I think, the problem will be gone. Reopen this bug, if it is not true.