bugGNU Octave - Bugs: bug #60675, the call debug_on_error(1)...

 
 

bug #60675: the call debug_on_error(1) generates a warning: implicit conversion from matrix to sq_string

Submitter:  PIERRE LABRECHE <pierre5018>
Submitted:  Wed 26 May 2021 01:29:46 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Need Info Assigned to:  None
Originator Name:  PIERRE LABRECHE Open/Closed:  * Open
Release:  * 6.2.0 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 29 May 2021 05:21:43 PM UTC, comment #19: 

Octave corrupted the command window with the error message, followed by characters input in a previous Octave session (or perhaps still in the clipboard).  Notice:"50 0.90 ]"

GNU Octave, version 6.2.0
Copyright (C) 2021 The Octave Project Developers.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-w64-mingw32".

Additional information about Octave is available at https://www.octave.org.

Please contribute if you find this software useful.
For more information, visit https://www.octave.org/get-involved.html

Read https://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

>> _init

>> warning: implicit conversion from matrix to sq_string50 0.90 ]" )










PIERRE LABRECHE <pierre5018>
Sat 29 May 2021 04:31:36 PM UTC, comment #18: 

in reply to commentaire #17 :

My region settings under Windows 10 is English (United States) for programs that do not accept Unicode. I did not check the box Beta "UTF-8" under regional settings, administration.

Going back to the infamous error message, I have observed many times that is is generated while I use the editor, not when user commands are running.

The  message was even inserted in the command buffer ( I switched from the command window to the text editor tab in order to copy  excerpts to the clipboard. When I returned to the command window tab, the warning message had beed inserted in the command in progress, i.e. with my input data that had not yet been sent to the interpreter ).


