[Gambas-user] Crash with latest version

Christof Thalhofer chrisml at deganius.de
Mon Mar 1 11:12:54 CET 2021


Am 26.02.21 um 02:26 schrieb Jussi Lahtinen:
> 
>     Or did I do sth wrong while copying it?
> 
> 
> I think so, sTest is written in Process_Read:
> 
> Fast Public Sub Process_Read()
>  
>   Dim sTmp As String = Read #hProcess, 1
>  
>   sTest &= sTmp  
>  
> End
> 
> It is a stress test for writing via process as I have seen missing data
> in similar code. But I think the problem doesn't exist anymore (and
> hopefully never reappears).
> At least the tester doesn't encounter it. It does the tests 1000 times,
> so if they all fail there are 1000 errors from each test... However the
> problem was so rare,
> that you could see it only once or so.

----------------------------------------------------------------
#tldr: All fast tests pass, we can think about how to integrate it into
Gambas development so that we can do a "make test" later.
----------------------------------------------------------------

Ok, I ignored that problem you mentioned until now. Please have a look
at the project as it is now. It runs and passes all tests which run fast
with gb.test within one second. And it tells if and what test failed so
that Benoît can find the failing test easily. This is the great
advantage of gb.test.

These slow ones fail (i did some copy/paste errors) and some testmethods
in Test1 have silly and inadequate names:

> # Ausgeführt: 'Testsuite: SlowOnes'
> #
> # 7 tests failed:
> # 1:  -- Test1:AlotOfSlowExecs
> # 2:  -- Test1:LongRunningTimers
> # 1: Test1:Timertest -- Timer 1
> # 2: Test1:Timertest -- Timer 2
> # 3: Test1:Timertest -- Test1:Timertest crashed with error 'End of file' in 'Test1.Timertest.2852'
> # 4:  -- Test1:VeryVeryLongRunner
> # 5:  -- Test1:VerylongRunner
> #
> # FAILED

But the fast ones (the mayority of all tests) pass:

