You are not logged in.
Pages: 1
Hello,
I've just started using mORMot, and it was working fine, but all of a sudden I started getting access violations when opening the SQLite database and the program just quits.
If I turn off WithLog it works fine. The problem seems to be that the Family class function in TSynLog is returning null, and not creating a Family. I tried putting a breakpoint, but that class function never gets called. Then when Family.SynLog gets called, the CreateSynLog fails because self is null.
Any help would be appreciated.
Thanks,
Mike
Offline
What did you do to have TSynLog.Family returning nil?
What is the stack trace?
You need to have a class assigned to the log variable globals. Don't mess with putting nil in them, e.g. in SynSQLite3Log.
Just leave the default settings.
If you don't want to have any log, tune the levels set.
Offline
Hello,
Thanks for your quick reply. I've been really busy this week.
I'm not sure what I could have done to have TSynLog.Family return nil. I was just describing what was happening. I'm not I did not mess with any of the settings and I am not setting anything to nil. They were all left at the default settings.
The problem happens in the second line of TSynLog.Enter. Family.Synlog does not seem to be returning a valid value and on the next line and AV is raised.
Here is the call stack:
SynLog.TSynLog.Enter('DBOpen %',(...),$2F6E800)
SynSQLite3.TSQLDatabase.DBOpen
SynSQLite3.TSQLDatabase.Create('<PathToDB>Database..DB','',0,10000,4096)
mORMotSQLite3.TSQLRestServerDB.Create($2F25880,'<PathToDB>Database..DB',False,'',10000,4096)
mORMotSQLite3.TSQLRestServerDB.CreateWithOwnModel((...),'<PathToDB>Database..DB',False,'root','',10000,4096)
uOrmServer.TORMServer.CreateServer('<PathToDB>Database.DB')
uOrmServer.TORMServer.SetDirectory('<PathToDB>')
uOrmServer.TORMServer.CreateWithDirectory($2E71520,'<PathToDB>')
Thanks,
Mike
Offline
Delphi 10.3 Update 2
Offline
Pages: 1