Created attachment 202770 [details] Includes the test file, the debug macro, and its output In LibreOfficeDev 26.0.0.0 alpha0+, a Basic macro accessing `TextTable.Columns.getByIndex(i)` returns `Null` for all columns, despite `Columns.getCount()` reporting the correct count (e.g., 2 for a 2x3 table). This prevents accessing column properties like `Width`. Other issues include "Internal error $(ARG1)" when iterating UNO collections (e.g., `getPropertySetInfo().getProperties()`, `getAvailableServiceNames()`) and zero `Height`/`Width` values in earlier attempts. Steps to Reproduce: 1. Open Writer, create a 2x3 table (no merged cells). 2. Add text (e.g., "A", "Long text", "Very long text"). 3. Place cursor in table. 4. Run attached macro (`DebugTableObjectsMinimal`). 5. Observe: `Columns.getByIndex(i)` returns `Null` for all columns, while `getCount()` reports 2. Expected: - `getByIndex(i)` returns valid `XTableColumn` objects with properties like `Width`. Actual: - `getByIndex(i)` returns `Null` (Error: 0). - Debug output confirms table access, cell names, and row access work, but columns fail. Attachments: - Macro code (`DebugTableObjectsMinimal`). - Debug output (attached). - Test document (.odt with 2x3 table). Related: Bug #168331[](https://bugs.documentfoundation.org/show_bug.cgi?id=168331).
NarayanAras, what is the last version that worked well?
Unfortunately, I would not know. I have been downloading and using the "Daily Master" versions for the last 2-3 years. (I update them once in 1-2 months.) I have rarely used ChatGPT and Grok for writing macros for me. So on both counts I do not have a pattern to report.
BTW, this bug itself was AI-generated. I am not a coder myself. But if you want, I can run any debug macro and let you know the results.
Ref: https://ask.libreoffice.org/t/unable-to-generate-valid-macros-using-chatgpt-and-grok-both-report-interpreter-issues/126540 Looks like this is not "this used to work, but now doesn't", but rather "this code, generated by AI, doesn't work in the version I tried".
*** This bug has been marked as a duplicate of bug 51925 ***
That is a 13-years old bug, and not resolved. According to Grok and ChatGPT, there are many such quirks, and they are struggling with the code that is not flagged as defective in the documentation. At least mark such methods and attributes as not available. I do not think AI engines can make such basic mistakes otherwise. Why waste everyone's time?
I can submit a summary of such quirks, collated from AI engines. I have already compiled a list of such flawed code, where ChatGPT attempted specific functions/attributed and got an error.
see https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/ RESOLVED#DUPLICATE (In reply to NarayanAras from comment #7) > I can submit a summary feel free to do that with a clear separate report. (In reply to NarayanAras from comment #6) > That is a 13-years old bug, and not resolved. duplicating is just adding noise, not speeding up the resolution. *** This bug has been marked as a duplicate of bug 51925 ***