Menu

#269 QList::insert(): Index out of range.

None
closed
nobody
None
5
2024-09-26
2021-06-10
saucy
No

Hi , I'm getting QList errors when using gnuplot on Fedora 34. One for each plot line each time it is plotted or refreshed.

~~~

12.04.21 61.1
13.04.21 60.7
14.04.21 60.4
15.04.21 60.3

16.04.21 #?

17.04.21 59.1
18.04.21 59.1
19.04.21 59.1
21.04.21 59.1
22.04.21 59.1
22.04.21 59.1
23.04.21 58.5
24.04.21 58.3
25.04.21 58.1
26.04.21 58.4
27.04.21 58.5
28.04.21 58.5
29.04.21 58.3 #[new batteries; 59.4]

30.04.21 59.3
01.05.21 58.7
02.05.21 59.4
03.05.21 58.6
04.05.21 58.6
05.05.21 58.3
06.05.21 58.3
07.05.21 58.3
08.05.21 58.1
09.05.21 57.9
10.05.21 58.6
11.05.21 57.9 #error corr 59.7
12.05.21 58.6
13.05.21 58.4
14.05.21 58.3
15.05.21 58.3
16.05.21 57.8
17.05.21 58.2
18.05.21 58.2
19.05.21 57.5
20.05.21 58.1
21.05.21 58.1
22.05.21 57.5
23.05.21 57.8
24.05.21 57.8
25.05.21 57.3
26.05.21 57.3
27.05.21 57.5
28.05.21 57.7
29.05.21 57.7
30.05.21 57.7
31.05.21 57.7
01.06.21 57.7
02.06.21 57.5
03.06.21 57.5
04.06.21 57.5
05.06.21 57.0
06.06.21 57.4
07.06.21 57.0
08.06.21 57.0
09.06.21 57.0
10.06.21 57.0


set xdata time
formatstr="%d.%m.%y"

set timefmt formatstr


gnuplot> plot datafile u 1:2 w l linecol rgb "gray" tit "test"
gnuplot> QList::insert(): Index out of range.
~~~

Using multiplot commands, I get a QList error for each line of the graph. Interactively moving the plot or "rep" command all get the same errors on the gnuplot console.

Otherwise the output is as expected.

G N U P L O T
Version 5.2 patchlevel 8 last modified 2019-12-01

Discussion

  • Ethan Merritt

    Ethan Merritt - 2021-06-10

    I can't reproduce this with the single plot command you show followed by any number of "replot" s or mouse interaction. I'm not using Fedora, but that shouldn't affect the gnuplot code.

    What do you mean by "using multiplot commands"? Where does multiplot enter into this?

     
  • saucy

    saucy - 2021-06-10

    Thanks. I mentioned distro for clarity, maybe library versions. Fedora is generally ahead of other distros like Debian/Ubuntu derivatives. What are you testing on ?

    Multiple plot commands is NOT a key ingredient of the bug. It was supplementary info. I get single QList error on single plot. What I meant was:

    plot datafile  u 1:2  w l linecol rgb "gray" tit "plot 1"\
    , "" u 1:($2+1.) index 0 w l linecol rgb "blue" tit "plot 2"\
    , "" u 1:2 index 1 w l linecol rgb "blue" tit "plot 3" \
    

    I was hoping that would help pin down where this is happening. There may be many uses of QList in gnuplot-qt.

    My main qt pkg : qt-4.8.7-60 [CORRECTION 5.15.2]
    If you want more on that and it appears pertinent, I'll dig out other qt related pkgs.

    thx.

     

    Last edit: saucy 2021-06-10
    • Ethan Merritt

      Ethan Merritt - 2021-06-10

      Qt 4 is pretty old. Are you sure that's what you have? My distro (Mageia) is on 5.12 in the supported release and 5.15 in testing. I don't think I have a machine set up that's old enough to go back and debug a problem with Qt 4.

       
  • saucy

    saucy - 2021-06-10

    Sorry, it seems qt only refers to the old qt4 stuff ( both are installed in parallel on Fedora).
    I think this is the basic qt5 package, slightly ahead of yours:

    qt5-qtbase-5.15.2-15

    That is what I should have looked for.

    Just found this in the changelog:

    qt: avoid error messages from Qt 5.15

    ??
    Sounds like that could be the same thing, though that's just a guess.
    That may be why you are not reproducing this on your 5.12.

     

    Last edit: saucy 2021-06-10
    • Ethan Merritt

      Ethan Merritt - 2021-06-10

      No, my testing machine has Qt 5.15.2 so that's not it.

      OK, wait a minute.
      If I rebuild gnuplot 5.2.8 from source on the machine with Qt 5.15.2 then I see those same warning messages. I don't know why. The gnuplot 5.2.8 executable I have from back when it was the current version doesn't do this. So yeah, this is a quirk of building an older gnuplot against a newer Qt. I don't have a fix for that.

       
  • saucy

    saucy - 2021-06-10

    Ugh. Looks like an ABI change then. Thanks for reproducing. So Fedora are shipping a buggy build.

    This is messy and annoying but it's not a show stopper in terms of producing a graph.
    If I scroll or zoom a graph using the mouse it spams gnuplot console at every mouse wheel event ! Real annoying.

    Can you comment on that line from the changelog. Is that referring to fixing this bug?

     

    Last edit: saucy 2021-06-10
    • Ethan Merritt

      Ethan Merritt - 2021-06-10

      Yes. Here is the commit log entry:

      commit a0f2b0f820c9eb734029984887e7bab5fb0b9aea
      Author: Werner Fink wfink@users.sf.net
      Date: Sat Jun 20 10:02:40 2020 -0700

      qt: Suppress error messages "QList index out of range"
      
      In three places gnuplot_qt was appending an element to an existing
      list by insertiong using an index greater than the current list size.
      This works but starting with Qt 5.15 an error message is given.
      Replace with append() or insert(list_size, ...)
      Bug #2280
      
       
  • saucy

    saucy - 2021-06-11

    Thanks that will be useful for reference.

    I may have to wait for Fedora distro upgrade to 35 since they do not seem do much updating in between. If that's the case I may go back to a local build of gnuplot. There looks to be quite a lot new stuff in current release. Nice.

     
  • saucy

    saucy - 2021-08-05

    I can't find Bug #2280 in the bug list :?

    But why is this not using append() in all three cases, since it seems that was the intent when using the out of range index.

     
  • Ethan Merritt

    Ethan Merritt - 2024-09-26
    • status: open --> closed
    • Group: -->
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.