Bug 388646 - LabPlot sometimes doesn't plot functions, plots flat line instead
Summary: LabPlot sometimes doesn't plot functions, plots flat line instead
Status: RESOLVED FIXED
Alias: None
Product: LabPlot2
Classification: Applications
Component: general (show other bugs)
Version: 2.4.0
Platform: Arch Linux Linux
: NOR grave
Target Milestone: ---
Assignee: Alexander Semke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-07 11:30 UTC by Łukasz Konieczny
Modified: 2018-01-13 10:48 UTC (History)
2 users (show)

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


Attachments
LabPlot output (3.43 KB, application/x-labplot2)
2018-01-07 11:31 UTC, Łukasz Konieczny
Details
gdb output (1.51 KB, text/plain)
2018-01-07 18:00 UTC, Łukasz Konieczny
Details
backtrace (2.30 KB, text/plain)
2018-01-07 18:23 UTC, Łukasz Konieczny
Details
grep output (1.11 KB, text/plain)
2018-01-11 22:47 UTC, Łukasz Konieczny
Details
Example of file which causes crash (4.91 KB, application/x-labplot2)
2018-01-12 13:53 UTC, Łukasz Konieczny
Details
Output of gdb while opening a file (5.53 KB, text/plain)
2018-01-12 19:56 UTC, Łukasz Konieczny
Details
output of gdb while opening a file 2 (6.15 KB, text/plain)
2018-01-12 20:30 UTC, Łukasz Konieczny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Łukasz Konieczny 2018-01-07 11:30:09 UTC
This behaviour of LabPlot can be seen in the attached lml file.
Comment 1 Łukasz Konieczny 2018-01-07 11:31:10 UTC
Created attachment 109723 [details]
LabPlot output
Comment 2 Alexander Semke 2018-01-07 13:22:04 UTC
we had couple of fixes in this area done for the 2.5 version of LabPlot. I just checked you file with the current code and everything looks ok. We didn't resease 2.5 yet, will be done soon. Would it be feasible for you to compile the current code and try again?
Comment 3 Alexander Semke 2018-01-07 13:41:56 UTC
P.S.: your second curve results in huge values for y (-10^66, 10^67). It's better maybe to rescale you variable via x -> x/14.1615840479. After the rescaling the interesting part of the curve is in the region x \in (2, 3).
Comment 4 Łukasz Konieczny 2018-01-07 16:01:26 UTC
(In reply to Alexander Semke from comment #2)
> we had couple of fixes in this area done for the 2.5 version of LabPlot. I
> just checked you file with the current code and everything looks ok. We
> didn't resease 2.5 yet, will be done soon. Would it be feasible for you to
> compile the current code and try again?

Yes, I will try to compile and give feedback.
Comment 5 Łukasz Konieczny 2018-01-07 16:49:21 UTC
LabPlot compiles, but I have segmentation fault, when I execute the program.
Comment 6 Alexander Semke 2018-01-07 17:19:54 UTC
(In reply to Łukasz from comment #5)
> LabPlot compiles, but I have segmentation fault, when I execute the program.

did you do 'make install'?
Comment 7 Łukasz Konieczny 2018-01-07 17:24:05 UTC
(In reply to Alexander Semke from comment #6)
> (In reply to Łukasz from comment #5)
> > LabPlot compiles, but I have segmentation fault, when I execute the program.
> 
> did you do 'make install'?

Yes, I have successfully installed the program and segfault occured, when I ran it.
Comment 8 Łukasz Konieczny 2018-01-07 17:25:01 UTC
I have installed in /usr/local/
Comment 9 Alexander Semke 2018-01-07 17:42:57 UTC
(In reply to Łukasz from comment #7)
> 
> Yes, I have successfully installed the program and segfault occured, when I
> ran it.

do you have any debug output?
Comment 10 Łukasz Konieczny 2018-01-07 18:00:18 UTC
Created attachment 109727 [details]
gdb output

Yes, I have compiled with DebugFull build type and run in gdb. Results in attachment.
Comment 11 Alexander Semke 2018-01-07 18:22:08 UTC
(In reply to Łukasz from comment #10)
> Created attachment 109727 [details]
> gdb output
> 
> Yes, I have compiled with DebugFull build type and run in gdb. Results in
> attachment.

Once you're in gdb and observe the crash, can you please send the output of bt to get the full backtrace?
Comment 12 Łukasz Konieczny 2018-01-07 18:23:11 UTC
Created attachment 109728 [details]
backtrace

I have used backtrace command, more output in attached file.
Comment 13 Alexander Semke 2018-01-07 18:41:37 UTC
(In reply to Łukasz from comment #12)
> Created attachment 109728 [details]
> backtrace
> 
> I have used backtrace command, more output in attached file.

Thank you a lot for the help to nail down the problem!

Can you install the debug symbols for Qt and attache the backtrace once more?

What is location of labplot2.rc file on your computer?
Comment 14 Łukasz Konieczny 2018-01-07 19:15:20 UTC
(In reply to Alexander Semke from comment #13)
> (In reply to Łukasz from comment #12)
> > Created attachment 109728 [details]
> > backtrace
> > 
> > I have used backtrace command, more output in attached file.
> 
> Thank you a lot for the help to nail down the problem!
> 
> Can you install the debug symbols for Qt and attache the backtrace once more?

I have tried, but can't do that. In Arch GNU/Linux we don't have debugging symbols in packages. I have tried this repo: https://wiki.archlinux.org/index.php/Unofficial_user_repositories#qt-debug , but there are problems with PGP keys. I can't go further, I'm sorry. Alternatively I would have to recompile many Qt packages, and I'm not sufficiently skilled to do that.

> What is location of labplot2.rc file on your computer?

I don't have such file, only these files with .rc extensions:
/usr/local/share/kxmlgui5/labplot2/labplot2ui.rc
/usr/local/share/labplot2/labplot2ui.rc
(I have looked for them in install manifest.)

I'm sorry for problems I generate.
Comment 15 Alexander Semke 2018-01-07 19:41:22 UTC
(In reply to Łukasz from comment #14)
> > What is location of labplot2.rc file on your computer?
> 
> I don't have such file, only these files with .rc extensions:
> /usr/local/share/kxmlgui5/labplot2/labplot2ui.rc
> /usr/local/share/labplot2/labplot2ui.rc
> (I have looked for them in install manifest.)
Yes, I meant this file.

> 
> I'm sorry for problems I generate.
No problem. Thank you. We'll try to reproduce this problem on Arch Linux on our side.
Comment 16 Christoph Feck 2018-01-08 02:52:52 UTC
If you are installing into a separate directory, please make sure it is known in the various search paths that libraries expect. I am not sure if the list is up-to-date, but https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source should have the variables documented, see section "Set up the runtime environment".
Comment 17 Stefan Gerlach 2018-01-08 22:15:15 UTC
I installed the current code on Arch Linux using the "compile" script and "make install". This installs into /usr and everything works as expected, i.e. i can't reproduce the crash.
Can you try to install into /usr?
Comment 18 Łukasz Konieczny 2018-01-11 11:39:29 UTC
Now LabPlot runs, but complains that it can't find labplot2ui.rc file. Thay happens regardless whether I install in /usr/ or in /usr/local/ .
Comment 19 Alexander Semke 2018-01-11 21:37:08 UTC
(In reply to Łukasz from comment #18)
> Now LabPlot runs, but complains that it can't find labplot2ui.rc file. Thay
> happens regardless whether I install in /usr/ or in /usr/local/ .

Can you please pull the current code once more and try again? If you still have the problem, please do 'strace -o log.txt labplot2' and paste the output of 'grep labplot2ui.rc log.txt' here.
Comment 20 Łukasz Konieczny 2018-01-11 22:46:17 UTC
(In reply to Alexander Semke from comment #19)
> (In reply to Łukasz from comment #18)
> > Now LabPlot runs, but complains that it can't find labplot2ui.rc file. Thay
> > happens regardless whether I install in /usr/ or in /usr/local/ .
> 
> Can you please pull the current code once more and try again? If you still
> have the problem, please do 'strace -o log.txt labplot2' and paste the
> output of 'grep labplot2ui.rc log.txt' here.

Now it still complains, but at least main window appears. But when I try to open my lml file, it crashes.
Comment 21 Łukasz Konieczny 2018-01-11 22:47:02 UTC
Created attachment 109807 [details]
grep output

Output of grep labplot2ui.rc log.txt
Comment 22 Alexander Semke 2018-01-12 06:57:47 UTC
(In reply to Łukasz from comment #20)
> Now it still complains, but at least main window appears. But when I try to
> open my lml file, it crashes.

Ok. The rc-file is found now. The new crash is because of something in your lml-file causes some troubles for LabPlot. Can you please attach the project file?
Comment 23 Łukasz Konieczny 2018-01-12 13:53:34 UTC
Created attachment 109816 [details]
Example of file which causes crash
Comment 24 Alexander Semke 2018-01-12 15:45:31 UTC
(In reply to Łukasz from comment #23)
> Created attachment 109816 [details]
> Example of file which causes crash
I cannot reproduce the crash. You files loads correctly. Can you please attach the crash dump?
Comment 25 Łukasz Konieczny 2018-01-12 19:56:23 UTC
Created attachment 109823 [details]
Output of gdb while opening a file
Comment 26 Alexander Semke 2018-01-12 20:16:36 UTC
(In reply to Łukasz from comment #25)
> Created attachment 109823 [details]
> Output of gdb while opening a file
Thanks. It looks like you drag&drop your lml file onto the application. I pushed a small change now. Can you pull the code and try again. Does it still crash for you if you drop the file?
Comment 27 Łukasz Konieczny 2018-01-12 20:17:59 UTC
It crashed also when I opened a file using dialog window. But I will try once again.
Comment 28 Łukasz Konieczny 2018-01-12 20:29:57 UTC
Still complains about labplot2ui.rc in the beginning, then crashes when I open file, either using dialog window or by dragging and dropping.
Comment 29 Łukasz Konieczny 2018-01-12 20:30:21 UTC
Created attachment 109825 [details]
output of gdb while opening a file 2
Comment 30 Alexander Semke 2018-01-13 08:29:53 UTC
(In reply to Łukasz from comment #29)
> Created attachment 109825 [details]
> output of gdb while opening a file 2
The crash is because of the missing rc-file. Though I cannot reproduce it and according to the code it shouldn't crash actually in such a case, but it's definitely because of the missing rc-file. According to your grep_output file, the rc-file is successfully found. I'm a bit confused now to be hones. So, we need to go one step back...

Can you please do a 'make uninstall' and make sure you don't have any rc-files left anyware. Check your folders /home/panlukasz/.local/share/kxmlgui5/labplot2 and /usr/local/share/kxmlgui5/labplot2/. After this do a 'make install' and start labplot again. If a warning comes again, please collect the the output of strace and grep and you did before.
Comment 31 Łukasz Konieczny 2018-01-13 10:40:42 UTC
(In reply to Alexander Semke from comment #30)
> (In reply to Łukasz from comment #29)
> > Created attachment 109825 [details]
> > output of gdb while opening a file 2
> The crash is because of the missing rc-file. Though I cannot reproduce it
> and according to the code it shouldn't crash actually in such a case, but
> it's definitely because of the missing rc-file. According to your
> grep_output file, the rc-file is successfully found. I'm a bit confused now
> to be hones. So, we need to go one step back...
> 
> Can you please do a 'make uninstall' and make sure you don't have any
> rc-files left anyware. Check your folders
> /home/panlukasz/.local/share/kxmlgui5/labplot2 and
> /usr/local/share/kxmlgui5/labplot2/. After this do a 'make install' and
> start labplot again. If a warning comes again, please collect the the output
> of strace and grep and you did before.

Success!!!

I removed file ~/.local/share/kxmlgui5/labplot2/labplot2ui.rc , then I have started LabPlot and it runs properly and opens file. And it draws my functions properly!
Comment 32 Alexander Semke 2018-01-13 10:48:02 UTC
(In reply to Łukasz from comment #31)
> I removed file ~/.local/share/kxmlgui5/labplot2/labplot2ui.rc , then I have
> started LabPlot and it runs properly and opens file. And it draws my
> functions properly!
great :-)

It looks like you're studying different interpolation functions for your data. In LabPlot we also have a lot of functionality for fitting and interpolating the data with several methods. Maybe this is also something that you're interested in.

I'll close this ticket now with "FIXED" since the original problem is solved in the 2.5 version. Don't hesitate to report any new bugs you encounter. In case you have some questions related to the usage of the application itself you can also ask on the kde-edu mailing list.