You are not logged in.
I am using SynopseSQLite3 v1.8 with Delphi2010 Professional on Windows 7 x32.
I can compile TestSQL3 with no problems but when I try to run it I get a variety of errors.
SynZip.TZipRead.Create()
Throws 'Range check error' exception on line 675 -called by line 183 of SynSelfTests.TTestCompression.ZipFormat()
I wanted to see if this was the only issue so I commented out the ZipRead test and hit the next error:
Sqlite3.CreateSQLEncryptTableBytes()
Throws 'Integer overflow' exception on line 1620 for variable 'k'
If I redeclare variable k as int64 I can proceed to next error.
SynCrtSock.GetCardinal()
Throws 'Range check error' exception on line 1379
at this point I stopped.
Has anyone else run into these issues with Delphi 2010?
Last edited by CodeMonkey (2010-08-15 06:52:17)
Offline
After making the 2 code changes mentioned above I found I can get the rest of the tests to run.
Added comments to reports below.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Synopse SQLite3 Framework Automated tests
-------------------------------------------
1. Synopse libraries
1.1. Low level common:
- System copy record: 22 assertions passed
- Fast string compare: 7 assertions passed
- Url encoding: 104 assertions passed
- Soundex: 29 assertions passed
- Numerical conversions: 150000 assertions passed
- Curr64: 20012 assertions passed
- CamelCase: 5 assertions passed
- Bits: 4614 assertions passed
- Ini files: 7000 assertions passed
- UTF8: 6006 assertions passed
Total failed: 0 / 187799 - Low level common PASSED
1.2. Low level types:
- Iso8601 date and time: 24000 assertions passed
- Url decoding: 1200 assertions passed
- RTTI: 21 assertions passed
- Json encode decode: 606 assertions passed
Total failed: 0 / 25827 - Low level types PASSED
1.3. Cryptographic routines:
- Adler32: 1 assertion passed
- MD5: 1 assertion passed
- SHA1: 5 assertions passed
- SHA256: 5 assertions passed
- AES256: 600 assertions passed
- Base64: 2000 assertions passed
Total failed: 0 / 2612 - Cryptographic routines PASSED
1.4. Compression:
- In memory compression: 12 assertions passed
- Gzip format: 2 assertions passed <<<<<1st failure, test aborts here unless zipread test is bypassed
- Zip format: 2 assertions passed
Total failed: 0 / 16 - Compression PASSED
1.5. Synopse PDF:
- TPdfDocument: 4 assertions passed
- TPdfDocumentGDI: 3 assertions passed
Total failed: 0 / 7 - Synopse PDF PASSED
2. SQLite3
2.1. Basic classes:
- TSQLCache: 612 assertions passed
- TSQLRecord: 22 assertions passed
- TSQLRecordSigned: 200 assertions passed
- TSQLModel: 3 assertions passed
Total failed: 0 / 837 - Basic classes PASSED
2.2. File based: <<<<2nd failure with integer overflow, test aborts here unless var 'k' is changed
- Direct access: 5 assertions passed
- TSQLTableJSON: 20030 assertions passed
- TSQLRestClientDB: 16072 assertions passed
Total failed: 0 / 36107 - File based PASSED
2.3. File based WAL:
- Direct access: 5 assertions passed
- TSQLTableJSON: 20030 assertions passed
- TSQLRestClientDB: 16072 assertions passed
Total failed: 0 / 36107 - File based WAL PASSED
2.4. Memory based:
- Direct access: 4 assertions passed
- TSQLTableJSON: 20030 assertions passed
- TSQLRestClientDB: 82143 assertions passed
Total failed: 0 / 102177 - Memory based PASSED
2.5. Client server access:
- TSQLite3HttpServer: 3 assertions passed
! - TSQLite3HttpClient: 1 / 1 FAILED
! - Http client keep alive: 2 / 2 FAILED
first in 951us,
! - Http client multi connect: 2 / 2 FAILED
first in 872us,
- Named pipe access: 3003 assertions passed
first in 83.75ms, done in 223.15ms i.e. 4481/s, average 223us
- Local window messages: 3002 assertions passed
first in 199us, done in 91.80ms i.e. 10893/s, average 91us
- Direct in process access: 3001 assertions passed
first in 51us, done in 45.00ms i.e. 22218/s, average 45us
Total failed: 5 / 9014 - Client server access FAILED
Synopse framework used: 1.8
SQlite3 engine used: 3.7.0
Generated with: Delphi 2010 compiler
Time elapsed for all tests: 10.07s
Tests performed at 8/14/2010 11:30:17 PM
Total assertions failed for all test suits: 5 / 400503
! Some tests FAILED: please correct the code.
Done - Press ENTER to Exit
Last edited by CodeMonkey (2010-08-15 06:47:11)
Offline
You MUST set range checking OFF for using the framework.
Some low-level optimization rely of range checking being OFF, because it access sometimes the trailing #0 in a string, for example, or access to some memory mapped data (in SynZip e.g.). This is not allowed by range checking, but it's 100% correct from the CPU point of view.
So set range checking OFF in your project properties, and everything will be OK. There will be no GPF or overflow problem, and the code will be much faster.
Online
Still getting 'Integer overflow' exception.
Sqlite3.pas
line 1612
procedure CreateSQLEncryptTableBytes()
If you change var k from Integer to Int64 the Integer overflow exception goes away
and you can run the program with the range checking OFF.
Last edited by CodeMonkey (2010-08-16 17:58:04)
Offline
I usually compile the framework with Delphi 2010, and never got this exception.
I really don't know why you can have such an "Integer overflow" with range checking OFF.
I suspect a full "build" of the project must be made.
The code is definitively correct, and overflow in k := k*3+i line is exactly what we want to.
We need random data. And overflow will help randomizing.
Online
Ah - found the problem. "Overflow checking" must be turned off as well.
Thanks for the help.
Offline