You are not logged in.
Pages: 1
@mpv @ab Still is same situation with new trunk
@ab Yes, i believe that is issue with FPC
-------------
I updated FPC with Revision 38393, but same situation.
Yes, for cloud, I would definitively use FPC + Linux x86_64 which is now stable enough for production.
If you can afford to pay the huge money for Windows cloud hosting, I guess you can either just use FPC + Win32 (which works fine), or afford to pay for Delphi Win64 compiler...Anyway, for our problem, I don't see any easy way to circumvent this general exception issue.
For mORMotMVC, what we may do is add a new way of redirection.
For instance, we may add a new threadvar in which we put the exception to be raised, outside of the TServiceMethodExecute.RawExecute() scope.
I'm Delphi (android, c, openwrt, etc.) programmer and working for some company... But i planing in future some my service, and of course i prefer Linux 64. MVC, mustache and others is new for me.. i'm still in phase studding..
I doing test with "Webserver Stress Tool" on sample "MVC Server" and results are impressive. I will be here to report if have any issue in future , and ask about SQL, non-SQL (what is the best for reading, what is the best for writing,
possibles to combine, what can work in memory, etc) .. etc...
Again, have nice day
The weirdest is that it works under Linux x86-64 (I just ensure this) with FPC.
(it is also reassuring for me, since FPC + Linux 64bit is a platform with premium importance for use - whereas FPC + Win64 was never one since the Delphi version works with no problem)So I guess that there is some low-level exception unwinding problem specifically with FPC on Win64.
Sounds more than a FPC bug/limitation than a mORMot bug to me.I don't see any way of circumventing the problem easily.
Conclusion ... if i want build MVC server, for cloud.. whatever... because of cost, Lazarus and FPC is free, for win just 32 bit, but for linux can both 32 and 64 bit?
In future if i find any issue, i will report you .. thanks for your time and your answers
Have nice day
I've enabled the logs, built with debug information, then the logs shows on FPC / Win64:
2/25/2018 14:38:50.608 Exception EMVCApplication {"Message":"Error=404"} at $00000001001C1E02 ARTICLEVIEW, line 337 of MVCViewModel.pas 2/25/2018 14:38:50.624 Exception OS EExternalException (C0000005) at $00000001000F5725 RAWEXECUTE, line 60856 of ../../mORMot.pas
But in fact, the error happens when the exception is raised in the low-level CallMethod() function.
Sounds like if the exception is not propagated by FPC outside this function.So the try..finally in TServiceMethodExecute.RawExecute() is not working as expected.
What is weird is that it works just fine on Win32.
On Win64, it also works when compiled with Delphi, but not when compiled with FPC.
So what is solution?
Logs are already disabled for this sample by default.
I was able to reproduce the problem, and will try to find out the cause.
There is no problem on Win64 when compiled with Delphi - so it is a FPC-specific issue.
I doing next test... remove dir "Views" , and in this case 64 bit app work correct , because "raise" is from mORMotMVC.pas
From some reason "raise" from MVCViewModel.pas not work well
More inf. -
Try to disable exception logging.
Also ensure you use the latest revision of the framework - current is 1.18.4340.
I'm newby with Lazarus and mORMot, so exactly where i can disable exception logging?
Yes.. i use latest version framework from github.
I using fpcupdeluxe with cross compiler for win (32 and 64 bit).. convert Delphi project to Lazarus... 32 works well, correct handle raise exception, but 64 bit build not
From some reason 64 build doesn't correct handle raise exception in MVCViewModel.pas, and for result app was crashed.
I hope I gave you enough informations for fix
What do you call "crashed"?
This is not a crash, but an expected EMVCApplication exception.
The workflow should continue as expected, intercepting the exception and redirecting the HTTP client into the "404 not found" error page.I guess this is more about a Lazarus/GDB problem/limitation/bug when dealing with exceptions.
Run it outside the debugger, and check the logs and the behavior of the server.
I said, 32-bit build works fine and produces a 404 error page, while the 64-bit build is crashing.
Hi, i'm Milan and i'm new with Synapse mORMot,
I tried use sample "30 - MVC Server" with Lazarus 1.9 and FPC 3.1.1 with 64-bit build, win7 x64... on first look all works well, but when I navigate to a nonexistent link e.g "http://localhost:8092/blog/articleView?id=100009999",
MVC app crashed. In debug :
Then "Break", "Continue"
And finall app was crashed...
32-bit app works well without problems.
Pages: 1