Issue 126203 - Runtime error with password protected DB Basic macro libraries
Summary: Runtime error with password protected DB Basic macro libraries
Status: CONFIRMED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: 4.1.1
Hardware: All All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-24 17:20 UTC by schaber
Modified: 2015-04-01 21:04 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Test file for reproduction (12.01 KB, application/vnd.sun.xml.base)
2015-03-24 17:20 UTC, schaber
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description schaber 2015-03-24 17:20:45 UTC
Created attachment 84617 [details]
Test file for reproduction

Following up on issue 106303, there are still troubles with password protected database macro libraries. It only happens with bug libraries.

The password for the attached file is testtest32. Open the file and run macro foo2. There are a couple of errors (e.g., "unknown. Internal error $(ARG1).") that do not show up anymore when I enter the password of the library.
Comment 1 bmarcelly 2015-03-31 14:39:00 UTC
The module Module1 in your attachment contains 246146 characters.

Apache OpenOffice Basic does not work correctly with modules approaching or exceeding 65535 characters.
For your information, the same errors appear in LibreOffice 4.3.5.

Easy work-around : 
Put your code into several routines stored in several modules of the same library. Subroutine names are public to all modules.
Comment 2 schaber 2015-04-01 21:04:41 UTC
Thanks for the hint.

I can confirm that splitting the huge module into many smaller modules under 65k characters is a workaround. The other advantage is that you need to get your libraries well structured. There is just no clue when you hit the 65k limit.