I use the same tests every time.
- create a database file, create a in-memory database, read the created database file.
- create tables, selects, vies, triggers, indices
- math calculations
- Blobs, reading files and save them to the database.
I use my image and pdf folder. So I can create a big DB over 500GB. *flex*
But since Version 6 I have a couple of problems and I can't break it down to a minimized code because I don't understand the problems.
- The executable started with the debugger stopped unexpected.
I find out that if a memory error accurses, the app died. The problem is, I can't figure out why and where. I use the purifier, but this does not work for C-Code and every PB Version brings Memory-Errors on various places. Sometimes in Maps, sometimes in Lists, sometimes in Files. It is super strange. - When I read a pdf file over 1 MB sometimes the LOF and FileSize gives a negative value. I don't mean a -1 or -2. I mean something like -93469023493
This happens also when i use PeekQ. sometimes it gives me a negative number in a range from 100000000 - 900000000. But I can't make a minimalistic test to show. - I have a Structure:
This structure is not special. But when I use writeData and readData, the data sometimes are different in the file or in the memory. It happens really often that the positionEnde is negative or much bigger or negative than, when I write them.
Code: Select all
#STR_ALIGN = #PB_Structure_AlignC Structure strRoot Align #STR_ALIGN type.b status.b positionStart.q positionEnde.q id.q created.q modified.q version.q seed.q EndStructure - the FileSeek position sometimes changes without doing a read, write or seek. This happend often for files bigger than 200KB
- I use a lot
And sometimes the *pos\q changed to negative.
Code: Select all
Global T_S_FLOAT=SizeOf(Float) Procedure _poke_float(*pos.Quad,value.f,*buffer) PokeF(*buffer+*pos\q,value):*pos\q+T_S_FLOAT EndProcedure Procedure.f _peek_float(*pos.Quad,*buffer) Protected result.f=PeekF(*buffer+*pos\q) *pos\q+T_S_FLOAT ProcedureReturn Result EndProcedure - I use the T_S_FLOAT because sometimes the SizeOf gives different values to. I don't know why. But it happens sometimes at structures.
- I create a DLL with my DB. With PB 5.73 everything is cool. But since 6 something strange happend.
dbRead is -1 and so it raises an error, cause the handle does not exist.
Code: Select all
file.s = "Testdb.dat" Protected dbLeer=CallFunction(lib,"UltraDB_openDB",0) Protected dbFile=CallFunction(lib,"UltraDB_openDB",@file) Protected dbRead=CallFunction(lib,"UltraDB_readDB",@file) CallFunction(lib,"UltraDB_closeDB",dbLeer) CallFunction(lib,"UltraDB_closeDB",dbFile) CallFunction(lib,"UltraDB_closeDB",dbRead) ; Error cause of dbRead = -1
The different between readDB and openDB is, I set a readonly value to the structure type. And yes, it's the same methode.
My Database is transactional and multi-threaded. In 5.73 it workes like a charm.
My first guess was my AV, but this is fine. To be save, I tested it with Linux (xubuntu) and Windows 10/11. Everywhere the same "problems".
My second guess was, I use A LOT quads... I like them and Integer are to small for big DBs and sequences. Maybe there is a problem with that. I thought to change ever quad to a double but that sounds like a really bad Idea.


