Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: access violation from stored procedure executed in a timer



Permlink Replies: 8 - Last Post: Sep 28, 2014 11:45 PM Last Post By: Dmitry Arefiev
giuseppe magistro

Posts: 69
Registered: 2/21/05
access violation from stored procedure executed in a timer
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 18, 2014 11:19 PM
hi all,

i use xe6 , firemonkey application , firedac connected to a datasnap server via tcp-ip.

i moved my application from dbx to firedac and i have a simple stored procedure connected to a datasnap function :

dmod.leggi_tutto.ParamByName('id_sito').asinteger := id_sito;
dmod.leggi_tutto.Execute; <——- crash here
app:= dmod.leggi_tutto.ParamByName(‘ReturnValue').asString;

the stored procedure cause an access violation error :

First chance exception at $004054C5. Exception class $C0000005 with message 'access violation at 0x004054c5: read of address 0x0031002c'. Process AF2.exe (3448)

this stored procedure is inside a timer in the main form and the timer value is 60 seconds.

any idea ?

thanks in advance

Beppe
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: access violation from stored procedure executed in a timer
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 20, 2014 8:50 AM   in response to: giuseppe magistro in response to: giuseppe magistro
Sorry, but this is not helpful. At least provide the call stack for the exception.
Ideally, try to provide a simple test application reproducing the issue.

--
With best regards,
Dmitry Arefiev / FireDAC Architect
giuseppe magistro

Posts: 69
Registered: 2/21/05
Re: access violation from stored procedure executed in a timer
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 21, 2014 2:32 AM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Dmitry Arefiev wrote:
Sorry, but this is not helpful. At least provide the call stack for the exception.
Ideally, try to provide a simple test application reproducing the issue.

--
With best regards,
Dmitry Arefiev / FireDAC Architect

ho , i will try in xe7 too and i will give you feedback.

thanks

beppe

giuseppe magistro

Posts: 69
Registered: 2/21/05
Re: access violation from stored procedure executed in a timer
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 23, 2014 11:30 AM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Dmitry Arefiev wrote:
Sorry, but this is not helpful. At least provide the call stack for the exception.
Ideally, try to provide a simple test application reproducing the issue.

--
With best regards,
Dmitry Arefiev / FireDAC Architect

Hi Dmitry ,

i tried with xe7 and the result is the same , here the call stack on xe7 :

main.lettura_dati
main.Tf_main.libero($54241E0,True)
FMX.Forms.TApplication.DoIdle(True)
FMX.Forms.TApplication.Idle
FMX.Forms.TApplication.HandleMessage
FMX.Platform.Win.TPlatformWin.Run
FMX.Forms.TApplication.Run
AF2.AF2
+:76ee919f KERNEL32.BaseThreadInitThunk + 0xe+
+:777fa22b ntdll.RtlInitializeExceptionChain + 0x84+
+:777fa201 ntdll.RtlInitializeExceptionChain + 0x5a+

kind regards

Beppe

Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: access violation from stored procedure executed in a timer
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 24, 2014 12:18 AM   in response to: giuseppe magistro in response to: giuseppe magistro
i tried with xe7 and the result is the same , here the call stack on xe7 :

If this is the full call stack, then I will recommend to check:
1) the objects in top two lines for existance.
2) If the stored procedure returns a result set and it is connected to GUI,
then try to execute the stored procedure disconnected from GUI.

--
With best regards,
Dmitry Arefiev / FireDAC Architect
giuseppe magistro

Posts: 69
Registered: 2/21/05
Re: access violation from stored procedure executed in a timer
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 24, 2014 3:06 AM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Dmitry Arefiev wrote:
i tried with xe7 and the result is the same , here the call stack on xe7 :

If this is the full call stack, then I will recommend to check:
1) the objects in top two lines for existance.

they exixts

2) If the stored procedure returns a result set and it is connected to GUI,
then try to execute the stored procedure disconnected from GUI.

the parameters in and out are global variables , the input one is an integer the output is a string.

beppe


--
With best regards,
Dmitry Arefiev / FireDAC Architect
Herman vanRuite...

Posts: 31
Registered: 12/6/02
Re: access violation from stored procedure executed in a timer
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 25, 2014 10:24 AM   in response to: giuseppe magistro in response to: giuseppe magistro
I could be very wrong here but is it possible that the timer timeout is
triggered in another thread, if so another connection is needed.

Regards
Herman

giuseppe magistro schreef op 19-9-2014 om 8:19:
hi all,

i use xe6 , firemonkey application , firedac connected to a datasnap server via tcp-ip.

i moved my application from dbx to firedac and i have a simple stored procedure connected to a datasnap function :

dmod.leggi_tutto.ParamByName('id_sito').asinteger := id_sito;
dmod.leggi_tutto.Execute; <——- crash here
app:= dmod.leggi_tutto.ParamByName(‘ReturnValue').asString;

the stored procedure cause an access violation error :

First chance exception at $004054C5. Exception class $C0000005 with message 'access violation at 0x004054c5: read of address 0x0031002c'. Process AF2.exe (3448)

this stored procedure is inside a timer in the main form and the timer value is 60 seconds.

any idea ?

thanks in advance

Beppe
giuseppe magistro

Posts: 69
Registered: 2/21/05
Re: access violation from stored procedure executed in a timer
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 27, 2014 4:45 AM   in response to: Herman vanRuite... in response to: Herman vanRuite...
Herman vanRuitenbeek wrote:
I could be very wrong here but is it possible that the timer timeout is
triggered in another thread, if so another connection is needed.

Regards
Herman

giuseppe magistro schreef op 19-9-2014 om 8:19:
hi all,

i use xe6 , firemonkey application , firedac connected to a datasnap server via tcp-ip.

i moved my application from dbx to firedac and i have a simple stored procedure connected to a datasnap function :

dmod.leggi_tutto.ParamByName('id_sito').asinteger := id_sito;
dmod.leggi_tutto.Execute; <——- crash here
app:= dmod.leggi_tutto.ParamByName(‘ReturnValue').asString;

the stored procedure cause an access violation error :

First chance exception at $004054C5. Exception class $C0000005 with message 'access violation at 0x004054c5: read of address 0x0031002c'. Process AF2.exe (3448)

this stored procedure is inside a timer in the main form and the timer value is 60 seconds.

any idea ?

thanks in advance

Beppe

could be an idea , i will try it .

the same application with dbexpress do not have errors ....

thanks beppe
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: access violation from stored procedure executed in a timer
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 28, 2014 11:45 PM   in response to: giuseppe magistro in response to: giuseppe magistro
One more question - do you have non-default ResourceOptions.CmdExecMode and CmdExecTimeout values ?
If yes, then try to set them to default values.

--
With best regards,
Dmitry Arefiev / FireDAC Architect
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02