#1 2020-04-27 15:01:07

talexone
Member
Registered: 2013-08-21
Posts: 23

30-MVC Server crashes on redirection with FPC

Hi,
Sample starting well, I can access all views, but can't get 404 page, instead got an error  "raised exception class 'Exception: ?'" and the apps stops.

Steps to reproduce:
- Start sample and open "http://localhost:8092/blog/default"
- go to the article "http://localhost:8092/blog/articleView?id=10000"
- replace article id to get 404 error ex. "http://localhost:8092/blog/articleView?id=10001"

Error comes after "raise EMVCApplication.CreateGotoError(HTTP_NOTFOUND)", same with "raise EMVCApplication.CreateGotoView..."

No issues with Delphi.

OS: Win10x64
FPC: 3.2.0rc1
Laz: 2.1.0


Regards,
AT

Offline

#2 2020-04-27 15:20:31

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,682
Website

Re: 30-MVC Server crashes on redirection with FPC

I am not able to reproduce...


With http://localhost:8092/blog/articleView?id=3550

I got:

Error Page
Low-level #404 Error occurred with the following message:

HTTP Error 404 - Not Found
Error context:

{
	"Msg": "HTTP Error 404 - Not Found",
	"Scope": null,
	"main": {
		"pageName": "Error",
		"blog": {
			"Title": "Synopse Blog",
			"Language": "en",

What is the exact target you use?
Win32 or Win64?

Offline

#3 2020-04-27 16:23:02

talexone
Member
Registered: 2013-08-21
Posts: 23

Re: 30-MVC Server crashes on redirection with FPC

ab wrote:

What is the exact target you use?
Win32 or Win64?

Target: Win64
Mormot: 1.18 (github master)

Offline

#4 2020-04-27 18:27:15

macfly
Member
From: Brasil
Registered: 2016-08-20
Posts: 374

Re: 30-MVC Server crashes on redirection with FPC

I have same error where.

Lazarus 2.1.0 + FPC 3.3.1

And Lazarus 2.0.7 + FPC 3.2

Target: Win64
Mormot: Last in git

From what I could see he stopped at the TServiceMethodExecute.RawExecute method in mORMot.pas

More specifically on the line 60356 (CallMethod(call);)

Offline

#5 2020-04-28 13:02:01

talexone
Member
Registered: 2013-08-21
Posts: 23

Re: 30-MVC Server crashes on redirection with FPC

I have tested on two VMs Win10 and Ubuntu18.04, same error on Win10 with fpcupdeluxe fresh install(trunk 40491 and 59757), but no problem with Ubuntu.

Seems to be a windows problem.

Tested on windows with target: Win32/i386, no errors.

Last edited by talexone (2020-04-28 15:53:55)

Offline

#6 2020-04-28 20:50:48

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,682
Website

Re: 30-MVC Server crashes on redirection with FPC

OK so this is a Win64 specific problem.

Offline

#7 2020-04-28 21:06:03

macfly
Member
From: Brasil
Registered: 2016-08-20
Posts: 374

Re: 30-MVC Server crashes on redirection with FPC

I Have also a problem with TSynDaemon.

The Start method of TSynDaemon are not called, but show the success info in console.
The Stop method are always Executed.

When debugging throws an Exception, which I was unable to trace the source


But start on Linux CentOs.

Last edited by macfly (2020-04-28 21:08:46)

Offline

#8 2020-04-29 00:38:35

macfly
Member
From: Brasil
Registered: 2016-08-20
Posts: 374

Re: 30-MVC Server crashes on redirection with FPC

Perhaps this is a clue, when trying to run or stop a daemon the logs generate a series of Disk FULL errors.

I'm running as an administrator, it shouldn't be a lack of permission.

Maybe something related to threads? TSynLog generating write competition on the file?

20200428 23420639  !  +    mORMot.TSQLRestServerFullMemory(05a300d0).Shutdown() v1 CurrentRequestCount=0
20200428 23420639  !  -    00.008.336
20200428 23420639  ! info  mORMot.TSQLRestServerFullMemory(05a300d0) TSQLRest.Destroy v1
20200428 23420639  ! EXCOS EExternalException (c0000005) [] at   $000000010000B308
20200428 23420659  ! EXC   EInOutError ("Disk Full") [] at   $00000001000222D7
20200428 23420711  ! EXC   EInOutError ("Disk Full") [] at   $00000001000222D7

... Dozens of other lines with same error

Stpes to reproduce:

Compile Install and Strart the Daemon generated by "37 - FishShop Service" sample.

Lazarus + FPC3.2 / Lazarus + FPC 3.31

Win64

Offline

Board footer

Powered by FluxBB