>> function_X( "text_stringwarning: implicit conversion from matrix to sq_string )


PIERRE LABRECHE <pierre5018>
Sat 29 May 2021 02:18:45 AM UTC, comment #17: 

I'm unable to duplicate the problem on Windows.

I also don't see the funny characters.  What is your language setting?  I think mine is set to UTF8.

I wouldn't expect debug_on_error(1) to cause Octave to enter the debugger on a warning message.  We have a separate setting for that, enabled by debug_on_warning(1).  Both seem to work for me with the simple tests I tried:


octave:1> debug_on_error (1)
octave:2> function f () g (), end
octave:3> function g () error ("foobar"), end
octave:4> f
error: foobar
error: called from
    g at line 1 column 15
    f at line 1 column 15
stopped in g at line 1 []
1: function g () error ("foobar"), end
debug> dbstack
stopped in:

  --> g at line 1 []
      f at line 1 []


and again for warnings:


octave:1> debug_on_warning (1)
octave:2> function f () g (), end
octave:3> function g () warning ("foobar"), end
octave:4> f
warning: foobar
warning: called from
    g at line 1 column 15
    f at line 1 column 15

stopped in g at line 1 []
1: function g () warning ("foobar"), end
debug> dbstack
stopped in:

  --> g at line 1 []
      f at line 1 []


I used Octave 6.2.0 for these tests.

John W. Eaton <jwe>
Group administrator
Fri 28 May 2021 10:56:13 PM UTC, comment #16: 

The debug_on_warning should have sent the interpreter in to debug mode when it issued the first warning about "implicit conversion".  Because it's not doing what it's supposed to I can't really figure out how to debug this further.

Best chance, I think, is for someone else on a Windows setup to be able to duplicate this bug to demonstrate that it is not somehow specific to your setup.

Rik <rik5>
Group administrator
Fri 28 May 2021 10:16:36 PM UTC, comment #15: 

Per comment #9:

Here is a complete log, including spurious foreign characters from the command line buffer.  I was editing source files while the message "warning: implicit conversion from matrix to sq_string" was written to the command window.  I noticed it later.

   샞ꝖGNU Octave, version 6.2.0
Copyright (C) 2021 The Octave Project Developers.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-w64-mingw32".

Additional information about Octave is available at https://www.octave.org.

Please contribute if you find this software useful.
For more information, visit https://www.octave.org/get-involved.html

Read https://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

>> debug_on_warning(1)
>> _init
error: '_init' undefined near line 1, column 1
>> clear all; close all;
>> folder_str = "C:/Users/pierr/Documents/Photo private/src" ;
>> addpath (folder_str)
>> cd      (folder_str)
>> pkg load image
>> debug_on_error (1) #
>> _init
>> strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-28 18:08
>> strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-28 18:08
>> dbstack
>> warning: implicit conversion from matrix to sq_string
dbstack
>> strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-28 18:10
>>



PIERRE LABRECHE <pierre5018>
Fri 28 May 2021 10:04:50 PM UTC, comment #14: 

Per comment #9, can you execute


debug_on_warning (1)


before you run your test code of


_init

strftime( "%Y-%m-%d %R", localtime( time() ) )

strftime( "%Y-%m-%d %R", localtime( time() ) )

dbstack





Rik <rik5>
Group administrator
Fri 28 May 2021 03:52:33 PM UTC, comment #13: 

Continuation of the problems, while I was imply editing files
+verbatim
GNU Octave, version 6.2.0
Copyright (C) 2021 The Octave Project Developers.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-w64-mingw32".

Additional information about Octave is available at https://www.octave.org.

Please contribute if you find this software useful.
For more information, visit https://www.octave.org/get-involved.html

Read https://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

>> _init


>> strftime( "%Y-%m-%d %R", localtime( time() ) )

ans = 2021-05-28 10:34

>> strftime( "%Y-%m-%d %R", localtime( time() ) )

ans = 2021-05-28 10:35

>> warning: implicit conversion from matrix to sq_string

warning: implicit conversion from matrix to sq_string
warning: implicit conversion from matrix to sq_string
strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-28 11:23

>> dbstack
>> warning: implicit conversion from matrix to sq_string

warning: implicit conversion from matrix to sq_string
strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-28 11:49

>>

-verbatim-

PIERRE LABRECHE <pierre5018>
Fri 28 May 2021 03:28:24 PM UTC, comment #12: 

In reply to comment #11

The code was stopped when the error appeared.
I was simply using the editor, after running the _init.m script

The complete session log is reproduced below:

뷰GNU Octave, version 6.2.0
Copyright (C) 2021 The Octave Project Developers.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-w64-mingw32".

Additional information about Octave is available at https://www.octave.org.

Please contribute if you find this software useful.
For more information, visit https://www.octave.org/get-involved.html

Read https://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

>> _init

>> strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-28 10:34
>> strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-28 10:35
>> warning: implicit conversion from matrix to sq_string
warning: implicit conversion from matrix to sq_string
warning: implicit conversion from matrix to sq_string
strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-28 11:23
>> dbstack
>>

dbstack reports nothing

PIERRE LABRECHE <pierre5018>
Thu 27 May 2021 03:59:12 PM UTC, comment #11: 

Where did the debugger stop in the code?

Rik <rik5>
Group administrator
Thu 27 May 2021 03:19:37 PM UTC, comment #10: 

This warning does not show up without the call to debud-on_error.

PIERRE LABRECHE <pierre5018>
Thu 27 May 2021 03:04:02 PM UTC, comment #9: 

Looking at the log, I'm not sure debug_on_error() has anything to do with this.  It doesn't appear that the Octave interpreter is issuing any errors, rather it is issuing warnings.

I would try


debug_on_warning (1)


and then running your script.  When you get the warning


warning: implicit conversion from matrix to sq_string


Octave should drop you in to the debugger.  At that point, you could do 'dbwhere' or 'dbstack' to find out what piece of code is generating the warning.

Rik <rik5>
Group administrator
Wed 26 May 2021 08:36:14 PM UTC, comment #8: 

Here is a complete session log

GNU Octave, version 6.2.0
Copyright (C) 2021 The Octave Project Developers.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-w64-mingw32".

Additional information about Octave is available at https://www.octave.org.

Please contribute if you find this software useful.
For more information, visit https://www.octave.org/get-involved.html

Read https://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

>> strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-26 16:28
>> _init
error: '_init' undefined near line 1, column 1
>> clear all; close all;
>> folder_str = "C:/Users/pierr/Documents/Photo private/src" ;
>> addpath (folder_str)
>> cd      (folder_str)
>> pkg load image
>> debug_on_error (1) #
>> strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-26 16:28
>> strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-26 16:29
>> strftime( "%Y-%m-%d %R %S", localtime( time() ) )
ans = 2021-05-26 16:31 37
>> _init
>> strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-26 16:32
>> strftime( "%Y-%m-%d %R %S", localtime( time() ) )
ans = 2021-05-26 16:32 06
>> warning: implicit conversion from matrix to sq_string
strftime( "%Y-%m-%d %R %S", localtime( time() ) )
ans = 2021-05-26 16:32 26
>>


The file _init.m contains:

clear all; close all;
folder_str = "C:/Users/pierr/Documents/Photo private/src" ;
addpath (folder_str)
cd      (folder_str)
pkg load image
debug_on_error (1) #


PIERRE LABRECHE <pierre5018>
Wed 26 May 2021 08:22:44 PM UTC, comment #7: 

The warning occured once more:

>> strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-26 15:59
>> strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-26 15:59
>> strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-26 16:00
>> strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-26 16:00
>> warning: implicit conversion from matrix to sq_string
strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-26 16:01
>> warning: implicit conversion from matrix to sq_string
strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-26 16:20
>>


PIERRE LABRECHE <pierre5018>
Wed 26 May 2021 08:04:10 PM UTC, comment #6: 

Here is a transcript from the command line interpreter:

>> strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-26 15:59
>> strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-26 15:59
>> strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-26 16:00
>> strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-26 16:00
>> warning: implicit conversion from matrix to sq_string
strftime( "%Y-%m-%d %R", localtime( time() ) )
ans = 2021-05-26 16:01


PIERRE LABRECHE <pierre5018>
Wed 26 May 2021 06:59:31 PM UTC, comment #5: 

commentaire #2 :

> In the Octave session where you see this warning, what does the following show?
>


> debug_on_error
> which debug_on_error


>



>> debug_on_error
ans = 1
>> which debug_on_error
'debug_on_error' is a built-in function from the file libinterp/corefcn/error.cc
>>


PIERRE LABRECHE <pierre5018>
Wed 26 May 2021 06:57:31 PM UTC, comment #4: 

After setting debug_on_error mode, I execute a function at the command line level.

The program executes and THE INTERPRETER prompts ">>". 

Some time later,  the following may be displayed:

>> warning: implicit conversion from matrix to sq_string



PIERRE LABRECHE <pierre5018>
Wed 26 May 2021 04:17:25 PM UTC, comment #3: 

I will try to gather more information. The warning is intermittent.

PIERRE LABRECHE <pierre5018>
Wed 26 May 2021 03:16:05 PM UTC, comment #2: 

In the Octave session where you see this warning, what does the following show?


debug_on_error
which debug_on_error


John W. Eaton <jwe>
Group administrator
Wed 26 May 2021 02:50:49 PM UTC, comment #1: 

No such warning is generated for me, although I am on a Linux platform.  This seems very odd and like it would have been discovered earlier.

Can someone else reading this report and working on Windows verify this issue?

Rik <rik5>
Group administrator
Wed 26 May 2021 01:29:46 PM UTC, original submission:  

the call debug_on_error(1) generates a warning: implicit conversion from matrix to sq_string

PIERRE LABRECHE <pierre5018>

 

(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: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by pierre5018
  • -email is unavailable- added by pierre5018 (Submitted the item)
  •  

    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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-05-27 rik5 StatusNone Need Info
    2021-05-26 rik5 CategoryNone Interpreter
    2021-05-26 pierre5018 Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code