octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58004] [octave forge] (io) xmlread.m makes Oc


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #58004] [octave forge] (io) xmlread.m makes Octave crash
Date: Thu, 11 Jun 2020 15:29:51 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36

Follow-up Comment #17, bug #58004 (project octave):

I have tested a few more times with the following observations:

* Octave file I/O can reliably open and read the SVG file immediately after
the print function returns, while the xmlread function often results in a hang
or segmentation fault.
* If the file already exists on the filesystem, the xmlread function works
reliably without a hang or segmentation fault.
* Adding a small time delay between the print function and the xmlread
function seems to mitigate the problem.
* A much smaller / simpler SVG file in the same demo seems to also mitigate
the problem.

One suggestion would be to try relying on Octave file I/O functions to read
the contents of the file and pass the character buffer to Java XML routines
for parsing, instead of only passing a file name to Java.

For example, this set of commands reliably reads the contents of the SVG file
into Octave, while the following xmlread function causes the same crash:


sombrero;
print ('sombrero.svg');
str = fileread ('sombrero.svg');
dom = xmlread ('sombrero.svg');


That leads me to believe that this is not related to a problem with the disk
or the filesystem or incomplete files not being available, but rather is
particular to the Java file I/O system.

Regarding my fourth observation, printing an empty 'axes' instead of
'sombrero' to a SVG file seems to work reliably without a delay.

I am not testing on a SSD or a particularly fast system.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58004>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]