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

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

[Octave-bug-tracker] [bug #55980] Octave, after load .mat file and using


From: Nikita
Subject: [Octave-bug-tracker] [bug #55980] Octave, after load .mat file and using specific command, stop work and starts allocate all available memory
Date: Fri, 22 Mar 2019 17:22:15 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0

URL:
  <https://savannah.gnu.org/bugs/?55980>

                 Summary: Octave, after load .mat file and using specific
command, stop work and starts allocate all available memory
                 Project: GNU Octave
            Submitted by: sirgienko
            Submitted on: Пт. 22 марта 2019 21:22:13
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Segfault, Bus Error, etc.
                  Status: None
             Assigned to: None
         Originator Name: Nikita
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.2
        Operating System: GNU/Linux

    _______________________________________________________

Details:

Hi, I am one of developer of Cantor program - frontend for some mathematical
languages. In Cantor, we supports backend for Octave language. We provides
some functions, like syntax highlighting, auto completion, etc. Also, we
provides variable menagement.

For parsing variables names and values we use this octave code:
````
printf('__cantor_delimiter_line__\n');
__cantor_list__ = who();
__cantor_parse_values__ = true;
for __cantor_index__ = 1:length(__cantor_list__)
  __cantor_varname__ = char(__cantor_list__{__cantor_index__});
  printf([__cantor_varname__ '\n']);
  if (__cantor_parse_values__)
    try
      eval(['__cantor_string__ = disp(' __cantor_varname__ ');']);
      printf(__cantor_string__);
    catch
      printf(['<unprintable value>' '\n']);
    end_try_catch;
  endif;
  printf('__cantor_delimiter_line__\n')
endfor;
clear __cantor_list__;
clear __cantor_index__;
clear __cantor_varname__;
clear __cantor_parse_values__;
clear __cantor_string__;
````

This code works without problem most part of time.

But after loading this matlab file I have strange issue with this Cantor
parsing command: after each call of the command, Octave starts adding some
spaces on the left of output of disp() and display() commands. And this added
spaces stay forever. That worse, spaces accamulates.

Like this:
````
octave:7> a = 3
                                                            a =  3
octave:8> 
````

Much worse, when spaces count getting bigger terminal width, Octave stops to
response after executiong the cantor parsing command and starts allocate *all
your available memory*. I don't actually allows Octave allocate enough memory
to forcing system to using swap partrition, I am killing octave process before
this. But observable maximum of allocated memory in this situation is 10 GB,
so it's unnormal at all.

I have reproduced this problem not only  Cantor, but in octave-cli too.

Steps:
1) Load attached .mat file via load().
octave:1> load("~/sehrSchlecht.mat")
2) Run the cantor parsing command
octave:2> printf('__cantor_delimiter_line__\n');__cantor_list__ =
who();__cantor_parse_values__ = true;for __cantor_index__ =
1:length(__cantor_list__)  __cantor_varname__ =
char(__cantor_list__{__cantor_index__});  printf([__cantor_varname__ '\n']); 
if (__cantor_parse_values__)    try      eval(['__cantor_string__ = disp('
__cantor_varname__ ');']);      printf(__cantor_string__);    catch     
printf(['<unprintable value>' '\n']);    end_try_catch;  endif; 
printf('__cantor_delimiter_line__\n')endfor;clear __cantor_list__;clear
__cantor_index__;clear __cantor_varname__;clear __cantor_parse_values__;clear
__cantor_string__;
3) repeat step 2 again and again, until Octave stops to response and starts to
allocate all your memory

I also have communicated with another Octave user with Octave5 and the user
have reproduced this problem too.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Пт. 22 марта 2019 21:22:13  Name: sehrSchlecht.mat  Size: 2МиБ
  By: sirgienko

<http://savannah.gnu.org/bugs/download.php?file_id=46625>

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Сообщение отправлено по Savannah
  https://savannah.gnu.org/




reply via email to

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