> 1..1
> 
> Test Test1:DoTests
>   # Start Crash and compiler tests
>   # End Crash and compiler tests
>   ok 1 - ReadFileBoolean
>   ok 2 - ReadFileString
>   ok 3 - ReadFileShort
>   ok 4 - ReadFileByte
>   ok 5 - ReadFileString2
>   ok 6 - ReadFileByte2
>   ok 7 - ReadFileGambas
>   ok 8 - ReadFileByte3
>   ok 9 - Testing StringArray
>   ok 10 - Testing StringArray
>   ok 11 - Testing StringArray
>   ok 12 - Testing StringArray
>   ok 13 - Testing StringArray
>   ok 14 - Testing StringArray
>   ok 15 - Testing StringArray
>   ok 16 - Testing StringArray
>   ok 17 - Testing StringArray
>   ok 18 - Testing StringArray
>   ok 19 - Testing StringArray
>   ok 20 - Testing StringArray
>   ok 21 - Testing StringArray
>   ok 22 - Testing StringArray
>   ok 23 - String Comparison 1
>   ok 24 - String Comparison 2
>   ok 25 - String Comparison 3
>   ok 26 - String Comparison 4
>   ok 27 - String Comparison 5
>   ok 28 - String Comparison 6
>   ok 29 - Playing with Strings
>   ok 30 - Testing RInStr
>   ok 31 - Testing RInStr
>   ok 32 - Testing RInStr
>   ok 33 - Html lt
>   ok 34 - Html gt
>   ok 35 - Bad Html gt lt
>   ok 36 - Like 1
>   ok 37 - Like 2
>   ok 38 - Like 3
>   ok 39 - Instr 1
>   ok 40 - Instr 2
>   ok 41 - Instr 3
>   ok 42 - Split string
>   ok 43 - Scan string
>   ok 44 - string greater
>   ok 45 - string not smaller
>   ok 46 - string greater equals
>   ok 47 - string greater equals 2
>   ok 48 - string samller equals
>   ok 49 - string samller equals 2
>   ok 50 - UnQuote$
>   ok 51 - Lenstr57
>   ok 52 - Validate result with md5sum.
>   ok 53 - Trigonometric 1
>   ok 54 - Trigonometric 2
>   ok 55 - Trigonometric 3
>   ok 56 - Trigonometric 4
>   ok 57 - Trigonometric 5
>   ok 58 - Trigonometric 4
>   ok 59 - Str(ACosh(2))
>   ok 60 - Deg(Ang(-1,1))
>   ok 61 - Str(ATanh(0.5))
>   ok 62 - Str(Sinh(1))
>   ok 63 - ((8 Or 32) Xor 16)
>   ok 64 - Bit manipulation 1
>   ok 65 - Bit manipulation 2
>   ok 66 - Bit manipulation 3
>   ok 67 - Bit manipulation 4
>   ok 68 - Bit manipulation 5
>   ok 69 - Bit manipulation 6
>   ok 70 - Bit manipulation 7
>   ok 71 - Bit manipulation 8
>   ok 72 - Some numbers crumpling
>   ok 73 - Int Pi
>   ok 74 - Int -Pi
>   ok 75 - Max Pi
>   ok 76 - Min Pi
>   ok 77 - Sgn(-123456789)
>   ok 78 - Sgn(-Pi)
>   ok 79 - Round(Pi, -2)
>   ok 80 - Round(CSingle(6) + 0.01)
>   ok 81 - Round(1972, 2)
>   ok 82 - Rnd 1
>   ok 83 - Rnd 3
>   ok 84 - Choose 1
>   ok 85 - Choose 2
>   ok 86 - Choose 3
>   ok 87 - Choose 4
>   ok 88 - Choose 5
>   ok 89 - IIf ii Mod 2
>   ok 90 - ii /= 0
>   ok 91 - ii = 3 / 0
>   ok 92 - ii = cat or dog
>   ok 93 - ii = 1.234 Div 5
>   ok 94 - Is 19 Div 5
>   ok 95 - Is2 19 Div 5
>   ok 96 - And If test 1
>   ok 97 - 
>   ok 98 - 
>   ok 99 - Int 1
>   ok 100 - Int 2
>   ok 101 - Int 3
>   ok 102 - Int 4
>   ok 103 - Asl Shl
>   ok 104 - Asr Shr
>   ok 105 - Ang Atan2
>   ok 106 - Sinh ASinh
>   ok 107 - TestClass3.TestByref
>   ok 108 - Breaktest
>   ok 109 - Test With
>   ok 110 - Cbr
>   ok 111 - Sqr
>   ok 112 - Cbr(Pi ^ 3) - Pi
>   ok 113 - Sqr(Pi ^ 2)
>   ok 114 - CByte(17)
>   ok 115 - CByte(100000)
>   ok 116 - CByte(True)
>   # Or Or Xor
>   # Or If Else
>   # CBool
>   ok 117 - Abs((ACosh(Cosh(0.5)) - 0.5)
>   # CFloat
>   # CShort
>   # CSingle
>   ok 118 - Format Pi
>   # ValPtr
>   # ValPtr2
>   ok 119 - Val(Format$(Exp(20)
>   ok 120 - CInt(Exp10(4))
>   ok 121 - CInt 12
>   ok 122 - Exp2(4)
>   ok 123 - Expm vs Exp
>   # Goto Test
>   ok 124 - Eval Quote Test
>   ok 125 - Eval(A + B + C, cCol)
>   ok 126 - InlineArr.Join
>   ok 127 - Hyp = Sqr
>   ok 128 - IsBoolean
>   ok 129 - IsBoolean2
>   ok 130 - HighestLong LowestLong
>   ok 131 - System.Architecture System.Family
>   ok 132 - Is 1 = 2 Or Me._TestAndIf() = 1
>   ok 133 - iTestAndIf = 1
>   ok 134 - Is 1 = 2 Or If Me._TestAndIf() = 1
>   ok 135 - iTestAndIf = 1
>   ok 136 - IsBlank
>   ok 137 - IsDigit(1972)
>   ok 138 - IsDigit
>   ok 139 - IsDir(Application.Path)
>   ok 140 - IsDir <> File
>   ok 141 - Not existent dir/file
>   ok 142 - ClassTest.x = 1 
>   ok 143 - Continue ok
>   ok 144 - Hex$
>   ok 145 - IsLCase
>   ok 146 - IsLCase2
>   ok 147 - IsUCase GAMBAS
>   ok 148 - IsUCase Cool
>   ok 149 - CVariant array
>   ok 150 - String array
>   ok 151 - 9A177BA5
>   ok 152 - IsHexa
>   ok 153 - IsNumber
>   ok 154 - IsNumber2
>   ok 155 - IsFloat
>   ok 156 - IsFloat2
>   ok 157 - Val Str
>   ok 158 - ClassArray
>   ok 159 - IsInteger
>   ok 160 - IsInteger2
>   ok 161 - IsPunct
>   ok 162 - IsPunct2
>   ok 163 - IsAscii
>   ok 164 - IsAscii2
>   ok 165 - IsDate
>   ok 166 - IsDate2
>   ok 167 - IsLetter
>   ok 168 - IsLetter2
>   ok 169 - IsLong
>   ok 170 - Typeof Lof
>   ok 171 - IsSpace
>   ok 172 - IsSpace2
>   ok 173 - Floor
>   ok 174 - Ceil
>   ok 175 - Log2
>   ok 176 - Log2-2
>   ok 177 - Format$ Log
>   ok 178 - Log10
>   ok 179 - Log10-2
>   ok 180 - Mid
>   ok 181 - Mid2
>   ok 182 - Mid3
>   ok 183 - Mid4
>   ok 184 - Mid5
>   ok 185 - Mid6
>   ok 186 - Mid7
>   ok 187 - Logp
>   ok 188 - Logp2
>   ok 189 - mTest.Test()
>   ok 190 - Let
>   ok 191 - Hyp Mag
>   ok 192 - Day
>   # 500 Dates
>   ok 193 - DateDiff
>   ok 194 - Month
>   ok 195 - Hour
>   ok 196 - Minute
>   ok 197 - Second
>   ok 198 - Access
>   ok 199 - ClassTest symbol not exist
>   ok 200 - ClassTest 1
>   ok 201 - ClassTest 2
>   ok 202 - ClassTest 3
>   ok 203 - ClassTest 4
>   ok 204 - ClassTest 5
>   ok 205 - ClassTest 6
>   ok 206 - TestPoint 1
>   ok 207 - TestPoint 2
>   ok 208 - mTest.Test1
>   ok 209 - TestClass2.iInitVar
>   ok 210 - ClassTest 7
>   ok 211 - ClassTest 8
>   ok 212 - Format$ Rad
>   ok 213 - Rad(180) - Pi
>   ok 214 - Repeat Until
>   ok 215 - While Wend
>   ok 216 - For Next
>   ok 217 - IIf(1 = 1, 10, 20)
>   ok 218 - CLong(Pi)
>   ok 219 - CLong(Pi ^ (Pi ^ Pi))
>   ok 220 - For To
>   ok 221 - Stat ~
>   ok 222 - Stat ~
>   ok 223 - -2E-16
>   ok 224 - Pointer Magic
>   ok 225 - Open File Create/Read
>   ok 226 - Memory Write
>   ok 227 - Memory Write 2
>   ok 228 - Memory Write 3
>   ok 229 - Translate
>   ok 230 - Format$ Tanh
>   ok 231 - Test Time
>   ok 232 - Array play
>   ok 233 - Test Str$
>   ok 234 - Test {Dim}
>   ok 235 - VarPtr Short
>   ok 236 - VarPtr Single
>   ok 237 - VarPtr Long
>   ok 238 - VarPtr String
>   ok 239 - VarPtr Float
>   ok 240 - VarPtr Int
>   ok 241 - VarPtr Byte
>   ok 242 - Date play 1
>   ok 243 - Date play 2
>   ok 244 - Date play 3
>   ok 245 - mTest.TestErrorManagment 1
>   ok 246 - mTest.TestErrorManagment 2
>   ok 247 - mTest.TestErrorManagment 3
>   ok 248 - mTest.TestErrorManagment 4
>   ok 249 - Test &/
>   ok 250 - Test Mkdir IsDir
>   ok 251 - date to file
>   ok 252 - Test Link
>   ok 253 - Test file Line Input
>   ok 254 - Test Read file
>   ok 255 - Dir 1
>   ok 256 - RDir 1
>   ok 257 - RDir 2
>   ok 258 - Dir 2
>   ok 259 - test Dfree
>   ok 260 - IsDir with not dir
>   ok 261 - test Alloc
>   ok 262 - test Realloc
>   ok 263 - ii = -3
>   ok 264 - Comp 1
>   ok 265 - Comp 2
>   ok 266 - Comp 3
>   ok 267 - Comp 4
>   ok 268 - Comp 5
>   ok 269 - Comp 6
>   ok 270 - mTest.TestErrorManagment3(1)
>   ok 271 - mTest.TestErrorManagment3(2)
>   ok 272 - mTest.ArrayBoundsTest
>   ok 273 - Test TestGosub
>   ok 274 - Even Odd
>   ok 275 - Byte@ VarPtr
>   ok 276 - For .. Round
>   ok 277 - Test If False
>   ok 278 - JITTest
>   ok 279 - YetAnotherClass ThisObject_Gets_Lost
>   ok 280 - JITTestBoolArray
>   # - - - - - - - - - - - - - - - - - - - - - - - - - - -Missing tests
>   # These key words are missing from test:
>   # Abs
>   # Access
>   # ACos
>   # ACosh
>   # Alloc
>   # Ang
>   # APPEND
>   # *
>   # ^
>   # \
>   # New Float[
>   # New Single[
>   # New Long[
>   # New Short[
>   # New Byte[
>   # New Boolean[
>   # New Date[
>   # New Variant[
>   # New Object[
>   # New Pointer[
>   # Asc
>   # ASin
>   # ASinh
>   # Asl
>   # Asr
>   # +=
>   # -=
>   # *=
>   # /=
>   # \=
>   # >=
>   # ATan
>   # ATan2
>   # ATanh
>   # BChg
>   # BClr
>   # BEGINS
>   # Bin$
>   # Boolean@
>   # BSet
>   # BTst
>   # Byte@
>   # CBool
>   # Cbr
>   # CByte
>   # CDate
>   # Ceil
>   # CFloat
>   # Chr$
>   # CInt
>   # CLong
>   # Comp
>   # gb.Binary
>   # gb.IgnoreCase
>   # gb.Like
>   # CONTINUE
>   # Cos
>   # Cosh
>   # CREATE
>   # CShort
>   # CSingle
>   # CVariant
>   # Date
>   # DateAdd
>   # DateDiff
>   # Day
>   # DEC
>   # DEFAULT
>   # Deg
>   # DFree
>   # Dir
>   # DIV
>   # DO
>   # ENDS
>   # Eof
>   # Eval
>   # Even
>   # Exist
>   # Exp
>   # Exp10
>   # Exp2
>   # Expm
>   # Fix
>   # Float@
>   # Floor
>   # Format$
>   # Frac
>   # GOTO
>   # Free
>   # Hex$
>   # Hour
>   # Html$
>   # Hyp
>   # IIf
>   # ["A": 1, "B": 2, "C": 3]
>   # INPUT
>   # InStr
>   # Int
>   # Int@
>   # IsAscii
>   # IsBlank
>   # IsBoolean
>   # IsDate
>   # IsDigit
>   # IsDir
>   # IsFloat
>   # IsHexa
>   # IsInteger
>   # IsLCase
>   # IsLetter
>   # IsLong
>   # IsNumber
>   # IsPunct
>   # IsSpace
>   # IsUCase
>   # LCase$
>   # Len
>   # LET
>   # LIKE
>   # LINE INPUT
>   # LINK
>   # Lof
>   # Log
>   # Log10
>   # Log2
>   # Logp
>   # Long@
>   # LOOP
>   # Lsl
>   # Lsr
>   # LTrim$
>   # Mag
>   # ME
>   # MEMORY
>   # Mid$
>   # Min
>   # Minute
>   # MKDIR
>   # MkInteger$
>   # MkLong$
>   # MOD
>   # Month
>   # MOVE
>   # NOT
>   # Now
>   # Odd
>   # OR IF
>   # OUTPUT
>   # Pi
>   # Pointer@
>   # Quote$
>   # Rad
>   # RANDOMIZE
>   # RDir
>   # Realloc
>   # REPEAT
>   # Replace$
>   # Right$
>   # RInStr
>   # RMDIR
>   # Rnd
>   # Rol
>   # Ror
>   # Round
>   # RTrim$
>   # Scan
>   # Second
>   # Sgn
>   # SHELL
>   # Shl
>   # Short@
>   # Shr
>   # Sin
>   # Single@
>   # Sinh
>   # SizeOf
>   # SLEEP
>   # Space$
>   # Sqr
>   # Stat
>   # Str$
>   # ==
>   # String$
>   # Str@
>   # Subst$
>   # SWAP
>   # System.Architecture
>   # System.ByteOrder
>   # System.Family
>   # Tan
>   # Tanh
>   # Time
>   # Tr$
>   # Trim$
>   # UCase$
>   # Unquote$
>   # UNTIL
>   # Val
>   # VarPtr
>   # WAIT
>   # WATCH
>   # Week
>   # WeekDay
>   # WEND
>   # WHILE
>   # XOR
>   # Year
>   # EndOfThisList
>   # 
>   not ok 281 -  # TODO Tests missing
>   1..281
> ok 1 - Test1:DoTests
> 
> # Ausgeführt: 'Test1.DoTests'
> #
> # 1 todo:
> # 281: Test1:DoTests --  # Tests missing
> #
> # PASSED

Have fun with it.

Alles Gute

Christof Thalhofer

-- 
Dies ist keine Signatur

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210301/422e0dbc/attachment-0001.sig>


More information about the User mailing list