Closed stevelee12 closed 3 weeks ago
@stevelee12 it's the first we're hearing of this - thank you for reporting.
Interestingly, I can't reproduce this on:
IRIS for Windows (x86-64) 2024.1 (Build 267.2U) Tue Apr 30 2024 16:41:33 EDT
Giving it a try on a 2022.1 instance I have handy; it seems possible/likely that this is an IRIS bug.
I also haven't managed to reproduce the error on:
IRIS for Windows (x86-64) 2022.1.4 (Build 812U) Mon Oct 16 2023 10:09:39 EDT
Which should be close enough. Process:
zpm "install TestCoverage"
zpm "load https://github.com/intersystems/git-source-control"
Do $System.SQL.SetAllowExtrinsicFunctions(1)
Do $System.SQL.PurgeAllNamespaces()
Do $System.OBJ.CompilePackage("TestCoverage")
zpm "git-source-control test -only -DUnitTest.ManagerClass=TestCoverage.Manager -DUnitTest.Case=UnitTest.SourceControl.Git.NameTest -verbose"
In terms of debugging steps, it would be helpful if you could select to retain cached query source:
And then send the cached query source, which might provide some indicator as to what is throwing the
My cached query source has:
%0AmGm7l0tudf() try { new err RETURN ##class("TestCoverage.Procedures").BitValue(i%CoveredLines,i%FromLine) }
catch err { set SQLCODE=-149,%msg="SQL Function TESTCOVERAGE.BIT_VALUE failed with error: SQLCODE="_err.AsSQLCODE()_",%msg="_err.AsSQLMessage() ztrap "SQER" }
%0AmIm9l9tudf() try { new err RETURN ##class("TestCoverage.Procedures").ListToBit(i%%dlistNVAR16) }
catch err { set SQLCODE=-149,%msg="SQL Function TESTCOVERAGE.LIST_TO_BIT failed with error: SQLCODE="_err.AsSQLCODE()_",%msg="_err.AsSQLMessage() ztrap "SQER" }
%0AmIm9l9tudf0() try { new err RETURN ##class("TestCoverage.Procedures").BitwiseOr($$%0AmIm9l9tudf(),i%CoveredLinesO1) }
catch err { set SQLCODE=-149,%msg="SQL Function TESTCOVERAGE.BITWISE_OR failed with error: SQLCODE="_err.AsSQLCODE()_",%msg="_err.AsSQLMessage() ztrap "SQER" }
Indicating that somehow TestCoverage.Procedures:ListToBit is throwing an exception. The only way this could happen is if it was passed a $ListBuild list containing nulls or empty strings, which I don't think should happen from an SQL perspective, but maybe it is somehow.
Could you try replacing TestCoverage.Procedures:ListToBit with:
ClassMethod ListToBit(pSource As %List) As %Binary [ SqlName = LIST_TO_BIT, SqlProc ]
{
Set tResult = ""
Set tPointer = 0
While $ListNext(pSource,tPointer,tBitPosition) {
If $Data(tBitPosition)#2 && (tBitPosition '= "") {
Set $Bit(tResult,tBitPosition) = 1
}
}
Quit tResult
}
And see if that fixes the issue on your instance?
Thanks as always Tim As requested, cached queries enabled, changed ListToBit. Error still occurs and here's the cached query:
Suggests its TestCover.Data.Run.cls, sql statement on line 60, which ironically, has quite a fun comment :)
If I run the query without the cursor I see:
If I remove the calculated field and just list out in the individual fields instead, the live ABOVE the highlighted line is line 44
ok, here's something else you could try:
zbreak *err:"N"::"try { do err.Log() } catch {}"
Then run your unit tests and see what shows up in the Application Error Log.
(alternatively, could wrap the ListToBit code in a try/catch and log the exception from there)
OK Updated ListToBit to
/// Convert a $ListBuild list of integers into a $Bit with 1s in positions present in the list
/// Use in SQL with the %DLIST aggregate
ClassMethod ListToBit(pSource As %List) As %Binary [ SqlName = LIST_TO_BIT, SqlProc ]
{
Set tResult = ""
Set tPointer = 0
try {
While $ListNext(pSource,tPointer,tBitPosition) {
Set $Bit(tResult,tBitPosition) = 1
}
} Catch e {
Set tSC = e.AsStatus()
S ^SLTemp($I(^SLTemp))=tSC
}
Quit tResult
}
and I'm seeing
^SLTemp(1)="0 "_$lb($lb(5002,"<VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1",,,,,,,,$lb(,"MYNS",$lb("^zListToBit+5^TestCoverage.Procedures.1^1","e^%0AmIm9l9tudf^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIm9l9tudf0^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIk2+5^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zFET+3^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zMapRunCoverage+59^TestCoverage.Data.Run.1^3","e^zOnAfterSaveResult+10^TestCoverage.Manager.1^1","d^zSaveResult+9^%UnitTest.Manager.1^1","d^zrealRunTestSuites+143^%UnitTest.Manager.1^1","e^zRunTestSuites+4^%UnitTest.Manager.1^1","d^zRunTestSuites+2^%UnitTest.Manager.1^1","e^zRunTest+1^%UnitTest.Manager.1^1","e^zExecuteTests+32^MyPkg.UnitTest.Manager.1^1","d^zExecuteTests+14^MyPkg.UnitTest.Manager.1^2","e^^^1"))))/* ERROR #5002: ObjectScript error: <VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1 */
^SLTemp(2)="0 "_$lb($lb(5002,"<VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1",,,,,,,,$lb(,"MYNS",$lb("^zListToBit+5^TestCoverage.Procedures.1^1","e^%0AmIm9l9tudf^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIm9l9tudf0^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIk2+5^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zFET+3^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zMapRunCoverage+59^TestCoverage.Data.Run.1^3","e^zOnAfterSaveResult+10^TestCoverage.Manager.1^1","d^zSaveResult+9^%UnitTest.Manager.1^1","d^zrealRunTestSuites+143^%UnitTest.Manager.1^1","e^zRunTestSuites+4^%UnitTest.Manager.1^1","d^zRunTestSuites+2^%UnitTest.Manager.1^1","e^zRunTest+1^%UnitTest.Manager.1^1","e^zExecuteTests+32^MyPkg.UnitTest.Manager.1^1","d^zExecuteTests+14^MyPkg.UnitTest.Manager.1^2","e^^^1"))))/* ERROR #5002: ObjectScript error: <VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1 */
^SLTemp(3)="0 "_$lb($lb(5002,"<VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1",,,,,,,,$lb(,"MYNS",$lb("^zListToBit+5^TestCoverage.Procedures.1^1","e^%0AmIm9l9tudf^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIm9l9tudf0^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIk2+5^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zFET+3^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zMapRunCoverage+59^TestCoverage.Data.Run.1^3","e^zOnAfterSaveResult+10^TestCoverage.Manager.1^1","d^zSaveResult+9^%UnitTest.Manager.1^1","d^zrealRunTestSuites+143^%UnitTest.Manager.1^1","e^zRunTestSuites+4^%UnitTest.Manager.1^1","d^zRunTestSuites+2^%UnitTest.Manager.1^1","e^zRunTest+1^%UnitTest.Manager.1^1","e^zExecuteTests+32^MyPkg.UnitTest.Manager.1^1","d^zExecuteTests+14^MyPkg.UnitTest.Manager.1^2","e^^^1"))))/* ERROR #5002: ObjectScript error: <VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1 */
^SLTemp(4)="0 "_$lb($lb(5002,"<VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1",,,,,,,,$lb(,"MYNS",$lb("^zListToBit+5^TestCoverage.Procedures.1^1","e^%0AmIm9l9tudf^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIm9l9tudf0^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIk2+5^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zFET+3^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zMapRunCoverage+59^TestCoverage.Data.Run.1^3","e^zOnAfterSaveResult+10^TestCoverage.Manager.1^1","d^zSaveResult+9^%UnitTest.Manager.1^1","d^zrealRunTestSuites+143^%UnitTest.Manager.1^1","e^zRunTestSuites+4^%UnitTest.Manager.1^1","d^zRunTestSuites+2^%UnitTest.Manager.1^1","e^zRunTest+1^%UnitTest.Manager.1^1","e^zExecuteTests+32^MyPkg.UnitTest.Manager.1^1","d^zExecuteTests+14^MyPkg.UnitTest.Manager.1^2","e^^^1"))))/* ERROR #5002: ObjectScript error: <VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1 */
^SLTemp(5)="0 "_$lb($lb(5002,"<VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1",,,,,,,,$lb(,"MYNS",$lb("^zListToBit+5^TestCoverage.Procedures.1^1","e^%0AmIm9l9tudf^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIm9l9tudf0^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIk2+5^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zFET+3^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zMapRunCoverage+59^TestCoverage.Data.Run.1^3","e^zOnAfterSaveResult+10^TestCoverage.Manager.1^1","d^zSaveResult+9^%UnitTest.Manager.1^1","d^zrealRunTestSuites+143^%UnitTest.Manager.1^1","e^zRunTestSuites+4^%UnitTest.Manager.1^1","d^zRunTestSuites+2^%UnitTest.Manager.1^1","e^zRunTest+1^%UnitTest.Manager.1^1","e^zExecuteTests+32^MyPkg.UnitTest.Manager.1^1","d^zExecuteTests+14^MyPkg.UnitTest.Manager.1^2","e^^^1"))))/* ERROR #5002: ObjectScript error: <VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1 */
^SLTemp(6)="0 "_$lb($lb(5002,"<VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1",,,,,,,,$lb(,"MYNS",$lb("^zListToBit+5^TestCoverage.Procedures.1^1","e^%0AmIm9l9tudf^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIm9l9tudf0^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIk2+5^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zFET+3^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zMapRunCoverage+59^TestCoverage.Data.Run.1^3","e^zOnAfterSaveResult+10^TestCoverage.Manager.1^1","d^zSaveResult+9^%UnitTest.Manager.1^1","d^zrealRunTestSuites+143^%UnitTest.Manager.1^1","e^zRunTestSuites+4^%UnitTest.Manager.1^1","d^zRunTestSuites+2^%UnitTest.Manager.1^1","e^zRunTest+1^%UnitTest.Manager.1^1","e^zExecuteTests+32^MyPkg.UnitTest.Manager.1^1","d^zExecuteTests+14^MyPkg.UnitTest.Manager.1^2","e^^^1"))))/* ERROR #5002: ObjectScript error: <VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1 */
^SLTemp(7)="0 "_$lb($lb(5002,"<VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1",,,,,,,,$lb(,"MYNS",$lb("^zListToBit+5^TestCoverage.Procedures.1^1","e^%0AmIm9l9tudf^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIm9l9tudf0^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIk2+5^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zFET+3^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zMapRunCoverage+59^TestCoverage.Data.Run.1^3","e^zOnAfterSaveResult+10^TestCoverage.Manager.1^1","d^zSaveResult+9^%UnitTest.Manager.1^1","d^zrealRunTestSuites+143^%UnitTest.Manager.1^1","e^zRunTestSuites+4^%UnitTest.Manager.1^1","d^zRunTestSuites+2^%UnitTest.Manager.1^1","e^zRunTest+1^%UnitTest.Manager.1^1","e^zExecuteTests+32^MyPkg.UnitTest.Manager.1^1","d^zExecuteTests+14^MyPkg.UnitTest.Manager.1^2","e^^^1"))))/* ERROR #5002: ObjectScript error: <VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1 */
MyPkg.UnitTest.Manager is a simple wrapper class that runs this command once (no loops):
; Files to monitor code coverage against
S tCoverageParams("CoverageClasses")=""
S tCoverageParams("CoverageRoutines")=tRoutines
S tCoverageParams("CoverageDetail")=0
S tSC=##class(TestCoverage.Manager).RunTest(,"/nodelete",.tCoverageParams)
I $$$ISERR(tSC) W "RunTest with code coverage failed." D $SYSTEM.Status.DisplayError(tSC) Q
;
where tRoutines is a string like ("routine1","routine2","routine3")
For sanity I removed my wrapper class from the equation and ran the following from terminal:
S ^SLTemp=0
S ^UnitTestRoot="/tmp/tst/UnitTest"
S tSC=##class(My.TestHelper).GetRoutines(.tRoutines)
S tCoverageParams("CoverageClasses")=""
S tCoverageParams("CoverageRoutines")=tRoutines
S tCoverageParams("CoverageDetail")=0
S tSC=##class(TestCoverage.Manager).RunTest(,"/nodelete",.tCoverageParams)
Same SQL results, debug global reads:
^SLTemp(1)="0 "_$lb($lb(5002,"<VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1",,,,,,,,$lb(,"MYNS",$lb("^zListToBit+5^TestCoverage.Procedures.1^1","e^%0AmIm9l9tudf^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIm9l9tudf0^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIk2+5^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zFET+3^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zMapRunCoverage+59^TestCoverage.Data.Run.1^3","e^zOnAfterSaveResult+10^TestCoverage.Manager.1^1","d^zSaveResult+9^%UnitTest.Manager.1^1","d^zrealRunTestSuites+143^%UnitTest.Manager.1^1","e^zRunTestSuites+4^%UnitTest.Manager.1^1","d^zRunTestSuites+2^%UnitTest.Manager.1^1","e^zRunTest+1^%UnitTest.Manager.1^1","e^^^1"))))/* ERROR #5002: ObjectScript error: <VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1 */
^SLTemp(2)="0 "_$lb($lb(5002,"<VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1",,,,,,,,$lb(,"MYNS",$lb("^zListToBit+5^TestCoverage.Procedures.1^1","e^%0AmIm9l9tudf^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIm9l9tudf0^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIk2+5^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zFET+3^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zMapRunCoverage+59^TestCoverage.Data.Run.1^3","e^zOnAfterSaveResult+10^TestCoverage.Manager.1^1","d^zSaveResult+9^%UnitTest.Manager.1^1","d^zrealRunTestSuites+143^%UnitTest.Manager.1^1","e^zRunTestSuites+4^%UnitTest.Manager.1^1","d^zRunTestSuites+2^%UnitTest.Manager.1^1","e^zRunTest+1^%UnitTest.Manager.1^1","e^^^1"))))/* ERROR #5002: ObjectScript error: <VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1 */
^SLTemp(3)="0 "_$lb($lb(5002,"<VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1",,,,,,,,$lb(,"MYNS",$lb("^zListToBit+5^TestCoverage.Procedures.1^1","e^%0AmIm9l9tudf^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIm9l9tudf0^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIk2+5^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zFET+3^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zMapRunCoverage+59^TestCoverage.Data.Run.1^3","e^zOnAfterSaveResult+10^TestCoverage.Manager.1^1","d^zSaveResult+9^%UnitTest.Manager.1^1","d^zrealRunTestSuites+143^%UnitTest.Manager.1^1","e^zRunTestSuites+4^%UnitTest.Manager.1^1","d^zRunTestSuites+2^%UnitTest.Manager.1^1","e^zRunTest+1^%UnitTest.Manager.1^1","e^^^1"))))/* ERROR #5002: ObjectScript error: <VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1 */
^SLTemp(4)="0 "_$lb($lb(5002,"<VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1",,,,,,,,$lb(,"MYNS",$lb("^zListToBit+5^TestCoverage.Procedures.1^1","e^%0AmIm9l9tudf^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIm9l9tudf0^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIk2+5^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zFET+3^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zMapRunCoverage+59^TestCoverage.Data.Run.1^3","e^zOnAfterSaveResult+10^TestCoverage.Manager.1^1","d^zSaveResult+9^%UnitTest.Manager.1^1","d^zrealRunTestSuites+143^%UnitTest.Manager.1^1","e^zRunTestSuites+4^%UnitTest.Manager.1^1","d^zRunTestSuites+2^%UnitTest.Manager.1^1","e^zRunTest+1^%UnitTest.Manager.1^1","e^^^1"))))/* ERROR #5002: ObjectScript error: <VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1 */
^SLTemp(5)="0 "_$lb($lb(5002,"<VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1",,,,,,,,$lb(,"MYNS",$lb("^zListToBit+5^TestCoverage.Procedures.1^1","e^%0AmIm9l9tudf^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIm9l9tudf0^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIk2+5^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zFET+3^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zMapRunCoverage+59^TestCoverage.Data.Run.1^3","e^zOnAfterSaveResult+10^TestCoverage.Manager.1^1","d^zSaveResult+9^%UnitTest.Manager.1^1","d^zrealRunTestSuites+143^%UnitTest.Manager.1^1","e^zRunTestSuites+4^%UnitTest.Manager.1^1","d^zRunTestSuites+2^%UnitTest.Manager.1^1","e^zRunTest+1^%UnitTest.Manager.1^1","e^^^1"))))/* ERROR #5002: ObjectScript error: <VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1 */
^SLTemp(6)="0 "_$lb($lb(5002,"<VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1",,,,,,,,$lb(,"MYNS",$lb("^zListToBit+5^TestCoverage.Procedures.1^1","e^%0AmIm9l9tudf^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIm9l9tudf0^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIk2+5^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zFET+3^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zMapRunCoverage+59^TestCoverage.Data.Run.1^3","e^zOnAfterSaveResult+10^TestCoverage.Manager.1^1","d^zSaveResult+9^%UnitTest.Manager.1^1","d^zrealRunTestSuites+143^%UnitTest.Manager.1^1","e^zRunTestSuites+4^%UnitTest.Manager.1^1","d^zRunTestSuites+2^%UnitTest.Manager.1^1","e^zRunTest+1^%UnitTest.Manager.1^1","e^^^1"))))/* ERROR #5002: ObjectScript error: <VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1 */
^SLTemp(7)="0 "_$lb($lb(5002,"<VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1",,,,,,,,$lb(,"MYNS",$lb("^zListToBit+5^TestCoverage.Procedures.1^1","e^%0AmIm9l9tudf^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIm9l9tudf0^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^3","e^%0AmIk2+5^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zFET+3^%sqlcq.MYNS.xEgcWXTGyQAeZs1SQwetG1ClxqO1.1^1","d^zMapRunCoverage+59^TestCoverage.Data.Run.1^3","e^zOnAfterSaveResult+10^TestCoverage.Manager.1^1","d^zSaveResult+9^%UnitTest.Manager.1^1","d^zrealRunTestSuites+143^%UnitTest.Manager.1^1","e^zRunTestSuites+4^%UnitTest.Manager.1^1","d^zRunTestSuites+2^%UnitTest.Manager.1^1","e^zRunTest+1^%UnitTest.Manager.1^1","e^^^1"))))/* ERROR #5002: ObjectScript error: <VALUE OUT OF RANGE>zListToBit+5^TestCoverage.Procedures.1 */
Hi @isc-tleavitt - any update on this one please? thanks 👍
Hi Tim Just wondering if there’s any update or progress on this one please? Thanks!
@stevelee12 Ah! Sorry for the delay. As a further debugging step, could you find the value of tBitPosition
when the
<VALUE OUT OF RANGE>
error occurs?
Another possibility on this could be:
ClassMethod ListToBit(pSource As %List) As %Binary [ SqlName = LIST_TO_BIT, SqlProc ]
{
Set tResult = ""
Set tPointer = 0
While $ListNext(pSource,tPointer,tBitPosition) {
If $Data(tBitPosition)#2 && (+tBitPosition > 0) {
Set $Bit(tResult,+tBitPosition) = 1
}
}
Quit tResult
}
I'm not sure how you would get tBitPosition = 0 as input to this, but per the docs that would explain the <VALUE OUT OF RANGE>
issue.
@stevelee12 I've tacked on that possible fix to the PR, which you can get via IPM by running:
zpm "load https://github.com/intersystems/TestCoverage -b fix-54"
Hi Tim Great stuff, I applied the fix via zpm and Testsuite now completes without error :) Thankyou!
Hi Tim, any ETA for the pull request on this pls? its working! :) thanks
@stevelee12 thanks for the reminder - merged + released 4.0.4 with the fix.
Could you upload 4.0.4 on GitHub please? I load it onto my container via the TestCoverage-v4.0.X.xml file - thanks :)
@stevelee12 good catch, sorry - see https://github.com/intersystems/TestCoverage/releases/tag/v4.0.4
Hi
I've been writting tests for Cache ObjectScript routines and all was working OK. Today, I had to enable ExtrinsicFunctions on the IRIS Container instance that runs the tests as our production code requires them. Since enabling this I get the following error:
TestCoverage-v3.1.0.xml:
TestCoverage-v4.0.3.xml
$ZV: IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2022.1.5 (Build 940U) Thu Apr 18 2024 14:30:11 EDT
The code coverage output is partial, it likely stops mid way through.
If I disable ExtrinsicFunctions and run the same code, the error doesnt happen (however I'm unable to unit test my code)
Is this a known issue?