Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
4195b56
Errors: Common Errors sections for the Conversion module (batch 3); q…
KubaO Oct 21, 2026
ea75c34
WIP.Errors.md: batch 3 questions answered (Hex width an extension), r…
KubaO Oct 21, 2026
605324f
File nine queued bugs (twinbasic#2536-2538, #2542-2547): entries move…
KubaO Oct 22, 2026
325afe0
Errors: Common Errors sections for the Math module (batch 4, also win…
KubaO Oct 22, 2026
c3da80e
Errors: Common Errors sections for the DateTime module (batch 5); que…
KubaO Oct 22, 2026
9dd0419
Errors batch 5: owner's answers; Date/Time of a number documented as …
KubaO Oct 22, 2026
b80e1ca
Errors batch 5: firstweekofyear out of range queued as a bug (owner)
KubaO Oct 22, 2026
46d1cb7
Errors: harnesses selectable in the data (errors/harnesses/<name>.bas…
KubaO Oct 22, 2026
a066224
Errors: four runtimes, 64-bit twinBASIC against 64-bit VBA (run in Ac…
KubaO Oct 22, 2026
5f7c5c9
Errors: hex-double-above-2-to-62 withdrawn (64-bit VBA does the same)…
KubaO Oct 22, 2026
fb7d210
WIP.Errors: vbDatabaseCompare outside Access left unchecked (owner)
KubaO Oct 22, 2026
f4be164
WIP.Errors: 64-bit VBA results into the queued bug entries, in progress
KubaO Oct 22, 2026
859f220
BUGS-TO-REPORT: 64-bit VBA results in the queued run-time error entries
KubaO Oct 22, 2026
daf2172
Errors batch 6a: split batch 6, registry harness, exploration finding…
KubaO Oct 22, 2026
71c9f42
Errors batch 6a: Information and non-interactive Interaction, four ru…
KubaO Oct 22, 2026
f1af174
WIP.Errors: batch 6a state, waiting on the owner's answers
KubaO Oct 22, 2026
84167da
Errors batch 6a: Partition and Choose large numbers are an extension …
KubaO Oct 22, 2026
4b7f313
Errors batch 6a: three reproducers (argument-errors-unspecified-error…
KubaO Oct 22, 2026
ddfc54e
Errors batch 6a: bug slugs in the data; raiseeventbyname-no-events-cr…
KubaO Oct 22, 2026
fcd4f7c
Errors batch 6a done: four bug entries queued, reproducers packed
KubaO Oct 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,609 changes: 1,292 additions & 317 deletions BUGS-TO-REPORT.md

Large diffs are not rendered by default.

492 changes: 457 additions & 35 deletions WIP.Errors.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion WIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ Why the report separates the wedged task from the merely blocked ones, and why
- **The help archive is the `helpArchive` task of the build's graph.** `builder/help-archive-step.mjs` writes `add-in/Resources/HELP/site.zip` from `docs/_site-offline` through `lib/help-archive.mjs`, once every task that writes into the offline tree has finished (`flushJoin`, `scss`, `writeOffline`; the archive task lists exactly those) and **before** the Gantt injection. **The archive leaves out `HELP_ARCHIVE_SKIP`** (`builder/help-archive-step.mjs`): the Documentation Development section (`BuildInfo.html` and `assets/images/gantt.svg` with it, so the chart never reaches the zip), Videos and their poster frames, Challenges, and **every download, which stays online** (owner): a file readers download goes in a `downloads` folder beside its page, and the step fails the build when the Downloads page offers a file the archive would hold. The add-in's server redirects any file the archive lacks to the website, because pages link to all of these; a new entry needs nothing else. It reads the file back to verify it. A mismatch fails the build (exit 1). After the Gantt injection `recheckHelpArchive` checks that the offline tree on disk lists the same files as the archive and differs from it only in `BuildInfo.html` and `gantt.svg`; a task that wrote into the offline tree late fails the build there. The help add-in embeds the zip as a resource and serves the pages from it with its own server; a build of the add-in without it uses the live site. The file is gitignored (about 26 MB), so a build of the add-in from a clean clone is the online one until `build.bat` has run. The download carries the same zip (previous bullet). **`--no-help-archive` turns the step off, and neither CI workflow may pass it** (`check_ci_workflows.mjs` refuses it, in `ALLOWED.forbiddenBuildFlags`), because CI's published download would then hold no archive. It runs only for the guarded source tree (`docs`) built into the default `docs/_site-offline` (not another `--dest`, so `compare_trees` and `check_links_diff` leave it alone), never under `--serve` or `--dry-run`, never without an offline tree, and not keyed on `$CI`. There is no command-line tool for the archive: the `help-offline` lane makes its own with `writeHelpArchive`. The zip's format is fixed by the add-in's reader, which does no inflating ([WIP.HelpAddin.md](WIP.HelpAddin.md), Stage 4, increment 5).
- `node scripts/bug_repro.mjs` --- the reproducer projects under `bugs/<slug>/` for the entries of [BUGS-TO-REPORT.md](BUGS-TO-REPORT.md): `new`, `pack` (impexp, then the zip, written in Node), `compile`, `build` and `run` through `tbbuild` and `tbrun`, `vb6` (builds the optional `vb6/` VB6 project beside the twinBASIC one in a temp copy, runs its exe on a private desktop, and prints its `out.txt`; a project with a form or a user control is built without Unattended Execution, which VB6 refuses for it; `pack` zips its sources into `<slug>-vb6.zip`; VB6 is started only by `scripts/lib/vb6.mjs`, never from a shell; a graphical defect's `images` key makes `run` and `vb6` keep what the `PngDump` modules of `test/repro-templates/png/` draw as `images/<name>-tb.png` and `-vb6.png`, with a `-compare.png` of both, tested by `test/png.test.mjs`), `file` (moves a filed entry and its reproducer to `bugs/filed/<slug>/`; `file --marked` does every marked entry), and `verify`, which reads each `bugs/*/repro.json` and `bugs/filed/*/repro.json` and says whether the bug still reproduces on the newest beta; a `lane` reproducer names the `ide-test` or `addin-test` lane and tests that assert its bug, which `verify` runs last through that runner, a `probe` one a script under `scripts/`, and a `test` one its own `[TestCase]` Subs and compile cases through `tbrun --tests`, judged by the `PASS` lines of what is fixed and the `FAIL` lines of the bug (`new --template tests` starts one). **No reproducer should need a person at the IDE** (owner): a bug the IDE has to be operated for gets a lane test, and `manual` is left for what cannot be automated at all. It has no wrapper. **`verify` is run by a person only**, never by a gate or CI: it needs a twinBASIC install, like `examples.bat`. Each `tbbuild` and `tbrun` it starts takes a slot of its own from `tbbroker`; `--jobs N` runs N at once. Its command-line cases are in `scripts/lib/cli-cases.mjs`, and need no IDE.
- `node scripts/vb6run.mjs <file | ->` and `node scripts/vb6run.mjs --docs [--only <regex>]` --- build and run VB6 code, so that what a sample prints in twinBASIC can be compared with VB6: a stand-alone file of statements or a `.bas` module, or `--docs`, which builds the documentation's `check_run` fences in VB6 and says for each whether it prints what its page says (`same`, `differs`, `not VB6`, `error`, `refused`; a `projname=` group is built as a project of its own, its `slot=file` fences translated into VB6 `.cls` and `.bas` components). It has no wrapper and is outside every gate and outside CI: it needs VB6 (`--vb6`, `VB6_EXE`, or the standard install folder). **Never start `VB6.EXE` from a shell**: in Git Bash `/make` is rewritten as a path and VB6 answers with a modal box on the desktop; the tool spawns it from Node with an argument array, and a sample that calls `MsgBox` or `InputBox` or contains `End` is refused. Its `Debug.Print` rewrite and its file translation have probes in `test/example-batches.test.mjs`, and its command-line cases are in `scripts/lib/cli-cases.mjs`; both need no VB6. What it relies on is in [WIP.ExamplesBuild.md](WIP.ExamplesBuild.md).
- `node scripts/errors.mjs run|generate|write` --- the run-time errors of the documented procedures, as data under `errors/` ([WIP.Errors.md](WIP.Errors.md), [Tools-Defects](docs/Documentation/Tools-Defects.md#errorsmjs)): `run` builds and runs a probe of the cases in twinBASIC (`tbrun --exe`; win64 on request) and VB6 and compares each with the data, `write` writes each page's Errors section. Its gate is `check_errors.mjs`; `run` is by hand, never CI.
- `node scripts/errors.mjs run|generate|write` --- the run-time errors of the documented procedures, as data under `errors/` ([WIP.Errors.md](WIP.Errors.md), [Tools-Defects](docs/Documentation/Tools-Defects.md#errorsmjs)): `run` builds and runs a probe of the cases in twinBASIC 32-bit and 64-bit (`tbrun --exe`), VB6 and 64-bit VBA (in 64-bit Access, `scripts/lib/vba.mjs`) and compares each with the data, `write` writes each page's Errors section. Its gate is `check_errors.mjs`; `run` is by hand, never CI.
- `node scripts/ide_js.mjs <command>` --- reads, names and patches the IDE's minified `ide/main.js` ([Tools-Defects](docs/Documentation/Tools-Defects.md#ide_jsmjs)): `survey`, `units`, `list`, `name`, `seal`, `check`, `view`, `patch` and `shape`. It reads files and starts nothing; the rules for it are under [Driving the twinBASIC compiler](#driving-the-twinbasic-compiler) (*Fixing the IDE itself*). It has no wrapper and is outside every gate and CI, since it needs an install; its tests are `test/ide-js.test.mjs`, in `test.bat`, and its command-line cases are in `scripts/lib/cli-cases.mjs`. **After a new BETA, run `check` on it**, and `seal` the map once each `review` and `lost` name has been looked at.

Three generators sit outside that loop and produce committed artifacts rather than build output — none runs during a build, and none is needed for one. `python scripts/build_fonts.py` rebuilds the subset webfaces under `docs/assets/fonts/` and needs a network connection; `node scripts/build_dot_metrics.mjs` regenerates `builder/inter-metrics.json` from those webfaces and needs only a browser. See [Typography](#typography). `node indexer/twin-index.mjs derive` regenerates `builder/package-api.json`, the packages' declared API that the build's symbol index (`tB/symbols.json`, for the IDE help add-in) is annotated from; it needs a twinBASIC install (or `--release`), so **run it when the reference is re-indexed against a newer build** and commit it with the pages and the snapshots. See [WIP.HelpAddin.md, Stage 3](WIP.HelpAddin.md#stage-3-the-symbol-index-generated-by-the-docs-build).
Expand Down
Binary file not shown.
28 changes: 28 additions & 0 deletions bugs/argument-errors-unspecified-error/repro.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"mode": "test",
"expect": {
"exit": 7,
"output": [
"^PASS RegressionTests.LBound_UnsizedArray_Raises9$",
"^PASS RegressionTests.QBColor_Sixteen_Raises5$",
"^PASS RegressionTests.Environ_Null_Raises94$",
"^FAIL RegressionTests.LBound_DimensionZero_Raises9: .*Actual: -2147467259 ",
"^FAIL RegressionTests.UBound_DimensionPastRank_Raises9: .*Actual: -2147467259 ",
"^FAIL RegressionTests.LBound_Dimension32768_Raises6: .*Actual: -2147467259 ",
"^FAIL RegressionTests.Switch_OddArguments_Raises5: .*Actual: -2147467259 ",
"^FAIL RegressionTests.Partition_NegativeStart_Raises5: .*Actual: -2147467259 ",
"^FAIL RegressionTests.Partition_IntervalZero_Raises5: .*Actual: -2147467259 ",
"^FAIL RegressionTests.Partition_StringNumber_Raises13: .*Actual: -2147467259 ",
"^FAIL RegressionTests.Partition_BeyondLongLong_Raises6: .*Actual: -2147467259 ",
"^FAIL RegressionTests.Environ_Zero_Raises5: .*Actual: -2147467259 ",
"^FAIL RegressionTests.Environ_PositionWithNoEntry_Raises5: .*Actual: -2147467259 ",
"^FAIL RegressionTests.Environ_EmptyName_Raises5: .*Actual: -2147467259 ",
"^FAIL RegressionTests.Environ_Above32767_Raises6: .*Actual: -2147467259 ",
"^FAIL RegressionTests.GetObject_NoArguments_Raises13: .*Actual: -2147467259 ",
"^FAIL RegressionTests.CallByName_CallTypeZero_Raises438: .*Actual: -2147467259 ",
"^FAIL RegressionTests.CallByName_Nothing_Raises5: .*Actual: -2147467259 ",
"^FAIL RegressionTests.GetSetting_EmptyAppName_Raises5: .*Actual: -2147467259 ",
"^FAIL RegressionTests.DeleteSetting_MissingApplication_Raises5: .*Actual: -2147467259 "
]
}
}
75 changes: 75 additions & 0 deletions bugs/argument-errors-unspecified-error/src/Settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"configuration.inherits": "Defaults",
"project.appTitle": "ArgumentErrorsUnspecifiedError",
"project.buildPath": "${SourcePath}\\Build\\${ProjectName}_${Architecture}.${FileExtension}",
"project.buildType": "Standard EXE",
"project.description": "Reproduces: Refused arguments raise -2147467259, Unspecified error, where VB6 and VBA raise 5, 6, 9, 13 or 438",
"project.exportPathIsV2": true,
"project.id": "{23508218-7D9B-448E-A092-737BAD43E9BF}",
"project.name": "ArgumentErrorsUnspecifiedError",
"project.optionExplicit": true,
"project.references": [
{
"id": "{00020430-0000-0000-C000-000000000046}",
"lcid": 0,
"name": "OLE Automation",
"path32": "C:\\Windows\\SysWOW64\\stdole2.tlb",
"path64": "C:\\Windows\\System32\\stdole2.tlb",
"symbolId": "stdole",
"versionMajor": 2,
"versionMinor": 0
},
{
"id": "{F50B82D0-DCAB-43FE-9631-11959D4A4728}",
"isCompilerPackage": true,
"licence": "MIT",
"name": "[COMPILER PACKAGE] twinBASIC - VB Compatibility Package (Forms)",
"path32": "",
"path64": "",
"publisher": "TWINBASIC-COMPILER",
"symbolId": "VB",
"versionBuild": 0,
"versionMajor": 0,
"versionMinor": 0,
"versionRevision": 31
},
{
"id": "{C192FB39-64CA-4D9B-B477-A5502F48EFCC}",
"isCompilerPackage": true,
"licence": "MIT",
"name": "[COMPILER PACKAGE] twinBASIC - App global class object",
"path32": "",
"path64": "",
"publisher": "TWINBASIC-COMPILER",
"symbolId": "AppGlobalClassProject",
"versionBuild": 0,
"versionMajor": 1,
"versionMinor": 0,
"versionRevision": 0
},
{
"id": "{9847A10D-8987-44B2-8B87-EA77DEF7F1D9}",
"isCompilerPackage": true,
"licence": "MIT",
"name": "[COMPILER PACKAGE] Assert",
"path32": "",
"path64": "",
"publisher": "TWINBASIC-COMPILER",
"symbolId": "Assert",
"versionBuild": 0,
"versionMajor": 0,
"versionMinor": 0,
"versionRevision": 24
}
],
"project.settingsVersion": 1,
"project.startupObject": "Sub Main",
"project.warnings": {
"errors": [],
"hints": [],
"ignored": [],
"info": [],
"warnings": []
},
"runtime.useUnicodeStandardLibrary": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
' Regression tests: a procedure that refuses an argument raises the number VB6 and 64-bit VBA
' raise (the VB6 project beside this one prints them), not -2147467259, Unspecified error.
' No case writes to the registry: GetSetting and DeleteSetting are given names that do not
' exist. tbrun --tests runs each case and prints PASS or FAIL.
[TestFixture]
Module RegressionTests

' Controls: errors twinBASIC already raises with VB's numbers.
[TestCase]
Public Sub LBound_UnsizedArray_Raises9()
Dim A() As Long
Dim N As Long
On Error Resume Next
N = LBound(A)
Assert.Strict.AreEqual 9&, Err.Number
End Sub

[TestCase]
Public Sub QBColor_Sixteen_Raises5()
Dim N As Long
On Error Resume Next
N = QBColor(16)
Assert.Strict.AreEqual 5&, Err.Number
End Sub

[TestCase]
Public Sub Environ_Null_Raises94()
Dim S As String
On Error Resume Next
S = Environ(Null)
Assert.Strict.AreEqual 94&, Err.Number
End Sub

' The defect: each of these raises -2147467259.
[TestCase]
Public Sub LBound_DimensionZero_Raises9()
Dim A(1 To 3) As Long
Dim N As Long
On Error Resume Next
N = LBound(A, 0)
Assert.Strict.AreEqual 9&, Err.Number
End Sub

[TestCase]
Public Sub UBound_DimensionPastRank_Raises9()
Dim A(1 To 3) As Long
Dim N As Long
On Error Resume Next
N = UBound(A, 2)
Assert.Strict.AreEqual 9&, Err.Number
End Sub

[TestCase]
Public Sub LBound_Dimension32768_Raises6()
Dim A(1 To 3) As Long
Dim N As Long
On Error Resume Next
N = LBound(A, 32768)
Assert.Strict.AreEqual 6&, Err.Number
End Sub

[TestCase]
Public Sub Switch_OddArguments_Raises5()
Dim V As Variant
On Error Resume Next
V = Switch(True, 1, False)
Assert.Strict.AreEqual 5&, Err.Number
End Sub

[TestCase]
Public Sub Partition_NegativeStart_Raises5()
Dim V As Variant
On Error Resume Next
V = Partition(5, -1, 10, 1)
Assert.Strict.AreEqual 5&, Err.Number
End Sub

[TestCase]
Public Sub Partition_IntervalZero_Raises5()
Dim V As Variant
On Error Resume Next
V = Partition(5, 0, 10, 0)
Assert.Strict.AreEqual 5&, Err.Number
End Sub

[TestCase]
Public Sub Partition_StringNumber_Raises13()
Dim V As Variant
On Error Resume Next
V = Partition("abc", 0, 10, 1)
Assert.Strict.AreEqual 13&, Err.Number
End Sub

[TestCase]
Public Sub Partition_BeyondLongLong_Raises6()
Dim V As Variant
On Error Resume Next
V = Partition(1E+20, 0, 10, 1)
Assert.Strict.AreEqual 6&, Err.Number
End Sub

[TestCase]
Public Sub Environ_Zero_Raises5()
Dim S As String
On Error Resume Next
S = Environ(0)
Assert.Strict.AreEqual 5&, Err.Number
End Sub

[TestCase]
Public Sub Environ_PositionWithNoEntry_Raises5()
Dim S As String
On Error Resume Next
S = Environ(32767)
Assert.Strict.AreEqual 5&, Err.Number
End Sub

[TestCase]
Public Sub Environ_EmptyName_Raises5()
Dim S As String
On Error Resume Next
S = Environ("")
Assert.Strict.AreEqual 5&, Err.Number
End Sub

[TestCase]
Public Sub Environ_Above32767_Raises6()
Dim S As String
On Error Resume Next
S = Environ(32768)
Assert.Strict.AreEqual 6&, Err.Number
End Sub

[TestCase]
Public Sub GetObject_NoArguments_Raises13()
Dim O As Object
On Error Resume Next
Set O = GetObject()
Assert.Strict.AreEqual 13&, Err.Number
End Sub

[TestCase]
Public Sub CallByName_CallTypeZero_Raises438()
Dim D As Object
Dim V As Variant
Set D = CreateObject("Scripting.Dictionary")
On Error Resume Next
V = CallByName(D, "Count", 0)
Assert.Strict.AreEqual 438&, Err.Number
End Sub

[TestCase]
Public Sub CallByName_Nothing_Raises5()
Dim D As Object
Dim V As Variant
On Error Resume Next
V = CallByName(D, "Count", VbGet)
Assert.Strict.AreEqual 5&, Err.Number
End Sub

[TestCase]
Public Sub GetSetting_EmptyAppName_Raises5()
Dim S As String
On Error Resume Next
S = GetSetting("", "Section", "Key")
Assert.Strict.AreEqual 5&, Err.Number
End Sub

[TestCase]
Public Sub DeleteSetting_MissingApplication_Raises5()
On Error Resume Next
DeleteSetting "NoSuchApplication-argument-errors-unspecified-error"
Assert.Strict.AreEqual 5&, Err.Number
End Sub

End Module
41 changes: 41 additions & 0 deletions bugs/argument-errors-unspecified-error/vb6/Module1.bas
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Attribute VB_Name = "Module1"
Option Explicit

' What VB6 raises for each argument the twinBASIC test cases give, in the same order.
' Build and run it with: node scripts/bug_repro.mjs vb6 argument-errors-unspecified-error
' No case writes to the registry: GetSetting and DeleteSetting are given names that do not exist.

Private Sub Report(ByVal Label As String)
Print #9, Label & ": " & Err.Number & " " & Err.Description
Err.Clear
End Sub

Sub Main()
Dim A() As Long, B(1 To 3) As Long, N As Long, S As String, V As Variant
Dim O As Object, D As Object
Open App.Path & "\out.txt" For Output As #9
On Error Resume Next
N = LBound(A): Report "LBound_UnsizedArray"
N = QBColor(16): Report "QBColor_Sixteen"
S = Environ(Null): Report "Environ_Null"
N = LBound(B, 0): Report "LBound_DimensionZero"
N = UBound(B, 2): Report "UBound_DimensionPastRank"
N = LBound(B, 32768): Report "LBound_Dimension32768"
V = Switch(True, 1, False): Report "Switch_OddArguments"
V = Partition(5, -1, 10, 1): Report "Partition_NegativeStart"
V = Partition(5, 0, 10, 0): Report "Partition_IntervalZero"
V = Partition("abc", 0, 10, 1): Report "Partition_StringNumber"
V = Partition(1E+20, 0, 10, 1): Report "Partition_BeyondLongLong"
S = Environ(0): Report "Environ_Zero"
S = Environ(32767): Report "Environ_PositionWithNoEntry"
S = Environ(""): Report "Environ_EmptyName"
S = Environ(32768): Report "Environ_Above32767"
Set O = GetObject(): Report "GetObject_NoArguments"
Set D = CreateObject("Scripting.Dictionary")
V = CallByName(D, "Count", 0): Report "CallByName_CallTypeZero"
Set D = Nothing
V = CallByName(D, "Count", VbGet): Report "CallByName_Nothing"
S = GetSetting("", "Section", "Key"): Report "GetSetting_EmptyAppName"
DeleteSetting "NoSuchApplication-argument-errors-unspecified-error": Report "DeleteSetting_MissingApplication"
Close #9
End Sub
Binary file not shown.
16 changes: 16 additions & 0 deletions bugs/callbyname-dispatch-hresults/repro.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"mode": "test",
"expect": {
"exit": 7,
"output": [
"^PASS RegressionTests.LateBound_AddExistingKey_Raises457$",
"^PASS RegressionTests.LateBound_RemoveMissingKey_Raises32811$",
"^PASS RegressionTests.CallByName_UnknownName_Raises438$",
"^FAIL RegressionTests.CallByName_AddExistingKey_Raises457: .*Actual: -2147352567 ",
"^FAIL RegressionTests.CallByName_RemoveMissingKey_Raises32811: .*Actual: -2147352567 ",
"^FAIL RegressionTests.LateBound_CompareModeAfterAdd_Raises5: .*Actual: -2147352567 ",
"^FAIL RegressionTests.CallByName_CompareModeAfterAdd_Raises5: .*Actual: -2147352567 ",
"^FAIL RegressionTests.CallByName_EmptyName_Raises450: .*Actual: 438 "
]
}
}
Loading
Loading