This is an automated email from the ASF dual-hosted git repository.

leginee pushed a commit to branch bazel-migration
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 9e8239f2750da2dda601f5aaa1bf44c4f87c11de
Author: Peter Kovacs <[email protected]>
AuthorDate: Thu Jun 11 09:09:48 2026 +0200

    fix — BASIC user-library seed (non-fatal)
---
 bug-readme.md            | 30 ++++++++++++++++++++++++++++++
 main/staging/BUILD.bazel | 13 +++++++++++++
 main/wizards/BUILD.bazel | 20 ++++++++++++++++++++
 3 files changed, 63 insertions(+)

diff --git a/bug-readme.md b/bug-readme.md
index 7082d8bec6..fc86f11c87 100644
--- a/bug-readme.md
+++ b/bug-readme.md
@@ -358,6 +358,36 @@ are source-level hardening, out of migration scope, and 
only bite if the office
 
 ---
 
+## 10. Follow-on after the ICU fix — BASIC user-library seed (non-fatal)
+
+Once ICU has data, the Writer load proceeds far enough to reveal a *separate*, 
pre-existing first-start
+gap that the broken break iterator had been masking. The application BASIC 
library container reads
+`$(user)/basic/script.xlc` 
([namecont.cxx:763-776](main/basic/source/uno/namecont.cxx#L763)); on a fresh
+profile the file is absent, `openFileRead` throws, and `nPass==0` raises 
`ERRCODE_IO_GENERAL` /
+`ERRCTX_SFX_LOADBASIC` → dialog **"Error loading BASIC of document 
…/user/basic/script.xlc/ : General
+input/output error."** It is **non-fatal** — the code continues past the 
dialog with an empty container
+(`xInput` stays empty → parse skipped). This is the *same* 
`SfxLibraryContainer::init` path that appears in
+Appendix A.4; the ICU break-iterator throw used to abort it before the dialog 
could even render.
+
+**Root cause:** scp2 seeds `user/basic/` from `basicusr.zip` 
(`gid_File_Basic_User`, the `Standard`-only
+`script.xlc`/`dialog.xlc`) and `share/basic/` from `basicshare.zip` — both 
produced by the **deferred
+`wizards` module**, so neither is staged.
+
+**Fix (staging):** the two `Standard`-only template files
+([wizards/source/config/script.xlc + 
dialog.xlc](main/wizards/source/config/script.xlc)) are now staged
+into `presets/basic/` via `//main/wizards:basic_user_config` + `tree_install 
:_install_presets_basic`
+([staging/BUILD.bazel](main/staging/BUILD.bazel)). `UserInstall::finalize()` 
copies `presets/` →
+`$UserInstallation/user/` on first launch, so `user/basic/script.xlc` exists 
and the read succeeds.
+The `configshare` `share/basic/script.xlc` is deliberately **not** staged: it 
lists wizard libraries
+(`Tools`, `Gimmicks`, …) that the deferred module doesn't build, and the share 
read (`nPass==1`) fails
+silently anyway.
+
+**Separate cosmetic item (not addressed here):** the error box title shows 
literal
+`${PRODUCTNAME} ${PRODUCTVERSION}` — product branding substitution 
(`org.openoffice.Setup/Product/ooName`
+etc., normally filled from the bootstrap/version config) isn't applied. 
Tracked separately from the crash.
+
+---
+
 ## Appendix A — raw debugger output
 
 ### A.1 Sig. A — `SfxInterface::Register` AV (sidebar off), with `kp`
diff --git a/main/staging/BUILD.bazel b/main/staging/BUILD.bazel
index 7ff1692364..62df3f1fff 100644
--- a/main/staging/BUILD.bazel
+++ b/main/staging/BUILD.bazel
@@ -522,6 +522,18 @@ tree_install(
     dst          = "presets/config",
 )
 
+# Initial user BASIC library template (Standard-only script.xlc/dialog.xlc).
+# Copied to $UserInstallation/user/basic/ by UserInstall::finalize() on first
+# launch, so the application BASIC library container finds a valid (empty)
+# user/basic/script.xlc instead of raising ERRCODE_IO_GENERAL.  Replaces the
+# scp2 basicusr.zip seed (built by the deferred wizards module).
+tree_install(
+    name = "_install_presets_basic",
+    src          = "//main/wizards:basic_user_config",
+    strip_prefix = "main/wizards/source/config",
+    dst          = "presets/basic",
+)
+
 # ── images.zip — toolbar and UI icons 
─────────────────────────────────────────
 # share/config/images.zip    — default icon set (all modules)
 # share/config/images_industrial.zip — industrial/tango theme overrides
@@ -574,6 +586,7 @@ filegroup(
         ":_install_opensymbol",
         ":_install_presets_autotext",
         ":_install_presets_config",
+        ":_install_presets_basic",
         ":_install_images_zip",
         ":_install_images_industrial_zip",
         ":_install_uiconfig",
diff --git a/main/wizards/BUILD.bazel b/main/wizards/BUILD.bazel
new file mode 100644
index 0000000000..583ab420cb
--- /dev/null
+++ b/main/wizards/BUILD.bazel
@@ -0,0 +1,20 @@
+# wizards — mostly a deferred (Java) module.  The only piece needed for the
+# en-US runtime is the initial USER BASIC library template: the Standard-only
+# script.xlc / dialog.xlc that scp2 ships as basicusr.zip into user/basic/.
+# Without it, a fresh profile has no user/basic/script.xlc and the application
+# BASIC library container raises ERRCODE_IO_GENERAL on startup ("Error loading
+# BASIC of document .../user/basic/script.xlc/").  See repo bug-readme.md.
+#
+# source/config/      → user/basic/ template  (Standard, link=false)
+# source/configshare/ → share/basic/ index    (lists the deferred wizard libs;
+#                       NOT staged — those .xlb libraries aren't built, and the
+#                       share read fails silently anyway.)
+
+filegroup(
+    name = "basic_user_config",
+    srcs = [
+        "source/config/dialog.xlc",
+        "source/config/script.xlc",
+    ],
+    visibility = ["//visibility:public"],
+)

Reply via email to