You are not logged in.
Pages: 1
I wrote a REST server. Everything works fine, but the performance in the threads is low. I changed the memory manager from FastMM to ScaleMM and now performance is high, but I have a new problem. When I close the application I get the AV:
Error raise this code (after press F8):
Callstack:
mORMot.JSONObject(TClass($649B740),-1,[cpWrite])
mORMot.TJSONSerializer.WriteObject($649B700,[woFullExpand])
mORMot.TJSONSerializer.WriteObject($649BC00,[woFullExpand])
SynCommons.TTextWriter.Add((105495552, False, #0, $649BC00, $649BC00 {':ź'#0#0'·I'#6#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'ŕąI'#6'ŕ–Ş'#3'”yj'#0#0#0#0#0'PŞ2'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0}, $649BC00, '|:ź', $649BC00, TClass($649BC00), '?', '?'#$009F'??', $649BC00, $649BC00, $649BC00, $649BC00, $649BC00, $649BC00, $649BC00, 105495552, 7),twOnSameLine)
SynCommons.TTextWriter.Add('%.Destroy -> %',(...),twOnSameLine)
SynLog.TSynLog.LogInternal(sllInfo,'%.Destroy -> %',(...),nil)
SynLog.TSynLog.Log(sllInfo,'%.Destroy -> %',(...),nil)
mORMot.TSQLRest.Destroy
best regards
Offline
The error is raised during accessing the RTTI.
Since this RTTI is not computed by the framework, but generated by the compiler, this RTTI should by itself be immutable, and would not be affected by multi thread issues.
We run the full set of regression tests with FastMM4 in FullDebugMode, without any reported issue so far - so I guess the problem may not be in the framework itself, but how it is used.
So the problem may be in the application code itself, not in the framework itself.
The problem comes from an invalid object pointer, probably a class instance still accessed in your code after a call to Free.
1) Which version of ScaleMM are you using?
2) How did you protect your code from concurrent issues with multi threading?
3) Run the application with FastMM4 in FullDebugMode, to track potential invalid memory access, i.e. any class instance still accessed in your code after a call to Free.
Offline
After few hours debugging... yes, you are right! :-)
I destroyed TSQLModel before TSQLRestServer which used it!
But why at FastMM I had no error? It was set to full debug mode. This is magic ;-)
ps. I use ScaleMM3 (not stable version 2).
ps. SynScaleMM is ready/stable and I can use it?
thx for support
best regards
Offline
Pages: 1