Date: 2025-08-25 · Repo: C:\OpenADS · Status: FIXED (uncommitted)
Running Vouch against OpenADS (ace64.dll, remote server):
SEEKsucceeds (Found()=.T.,RecNo()correct) butFieldGet()returns blank/garbage values.- Only CHARACTER fields go blank; numeric / date / logical / memo read correctly.
- Not consistent across tables: some tables read fine, some fail.
- Plain DBF/CDX (local RDD) with the same code works.
- Coding style: current-alias only (
SELECT("USERS")+ plainSEEK/FieldGet), no(alias)->()scoping. HbDBU shows the garbage bytes physically on disk for records the app appended after a failed lookup.
Chain (all inside the client ace64.dll, no wire change):
- A previous navigation of that workarea landed on the EOF phantom
(e.g. a browse walk,
SKIPpast the last record). The remote client'sRemoteTable::nav_at_eofflag was set totrue. AdsSeek/AdsSeekLast(remote branch,src/abi/ace_exports.cpp) resetrow_validand the prefetch queue, but did not resetnav_at_eof/nav_at_bof. After a successful seek onto a live record,AdsAtEOF()still reported.T.(verified with client trace:AdsAtEOF: nav_eof=1 row_valid=1while sitting on recno 1 of 3).- rddads
adsSeekcallshb_adsUpdateAreaFlags(C:\harbour\contrib\rddads\ads1.c:418):fPositioned = !BOF .AND. !EOF→ becomes.F. - rddads
adsGetValue(ads1.c:2200): only theHB_FT_STRINGcase checksfPositionedand returns blanks without calling ADS at all when it is false. Numeric/logical/date/memo cases call ADS directly and get correct values. → exactly "only character fields are blank". - If the app then appends (login pattern: not found → add), the blank values are written to disk — which is what HbDBU showed.
The poison is per workarea, not per table and not alias confusion: only an area whose navigation previously hit EOF fails. Verified with repro4 (two aliases, USERS + ELE, old DLL):
| Seek (current alias, Vouch style) | Found | Char fields |
|---|---|---|
| ELE right after its own walk to EOF | .T. | blank |
| ELE seek 'fy' (same poisoned area) | .T. | blank |
| USERS (area never landed on EOF) | .T. | correct |
src/abi/ace_exports.cpp, remote branches of AdsSeek and AdsSeekLast:
after the seek ack, recompute the nav flags from the seek outcome
(comment FIX(seek-nav)):
- hit, or
recno != 0→nav_at_bof = nav_at_eof = false - miss with
recno == 0→ genuinely at EOF →nav_at_eof = true
No extra round-trip, no wire protocol change, no rddads change, no change to alias/workarea semantics (handles and nav state are already per workarea).
Repro suite (Harbour + rddads against ace64.dll), C:\Users\Anto\AppData\Local\Temp\opencode\ads_repro\:
| Repro | Scenario | Old DLL | Fixed DLL |
|---|---|---|---|
| repro1 | C/N fields, seek+append, local + remote | remote seek: char blank | pass |
| repro2 | full type matrix C/N/F/L/D/M + high bytes | (local only) | pass |
| repro3 | remote, seek after EOF walk | char blank | pass |
| repro4 | multi-area, current-alias only, Vouch style | poisoned area blank | pass |
| worker5 | separate processes/threads, own connections, EOF walk + seek | — | pass |
Repo test suite: tests\ttest.cmd "*seek*" "*Nav*" "*Skip*" "*row*" "*trailer*" "*fetch*" ...
→ 217 cases, 0 failures with the fix.
Pre-existing failures (fail identically WITHOUT the fix, confirmed via git stash):
Remote server and local client alternate duplicate-key appendsMT: 8 writer threads x 50 duplicate-key appends (remote server)remote append invalidates keyno; Refresh pattern stays O(1)
- Alaska Xbase++ sets
INCLUDE/LIBmachine-wide toxpp20;cl.exespawned by hbmk2 then fails. Use a shortPATH(harbour + MSVC bin only) instead of fullvcvars64.bat. - Harbour smoke builds:
hbmk2 -comp=msvc64 -gtcgi -iC:\harbour\contrib\rddads -lrddads -lhbct -lace64 <prg>; copyopenace64.dllasace64.dllnext to the exe. - No
hbthread.libin this Harbour build → thread demos done with concurrent processes (equivalent isolation at the ACE/connection level).
src/abi/ace_exports.cpp— the fix (uncommitted).- Rebuilt:
openace64.dll(→ace64.dll),openads_serverd.exe. - For Pritpal: replace
ace64.dllin the Vouch ADS installation and retest the login; no server update required (but the rebuilt serverd is compatible).