[bug #68237] "load" emits long series of "classdef not found" warnings when loading struct array

Philip Nienhuis <[email protected]>
Newsgroups gmane.comp.gnu.octave.bugs
Message-ID <[email protected]>
Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only notification stream.  Info posted to this mailing list address won't appear in the tracker database where it is most useful.

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

                 Summary: "load" emits long series of "classdef not found"
warnings when loading struct array
                   Group: GNU Octave
               Submitter: philipnienhuis
               Submitted: Mon 13 Apr 2026 08:30:09 PM CEST
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Other
                  Status: None
             Assigned to: None
         Originator Name: philipnienhuis
        Originator Email:
             Open/Closed: Open
         Discussion Lock: Unlocked
                 Release: dev
        Operating System: Microsoft Windows
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Mon 13 Apr 2026 08:30:09 PM CEST By: Philip Nienhuis <philipnienhuis>
When loading a '.men' file (actually a .mat file with a different file
extension) made by a Matlab-based program I get an almost endless series of
warnings along the lines of:
'warning: load: classdef not found.  Element loaded as uint32.'

There's nothing wrong with the warning itself, but that it gets emitted for
every element (for a specific field) in a struct array is IMO a bit overdone.
It also takes a long long time to load the file because emitting each
individual warning takes quite a bit of time.
Silencing just that specific warning isn't possible because AFAICS there's no
Octave namespace warning ID for it.

'warning ("off", "all", "local")' in the subfunction loading that file is a
bit overkill; maybe other warnings *are* important  (and I also find that with
that command, upon return from that subfunction my code provokes loads of
warnings about Matlab-incompatible code constructs, like if the "braindead"
option is somehow activated behind my back then.  This latter nuisance may be
due to my own code so for the moment just ignore.)

I can't upload the specific .men (.mat) fileto this bug report, it's too big
(2 MB).    I can upload it elsewhere if so desired.  A screenshot of what
Octave-10.3.0 thinks of it in the V.E. is attached; it shows a subfield that
Octave-12 doesn't show at all (see other screenshot).
Intriguing is that Matlab-r2024a can't load it, while it has been created by a
(proprietary) Matlab-based program that is now abandoned / out of support and
I have no more access to anyway.  Plus, I am very sure that at my former work
we did use Matlab (older releases, maybe r2014a) to read that same file and
similar files.

Although I can work around it for my project by e.g., having Octave read the
file, having a coffee in the meantime and, once/at last loaded, write it to
.mat and be done with it (or use Octave-10.3.0 for this, is faster too), I
foresee that other users can hit the same issue.

So the points I want to make:
1. The warning shouldn't be repeated for every element of a possibly large
struct array.  I think after, say, 5 warnings 'load' should shut up, maybe
with a suitable message.
2. The warning could be more helpful and also mention *which* field(s) provoke
the warning.
3. There should be a warning ID associated with 'load' so that this specific
warning can be silenced.

Didn't test on Linux yet but I expect the same issue there.






    _______________________________________________________
File Attachments:

Name: load_warnings_scrnshot_10.3.0.png Size: 21KiB

<https://file.savannah.gnu.org/file/load_warnings_scrnshot_10.3.0.png?file_id=58468>

Name: load_warnings_scrnshot_12dev.png Size: 27KiB

<https://file.savannah.gnu.org/file/load_warnings_scrnshot_12dev.png?file_id=58469>



    AGPL NOTICE

These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.gnu.org/source/savane-f290f6b25beb8cb99bbe243a6cd2c5fef79ffcde.tar.gz

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCad02NQAKCRCqLAuaBUf3
TtHQAP0bR4mCPFAP5r4qCh8uBNdzjTBgBN+U1OeZfD4T5ZLNJwEAoAsfc8Zk9Uij
ODgOggfMK1UQOc97SfguDQVoVcxewQU=
=Hs02
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.