The new modules of a Uniface customer app come with a test service: it inserts test data, calls every operation, writes PASS/FAIL lines with putmess and rolls everything back. The IDE runs it with Compile & Test. This time the run never finished. The log showed two lines and then nothing:

Feature 38 tests started PASS: SETUP inserts the test data 

No error message, no dialog, and the database file had an open journal. Here is what the hunt taught me.

Tested with Rocket Uniface 10.4.03 Community Edition (10.4.03.021) on Windows, November 2026, SQLite through the SLE driver (SQLite 3.50.2).

1. The last log line is not where the test stopped

The obvious reading was: the test hangs in the block right after the setup. That was wrong. The message log is written in chunks. In a later run the log showed only the first line for over a minute while the test had already passed much further.

For position tracking I switched to a file that is overwritten at every step:

 lfiledump "TRACE TEST_EINV 9", "C:\Projects\Customers\export\test\trace38.txt" 

lfiledump writes immediately, so the file always holds the last step that was reached.

2. lfiledump sets $status

My first traced run reported 56 failures out of 60. Every check printed a status between 17 and 20. The trace line sat between the call and the status check:

 activate "EINV_SVC".SELLER(vData, vCount, vError) lfiledump "TRACE TEST_EINV 12", "C:\Projects\Customers\export\test\trace38.txt" vS = $status 

lfiledump returns the number of bytes written in $status; "TRACE TEST_EINV 12" has 18 characters. Trace lines belong after vS = $status, or in a version of the code that is thrown away afterwards, which is what I did.

3. A long SQL column without an alias crashed the process

The trace file pinned the problem to one statement in the IBAN check:

SELECT CASE 'DE' WHEN 'DE' THEN 22 WHEN 'AT' THEN 20 ... ELSE 0 END 

The query is fine in the sqlite3 shell. In the test run the process ended a few minutes later without any message in the log; the IDE only showed a transcript window with a fatal message about a missing $resources_output setting.

What made this statement special: the result column has no name, so SQLite uses the whole expression (372 characters) as the column name. Nothing else in the project returned an unnamed column longer than 250 characters. After adding an alias the test ran through:

 call GET_TEXT("SELECT CASE '%%(vCountry)' WHEN 'DE' THEN 22 WHEN 'AT' THEN 20 WHEN 'CH' THEN 21 WHEN 'FR' THEN 27 WHEN 'NL' THEN 18 WHEN 'BE' THEN 16 WHEN 'IT' THEN 27 WHEN 'ES' THEN 24 WHEN 'LU' THEN 20 WHEN 'DK' THEN 18 WHEN 'PL' THEN 28 WHEN 'CZ' THEN 24 WHEN 'GB' THEN 22 WHEN 'IE' THEN 22 WHEN 'SE' THEN 24 WHEN 'FI' THEN 18 WHEN 'NO' THEN 15 WHEN 'PT' THEN 25 WHEN 'LI' THEN 21 ELSE 0 END AS L", vR) 

I have not dug into the driver to find an exact limit, so treat this as an observation from one setup, not a documented rule. The habit costs nothing: every computed column gets a short alias. I added aliases to the three other long expressions in the same service at the same time.

4. Trailing spaces disappear on the way to ProcScript

With the crash gone, six checks of the data tidy module failed. The module finds values like "Tom " and stores the tidied value. To avoid overwriting a value someone changed in the meantime, the update compared the field with the old value it had read:

... WHERE CUSTOMER_ID = 3800005 AND FIRST_NAME = 'Tom' 

The database holds 'Tom '. The trailing spaces were lost when the row came back through sql/data and getitem, so the update matched no row. The history entry was written, the data was not changed. The fix compares trimmed values on both sides:

sql "UPDATE %%(vTable) SET %%(vField) = %%(vNewLit)%%(vExtra) WHERE %%(vIdCol) = %%(vRowId) AND TRIM(%%(vField)) = TRIM(%%(vOldLit))", "CUSTOMERS" 

The same effect made the preview useless: it said FIRST_NAME: [Tom] to [Tom]. The preview query now returns two extra columns for display only, with spaces made visible:

REPLACE(FIRST_NAME, ' ', '_') 

so the user sees [Tom__] to [Tom].

A small helper for stuck runs

A crashed or stuck test process has no window. To end it without the Task Manager, the project folder now has a script that stops only IDE processes started with /tst and leaves the IDE itself alone:

$log = Join-Path $PSScriptRoot 'kill_uniface_tests.log' $all = Get-CimInstance Win32_Process | Where-Object { $_.CommandLine -match 'Uniface' } $tests = $all | Where-Object { $_.CommandLine -match ' /tst ' } $line = (Get-Date -Format s) + ' all=' + (($all | ForEach-Object { $_.Name + ':' + $_.ProcessId }) -join ',') + ' tests=' + (($tests | ForEach-Object { $_.ProcessId }) -join ',') $tests | ForEach-Object { Stop-Process -Id $_.ProcessId -Force } Add-Content -Path $log -Value $line Write-Host $line 

Summary

  • Do not trust the last line of a buffered log; write positions to a file.
  • Put trace calls where they cannot change $status.
  • Give computed SQL columns an alias.
  • Expect trailing spaces to be gone when a value comes back into ProcScript, and compare with TRIM where it matters.

After the four fixes the test service reports 60 tests, 0 failures, and the database is unchanged after the run.