bugGNU Octave - Bugs: bug #59942, Warning about Jasper library after...

 
 

bug #59942: Warning about Jasper library after using graphics

Submitter:  None
Submitted:  Mon 25 Jan 2021 10:52:09 PM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 27 Jan 2021 02:38:39 AM UTC, comment #3: 

Closing as an upstream bug.

Rik <rik5>
Group administrator
Wed 27 Jan 2021 12:51:43 AM UTC, comment #2: 

I was doing a lot of drawing (polygons, subplots, etc). I was not processing external images. I find that the bug itself is intermittent, and does not show up every execution of the script. It showed up whenever I did a lot of image resizing. It is easier to not do that sequence of operations than to isolate the reason for the behavior.

I am running the current stable version of Manjaro (20.2.1 Nibia). The GraphicsMagick version is 1.3.36 and the ImageMagick version is 7.0.10.58.

Since this is an upstream issue, it's OK to close this bug report.

Anonymous
Tue 26 Jan 2021 12:06:03 AM UTC, comment #1: 

Octave, as you found, does not use Jasper directly.  One possibility is that this is coming through a dependence on GraphicsMagick.  Did the code you ran involve a lot of image processing?

This is going to be pretty difficult to debug, and is probably an upstream upstream bug rather than one in Octave.  If you could localize it in some way to some code that we might be able to test that would be helpful.

Downloading the source code, I find that there is only one place where this warning occurs.


/*
NOTE:
The version of the function jas_stream_memopen only exists for backwards
compatibility.
Eventually, it should be replaced by jas_stream_memopen2.
In retrospect, it was a very poor choice to have specified the buffer
size parameter (bufsize) to have type int.  On some machines, int may only
be a 16-bit integer.  This precludes larger-sized buffer allocations, which
are needed in practice.

If bufsize <= 0, the buffer is growable; otherwise, the buffer has a fixed
size of bufsize.
If buf is 0, the buffer is dynamically allocated with jas_malloc.
If buf is not 0 and bufsize <= 0 (which is not permitted in any
circumstances), bad things will happen (especially if the buf was not
allocated with jas_malloc).
*/
jas_stream_t *jas_stream_memopen(char *buf, int bufsize)
{
        char *new_buf;
        size_t new_bufsize;

        JAS_DBGLOG(100, ("jas_stream_memopen(%p, %d)\n", buf, bufsize));
        if (bufsize < 0) {
                jas_deprecated("negative buffer size for jas_stream_memopen");
        }


This definitely looks like some other library's problem, rather than Octave's, who is calling jas_stream_memopen rather than jas_stream_memopen2.

What operating system and version are you running?  Is it particularly old or new?

Rik <rik5>
Group administrator
Mon 25 Jan 2021 10:52:09 PM UTC, original submission:  

On exiting from Octave 7.0.0 after running a graphics-heavy script, the following message showed up.


octave:9> exit
WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!!
WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!!
WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!!
YOUR CODE IS RELYING ON DEPRECATED FUNCTIONALTIY IN THE JASPER LIBRARY.
THIS FUNCTIONALITY WILL BE REMOVED IN THE NEAR FUTURE.
PLEASE FIX THIS PROBLEM BEFORE YOUR CODE STOPS WORKING!
The specific problem is as follows:
negative buffer size for jas_stream_memopen


There was no reference to the Jasper library or jas_stream_memopen within the Octave codebase, only to an unrelated person named Jasper. A web search indicated it may be related to the Qt libraries used by Octave, so it is being reported as an early warning of external library changes.

The external source for the Jasper library is here according to a web search: https://github.com/jasper-software/jasper/commit/634ce8e8a5accc0fa05dd2c20d42b4749d4b2735

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-07-04 mmuetzel Dependencies- bugs #62701 is dependent
    2021-01-27 rik5 StatusNeed Info Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2021-01-26 rik5 StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code