Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-16 Thread Julio Jiménez
2016-01-16 7:57 GMT+01:00 Martin Schreiber :

>
> I had to change the AV fix because of a sideeffect (git master
> 5b3fb47142de6896e78ee6e7ca9e35621a15348a). Please retest.
>
>
Test ok.

Thanks.


-- 
Julio Jiménez Borreguero
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Martin Schreiber
On Friday 15 January 2016 13:33:22 Julio Jiménez wrote:
> 2016-01-15 13:22 GMT+01:00 Martin Schreiber :
> > Please call tfbservice.cancel() if you don't want to close the
> > connection. "tfbservice.connected:= false" stops the service for me. What
> > means "the program hangs"? In "tfbservice.connected:= false"? Please send
> > the updated test program.
>
> The program hangs means it stops responding... frozen Have to kill it.
>
But where? Please try 'Target'-'Interrupt'.

> BTW, for testing if a service is running what's the way,  busy function?
>
Yes, tfbservice.busy() returns true if a service is running on the connection.

Martin

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Julio Jiménez
2016-01-15 13:22 GMT+01:00 Martin Schreiber :

>
> >
> Please call tfbservice.cancel() if you don't want to close the connection.
>
>

using tfbservice.cancel also hangs the program.. (stop responding, no
windows refresh...it shows the wallpaper inside the window..


-- 
Julio Jiménez Borreguero
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Martin Schreiber
On Friday 15 January 2016 10:52:18 Julio Jiménez wrote:
>
> Funny with Sourceforge... tried to send the example file: Backup.zip and
> rejected the message:
>
> The error that the other server returned was:
> 550 Blacklisted file extension detected
>
I don't know why, I found no such setting in mailinglist setup.
>
> 2016-01-15 10:41 GMT+01:00 Martin Schreiber :
> > Can you send your test project?
>
> Of course.
>
> > > May be I'm doing something wrong because I guess you have tested it at
> > > first.
> >
> > Yes, it works for me.
>
> The test is under fpc 3.0.1. i386

"
procedure tmainfo.leertexto(const sender: tfbservice; const atext: msestring);
begin
 tstringgrid1[0].datalist.addchars(atext);
 tstringgrid1.showlastrow();
end;

procedure tmainfo.dobackup(const sender: TObject);
begin
 // hostname, username and password have been set in design mode
 tfbservice1.connected:= true;
{procedure backupstart(const dbname: msestring;
  const backupfiles: array of msestring; const lengths: array of 
card32;
 //bytes, none for last file
  const verbose: boolean = false; const stat: string = '';
 //stat for FB 2.5.5 only, 1..4 chars, valid chars = T|D|R|W
  const aoptions: backupoptionsty = []; const factor: card32 = 0);}
tfbservice1.backupstart('gestv', ['/tmp/micopia.fbk'], 

[],    empty, not 0
 true, '', [bao_ignorelimbo]);


 //tfbservice1.nbakstart('gestv', '/tmp/micopia.fbk', 0, 
[nbo_notriggers], 'on'); // 0 full backup
// tfbservice1.connected:= false; -
"
The backup runs in a separate thread, connected:= false cancels the operation.
"
// showmessage('Done');   -
"
Use "onasyncend"
"
end;

procedure tmainfo.asyncend(const sender: tfbservice; const aborted: Boolean);
begin
 showmessage('Done');
end;
"

The AV by cancelling a failed service has been fixed in git master 
d562504ef0d02eef9787408c96bf2bc0ac7f7f00.

Martin

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Julio Jiménez
I forgot to say the last BT was using tfbservice.cancel().

Using tfbservice.connected:= false

I get:

#0  B7FDCCB0 :0 ??()
#1  0810CC9D msethread.pas:300 TMSETHREAD__WAITFOR(this=)
#2  080FB25D mseapplication.pas:1371
TCUSTOMAPPLICATION__WAITFORTHREAD(ATHREAD=0xb7c32140, this=)
#3  0824410D msefbservice.pas:520 TFBSERVICEMONITOR__DESTROY(vmt=0x1,
this=)
#4  0805CF92 :0 SYSTEM$_$TOBJECT_$__$$_FREE()
#5  080DAD4F :0 SYSUTILS_$$_FREEANDNIL$formal()
#6  08244D8B msefbservice.pas:811 TFBSERVICE__DISCONNECT(this=)
#7  08244ACA msefbservice.pas:743 TFBSERVICE__SETCONNECTED(AVALUE=false,
this=)
#8  08093DBD main.pas:61 TMAINFO__DOCANCELAR(SENDER=0xb7c525b0, this=)
#9  080EA19C mseact.pas:421 DOACTIONEXECUTE1(SENDER=0xb7c525b0,
INFO={ACTION = 0x0, CAPTIONTEXT = 0xb7c42b0c 'Stop service', CAPTION1 =
{TEXT = 0xb7c42b6c 'Stop service', FORMAT = 0x0, FLAGS = []}, STATE =
[AS_LOCALCAPTION, AS_LOCALONEXECUTE], OPTIONS = [], SHORTCUT = 0x0,
SHORTCUT1 = 0x0, GROUP = 0, IMAGENR = -1, IMAGENRDISABLED = -2, COLORGLYPH
= 2147483649, COLOR = 2147483649, IMAGECHECKEDOFFSET = 0, IMAGELIST = 0x0,
HINT = 0x0, TAG = 0, TAGPOINTER = 0x0, ONEXECUTE = 0x8093da0
, ONBEFOREEXECUTE = 0x0, ONAFTEREXECUTE = 0x0},
CHANGED=false, NOCHECKBOX=false, NOCANDEFOCUS=false, BEFOREEXECUTE=0x0)
#10  080EA21C mseact.pas:440 DOACTIONEXECUTE(SENDER=0xb7c525b0,
INFO={ACTION = 0x0, CAPTIONTEXT = 0xb7c42b0c 'Stop service', CAPTION1 =
{TEXT = 0xb7c42b6c 'Stop service', FORMAT = 0x0, FLAGS = []}, STATE =
[AS_LOCALCAPTION, AS_LOCALONEXECUTE], OPTIONS = [], SHORTCUT = 0x0,
SHORTCUT1 = 0x0, GROUP = 0, IMAGENR = -1, IMAGENRDISABLED = -2, COLORGLYPH
= 2147483649, COLOR = 2147483649, IMAGECHECKEDOFFSET = 0, IMAGELIST = 0x0,
HINT = 0x0, TAG = 0, TAGPOINTER = 0x0, ONEXECUTE = 0x8093da0
, ONBEFOREEXECUTE = 0x0, ONAFTEREXECUTE = 0x0},
NOCHECKBOX=false, NOCANDEFOCUS=false, BEFOREEXECUTE=0x0)
#11  081F195A msesimplewidgets.pas:869 TCUSTOMBUTTON__DOEXECUTE(this=)
#12  0818345D msewidgets.pas:2182
TACTIONSIMPLEBUTTON__INTERNALEXECUTE(this=)
#13  08183478 msewidgets.pas:2189
TACTIONSIMPLEBUTTON__DOSHAPEEXECUTE(ATAG=0, INFO={EVENTKIND =
EK_BUTTONRELEASE, SHIFTSTATE = [], POS = {X = 95, Y = 11}, EVENTSTATE =
[ES_CLIENT], TIMESTAMP = 2484766112, BUTTON = MB_LEFT}, this=)
#14  081A3BA5 mseshapes.pas:437 UPDATEMOUSESHAPESTATE(INFO={CA = {DIM = {X
= 0, Y = 0, CX = 146, CY = 21, POS = {X = 0, Y = 0}, SIZE = {CX = 146, CY =
21}}, CAPTION = {TEXT = 0xb7c42b6c 'Stop service', FORMAT = 0x0, FLAGS =
[]}, FONT = 0xb7639260, TEXTFLAGS = [TF_XCENTERED, TF_YCENTERED], IMAGEPOS
= IP_CENTER, CAPTIONDIST = 2, IMAGENR = -1, COLORGLYPH = 2147483649,
IMAGELIST = 0x0, IMAGEDIST = 0, IMAGEDISTTOP = 0, IMAGEDISTBOTTOM = 0,
CAPTIONCLIPPED = false}, FOCUSRECTDIST = 1, STATE = [SHS_MOUSE,
SHS_SHOWFOCUSRECT..SHS_SHOWDEFAULTRECT], TABPOS = 0, GROUP = 0, COLOR =
2147483651, COLORACTIVE = 0, IMAGENRDISABLED = -2, IMAGECHECKEDOFFSET = 0,
FACE = 0x0, FRAME = 0x0, CHECKBOXFRAME = 0x0, MOUSEFRAME = {LEFT = 0, TOP =
0, RIGHT = 0, BOTTOM = 0, TOPLEFT = {CX = 0, CY = 0}, BOTTOMRIGHT = {CX =
0, CY = 0}}, TAG = 0, DOEXECUTE = 0x8183460
}, MOUSEEVENT={EVENTKIND =
EK_BUTTONRELEASE, SHIFTSTATE = [], POS = {X = 95, Y = 11}, EVENTSTATE =
[ES_CLIENT], TIMESTAMP = 2484766112, BUTTON = MB_LEFT}, WIDGET=0xb7c525b0,
AFRAME=0x0, INFOARPO=0x0, CANCLICK=true)
#15  08183516 msewidgets.pas:2203
TACTIONSIMPLEBUTTON__CLIENTMOUSEEVENT(INFO={EVENTKIND = EK_BUTTONRELEASE,
SHIFTSTATE = [], POS = {X = 95, Y = 11}, EVENTSTATE = [ES_CLIENT],
TIMESTAMP = 2484766112, BUTTON = MB_LEFT}, this=)
#16  0807E0A9 msegui.pas:10168 DOCLIENTMOUSEEVENT(parentfp=0xbfffef44)
#17  0807DF68 msegui.pas:10285 TWIDGET__MOUSEEVENT(INFO={EVENTKIND =
EK_BUTTONRELEASE, SHIFTSTATE = [], POS = {X = 95, Y = 11}, EVENTSTATE =
[ES_CLIENT], TIMESTAMP = 2484766112, BUTTON = MB_LEFT}, this=)
#18  0818A318 msewidgets.pas:5089 TACTIONWIDGET__MOUSEEVENT(INFO={EVENTKIND
= EK_BUTTONRELEASE, SHIFTSTATE = [], POS = {X = 95, Y = 11}, EVENTSTATE =
[ES_CLIENT], TIMESTAMP = 2484766112, BUTTON = MB_LEFT}, this=)
#19  08088E15 msegui.pas:15067 TWINDOW__DISPATCHMOUSEEVENT(INFO={MOUSE =
{EVENTKIND = EK_BUTTONRELEASE, SHIFTSTATE = [], POS = {X = 95, Y = 11},
EVENTSTATE = [ES_CLIENT], TIMESTAMP = 2484766112, BUTTON = MB_LEFT}, WHEEL
= {EVENTKIND = EK_BUTTONRELEASE, SHIFTSTATE = [], POS = {X = 95, Y = 11},
EVENTSTATE = [ES_CLIENT], TIMESTAMP = 2484766112, WHEEL = MW_UP, DELTA =
0}}, CAPTURE=0xb7c525b0, this=)
#20  0808CE09 msegui.pas:16814
TINTERNALAPPLICATION__PROCESSMOUSEEVENT(EVENT=0xb7c429b0, this=)
#21  0808ED99 msegui.pas:17773 TINTERNALAPPLICATION__EVENTLOOP(ONCE=false,
this=)
#22  08090308 msegui.pas:18443
TINTERNALAPPLICATION__DOEVENTLOOP(ONCE=false, this=)
#23  080FBAE6 mseapplication.pas:1619 TCUSTOMAPPLICATION__RUN(this=)
#24  0804BFBF backup.pas:11 main()


-- 
Julio Jiménez Borreguero
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App 

Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Julio Jiménez
2016-01-15 13:42 GMT+01:00 Martin Schreiber :

> On Friday 15 January 2016 13:33:22 Julio Jiménez wrote:
> > 2016-01-15 13:22 GMT+01:00 Martin Schreiber :
> > > Please call tfbservice.cancel() if you don't want to close the
> > > connection. "tfbservice.connected:= false" stops the service for me.
> What
> > > means "the program hangs"? In "tfbservice.connected:= false"? Please
> send
> > > the updated test program.
> >
> > The program hangs means it stops responding... frozen Have to kill
> it.
> >
> But where? Please try 'Target'-'Interrupt'.
>

To reproduce, press Restore button then while restoring.. press Stop
service button

#0  B7FDCCB0 :0 ??()
#1  0810CC9D msethread.pas:300 TMSETHREAD__WAITFOR(this=)
#2  080FB25D mseapplication.pas:1371
TCUSTOMAPPLICATION__WAITFORTHREAD(ATHREAD=0xb7c32140, this=)
#3  0824410D msefbservice.pas:520 TFBSERVICEMONITOR__DESTROY(vmt=0x1,
this=)
#4  0805CF92 :0 SYSTEM$_$TOBJECT_$__$$_FREE()
#5  080DAD4F :0 SYSUTILS_$$_FREEANDNIL$formal()
#6  08244A18 msefbservice.pas:716 TFBSERVICE__CANCEL(this=)
#7  08093DBB main.pas:62 TMAINFO__DOCANCELAR(SENDER=0xb7c525b0, this=)
#8  080EA19C mseact.pas:421 DOACTIONEXECUTE1(SENDER=0xb7c525b0,
INFO={ACTION = 0x0, CAPTIONTEXT = 0xb7c42b0c 'Stop service', CAPTION1 =
{TEXT = 0xb7c42b6c 'Stop service', FORMAT = 0x0, FLAGS = []}, STATE =
[AS_LOCALCAPTION, AS_LOCALONEXECUTE], OPTIONS = [], SHORTCUT = 0x0,
SHORTCUT1 = 0x0, GROUP = 0, IMAGENR = -1, IMAGENRDISABLED = -2, COLORGLYPH
= 2147483649, COLOR = 2147483649, IMAGECHECKEDOFFSET = 0, IMAGELIST = 0x0,
HINT = 0x0, TAG = 0, TAGPOINTER = 0x0, ONEXECUTE = 0x8093da0
, ONBEFOREEXECUTE = 0x0, ONAFTEREXECUTE = 0x0},
CHANGED=false, NOCHECKBOX=false, NOCANDEFOCUS=false, BEFOREEXECUTE=0x0)
#9  080EA21C mseact.pas:440 DOACTIONEXECUTE(SENDER=0xb7c525b0, INFO={ACTION
= 0x0, CAPTIONTEXT = 0xb7c42b0c 'Stop service', CAPTION1 = {TEXT =
0xb7c42b6c 'Stop service', FORMAT = 0x0, FLAGS = []}, STATE =
[AS_LOCALCAPTION, AS_LOCALONEXECUTE], OPTIONS = [], SHORTCUT = 0x0,
SHORTCUT1 = 0x0, GROUP = 0, IMAGENR = -1, IMAGENRDISABLED = -2, COLORGLYPH
= 2147483649, COLOR = 2147483649, IMAGECHECKEDOFFSET = 0, IMAGELIST = 0x0,
HINT = 0x0, TAG = 0, TAGPOINTER = 0x0, ONEXECUTE = 0x8093da0
, ONBEFOREEXECUTE = 0x0, ONAFTEREXECUTE = 0x0},
NOCHECKBOX=false, NOCANDEFOCUS=false, BEFOREEXECUTE=0x0)
#10  081F195A msesimplewidgets.pas:869 TCUSTOMBUTTON__DOEXECUTE(this=)
#11  0818345D msewidgets.pas:2182
TACTIONSIMPLEBUTTON__INTERNALEXECUTE(this=)
#12  08183478 msewidgets.pas:2189
TACTIONSIMPLEBUTTON__DOSHAPEEXECUTE(ATAG=0, INFO={EVENTKIND =
EK_BUTTONRELEASE, SHIFTSTATE = [], POS = {X = 85, Y = 12}, EVENTSTATE =
[ES_CLIENT], TIMESTAMP = 2186870112, BUTTON = MB_LEFT}, this=)
#13  081A3BA5 mseshapes.pas:437 UPDATEMOUSESHAPESTATE(INFO={CA = {DIM = {X
= 0, Y = 0, CX = 146, CY = 21, POS = {X = 0, Y = 0}, SIZE = {CX = 146, CY =
21}}, CAPTION = {TEXT = 0xb7c42b6c 'Stop service', FORMAT = 0x0, FLAGS =
[]}, FONT = 0xb7639260, TEXTFLAGS = [TF_XCENTERED, TF_YCENTERED], IMAGEPOS
= IP_CENTER, CAPTIONDIST = 2, IMAGENR = -1, COLORGLYPH = 2147483649,
IMAGELIST = 0x0, IMAGEDIST = 0, IMAGEDISTTOP = 0, IMAGEDISTBOTTOM = 0,
CAPTIONCLIPPED = false}, FOCUSRECTDIST = 1, STATE = [SHS_MOUSE,
SHS_SHOWFOCUSRECT..SHS_SHOWDEFAULTRECT], TABPOS = 0, GROUP = 0, COLOR =
2147483651, COLORACTIVE = 0, IMAGENRDISABLED = -2, IMAGECHECKEDOFFSET = 0,
FACE = 0x0, FRAME = 0x0, CHECKBOXFRAME = 0x0, MOUSEFRAME = {LEFT = 0, TOP =
0, RIGHT = 0, BOTTOM = 0, TOPLEFT = {CX = 0, CY = 0}, BOTTOMRIGHT = {CX =
0, CY = 0}}, TAG = 0, DOEXECUTE = 0x8183460
}, MOUSEEVENT={EVENTKIND =
EK_BUTTONRELEASE, SHIFTSTATE = [], POS = {X = 85, Y = 12}, EVENTSTATE =
[ES_CLIENT], TIMESTAMP = 2186870112, BUTTON = MB_LEFT}, WIDGET=0xb7c525b0,
AFRAME=0x0, INFOARPO=0x0, CANCLICK=true)
#14  08183516 msewidgets.pas:2203
TACTIONSIMPLEBUTTON__CLIENTMOUSEEVENT(INFO={EVENTKIND = EK_BUTTONRELEASE,
SHIFTSTATE = [], POS = {X = 85, Y = 12}, EVENTSTATE = [ES_CLIENT],
TIMESTAMP = 2186870112, BUTTON = MB_LEFT}, this=)
#15  0807E0A9 msegui.pas:10168 DOCLIENTMOUSEEVENT(parentfp=0xbfffef44)
#16  0807DF68 msegui.pas:10285 TWIDGET__MOUSEEVENT(INFO={EVENTKIND =
EK_BUTTONRELEASE, SHIFTSTATE = [], POS = {X = 85, Y = 12}, EVENTSTATE =
[ES_CLIENT], TIMESTAMP = 2186870112, BUTTON = MB_LEFT}, this=)
#17  0818A318 msewidgets.pas:5089 TACTIONWIDGET__MOUSEEVENT(INFO={EVENTKIND
= EK_BUTTONRELEASE, SHIFTSTATE = [], POS = {X = 85, Y = 12}, EVENTSTATE =
[ES_CLIENT], TIMESTAMP = 2186870112, BUTTON = MB_LEFT}, this=)
#18  08088E15 msegui.pas:15067 TWINDOW__DISPATCHMOUSEEVENT(INFO={MOUSE =
{EVENTKIND = EK_BUTTONRELEASE, SHIFTSTATE = [], POS = {X = 85, Y = 12},
EVENTSTATE = [ES_CLIENT], TIMESTAMP = 2186870112, BUTTON = MB_LEFT}, WHEEL
= {EVENTKIND = EK_BUTTONRELEASE, SHIFTSTATE = [], POS = {X = 85, Y = 12},
EVENTSTATE = [ES_CLIENT], TIMESTAMP = 2186870112, WHEEL = MW_UP, DELTA =
0}}, CAPTURE=0xb7c525b0, this=)
#19  0808CE09 msegui.pas:16814
TINTERNALAPPLICATION__PROCESSMOUSEEVENT(EVENT=0xb7c42b90, 

Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Martin Schreiber
On Friday 15 January 2016 13:48:35 Julio Jiménez wrote:
> I forgot to say the last BT was using tfbservice.cancel().
>
> Using tfbservice.connected:= false
>
> I get:
>
> #0  B7FDCCB0 :0 ??()
> #1  0810CC9D msethread.pas:300 TMSETHREAD__WAITFOR(this= variable>)
[...]

tfbservice.onasyncend does not run in main thread. The main thread is in a 
locked state, so it is possible to use the gui-elements of an application in 
onasyncend but because of a Windows restriction it is not possible to create 
windows which showmessage does -> deadlock. Because of consistency I 
implemented the restriction on Linux too.
Please use for example:
"
procedure tmainfo.dofinalizado(const sender: tfbservice;
   const aborted: Boolean);
begin
 guibeep();
// showmessage('Done...');
end;
"
I'll add an end event which runs in main thread.
Does nback work for you?

Martin

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Julio Jiménez
2016-01-15 11:43 GMT+01:00 Martin Schreiber :

> On Friday 15 January 2016 10:52:18 Julio Jiménez wrote:
> >
> > Funny with Sourceforge... tried to send the example file: Backup.zip and
> > rejected the message:
> >
> > The error that the other server returned was:
> > 550 Blacklisted file extension detected
> >
> I don't know why, I found no such setting in mailinglist setup.
> >
> > 2016-01-15 10:41 GMT+01:00 Martin Schreiber :
> > > Can you send your test project?
> >
> > Of course.
> >
> > > > May be I'm doing something wrong because I guess you have tested it
> at
> > > > first.
> > >
> > > Yes, it works for me.
> >
> > The test is under fpc 3.0.1. i386
>
> "
> procedure tmainfo.leertexto(const sender: tfbservice; const atext:
> msestring);
> begin
>  tstringgrid1[0].datalist.addchars(atext);
>  tstringgrid1.showlastrow();
> end;
>
>
I commented these lines only for isolating the issue and discard it was
there.



> procedure tmainfo.dobackup(const sender: TObject);
> begin
>  // hostname, username and password have been set in design mode
>  tfbservice1.connected:= true;
> {procedure backupstart(const dbname: msestring;
>   const backupfiles: array of msestring; const lengths: array of
> card32;
>  //bytes, none for last file
>   const verbose: boolean = false; const stat: string = '';
>  //stat for FB 2.5.5 only, 1..4 chars, valid chars = T|D|R|W
>   const aoptions: backupoptionsty = []; const factor: card32 = 0);}
> tfbservice1.backupstart('gestv', ['/tmp/micopia.fbk'],
>
> [],    empty, not 0
>

Your last comment confussed me :)

 //bytes, none for last file

In your actual comment you forgot to put my name ;-)

//bytes, none (not 0!) for last file

Probably is better to say:  // Bytes. Empty array for last file


>  true, '', [bao_ignorelimbo]);
>
>
>  //tfbservice1.nbakstart('gestv', '/tmp/micopia.fbk', 0,
> [nbo_notriggers], 'on'); // 0 full backup
> // tfbservice1.connected:= false; -
> "
> The backup runs in a separate thread, connected:= false cancels the
> operation.
> "
> // showmessage('Done');   -
> "
> Use "onasyncend"
> "
>


Understood. This is my fault for trying to use your code like lazarus code.


> end;
>
> procedure tmainfo.asyncend(const sender: tfbservice; const aborted:
> Boolean);
> begin
>  showmessage('Done');
> end;
> "
>

What about closing attached service? ( tfbservice1.connected:= false)
Is not required?





>
> The AV by cancelling a failed service has been fixed in git master
> d562504ef0d02eef9787408c96bf2bc0ac7f7f00.
>
>
>
Canceling the service closing it seems not having effect. I tried it while
restoring. Press a 'cancel' button. This execute 'tfbservice1.connected:=
false' but the service continues running in the server and the service ends
ok (restore is ok). The program hangs... may be is needed extra work for
cancelling a running service?


BTW, backup and restore are working fine.

Thanks.



-- 
Julio Jiménez Borreguero
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Martin Schreiber
On Friday 15 January 2016 12:19:56 Julio Jiménez wrote:
> >
> > [],    empty, not 0
>
> Your last comment confussed me :)
>
>  //bytes, none for last file
>
> In your actual comment you forgot to put my name ;-)
>
> //bytes, none (not 0!) for last file
>
> Probably is better to say:  // Bytes. Empty array for last file

Actually it is no item in array for last file.

[...]
>
> What about closing attached service? ( tfbservice1.connected:= false)
> Is not required?
>
No. It is possible to use the same connection to run another service but only 
one at time.

> > The AV by cancelling a failed service has been fixed in git master
> > d562504ef0d02eef9787408c96bf2bc0ac7f7f00.
>
> Canceling the service closing it seems not having effect. I tried it while
> restoring. Press a 'cancel' button. This execute 'tfbservice1.connected:=
> false' but the service continues running in the server and the service ends
> ok (restore is ok). The program hangs... may be is needed extra work for
> cancelling a running service?
>
Please call tfbservice.cancel() if you don't want to close the connection.
"tfbservice.connected:= false" stops the service for me. What means "the 
program hangs"? In "tfbservice.connected:= false"? Please send the updated 
test program.

Martin

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Julio Jiménez
2016-01-15 14:08 GMT+01:00 Martin Schreiber :

>
>
> tfbservice.onasyncend does not run in main thread. The main thread is in a
> locked state, so it is possible to use the gui-elements of an application
> in
> onasyncend but because of a Windows restriction it is not possible to
> create
> windows which showmessage does -> deadlock. Because of consistency I
> implemented the restriction on Linux too.
> Please use for example:
> "
> procedure tmainfo.dofinalizado(const sender: tfbservice;
>const aborted: Boolean);
> begin
>  guibeep();
> // showmessage('Done...');
> end;
> "
>

I see.


> I'll add an end event which runs in main thread.
>

This will be good.


BTW, the service is cancelled client side (in the program) but server
continues executing it. In fact database is restored ok. So seems something
is not working as expected (or running service can't be stopped once you
run it).


Does nback work for you?
>
>
nback does the copy but once it finishes fires an exception:

#0  08058B92 :0 fpc_unicodestr_decr_ref()
#1   :0 ??()

Attached updated example/test  project with changes...


-- 
Julio Jiménez Borreguero


TestBackup.7z
Description: application/7z-compressed
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Martin Schreiber
On Friday 15 January 2016 17:19:28 Julio Jiménez wrote:
> 2016-01-15 14:35 GMT+01:00 Martin Schreiber :
> > On Friday 15 January 2016 14:08:46 Martin Schreiber wrote:
> > > I'll add an end event which runs in main thread.
> >
> > git master b1033eaabd62d029ee30c0158f2b8af6b7286382 has
> > tfbservice.onasyncendmain.
> > "
> > procedure tmainfo.endmain(const sender: tfbservice; const aborted:
> > Boolean);
> > begin
> >  if aborted then begin
> >   showmessage('Aborted');
> >  end
> >  else begin
> >   showmessage('Finished');
> >  end;
> > end;
> > "
>
> Working but... a little issue.
>
> Event if fired twice so it shows Aborted dialog and then it shows Finished
> dialog (the two windows). And of course.. the service continues executing
> in the server as I commented in my last message.

I don't understand. First onasyncend is called in service thread context, 
later onasyncendmain in main context. Or do you mean something other?

Martin

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Martin Schreiber
On Friday 15 January 2016 16:35:32 Julio Jiménez wrote:
>
> Does nback work for you?
>
>
> nback does the copy but once it finishes fires an exception:
>
> #0  08058B92 :0 fpc_unicodestr_decr_ref()
> #1   :0 ??()
>
> Attached updated example/test  project with changes...

Please tray again with git master e5e164282b9f98b887d1feaddf8ca558316d84a2.
What I do not understand is why isc_service_start() does not return with nbak 
until the servise is completed.

Martin

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Julio Jiménez
2016-01-15 18:39 GMT+01:00 Martin Schreiber :

>
>
> Please tray again with git master e5e164282b9f98b887d1feaddf8ca558316d84a2.
> What I do not understand is why isc_service_start() does not return with
> nbak
> until the servise is completed.
>
> Martin
>

nbackup command doesn't return log info. may be because it's very cpu
intensive... dunno

BTW, I don't like nbackup... is not binary compatible with other versions
and have issues.



-- 
Julio Jiménez Borreguero
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Martin Schreiber
On Friday 15 January 2016 18:42:25 Julio Jiménez wrote:
> 2016-01-15 18:39 GMT+01:00 Martin Schreiber :
> > Please tray again with git master
> > e5e164282b9f98b887d1feaddf8ca558316d84a2. What I do not understand is why
> > isc_service_start() does not return with nbak
> > until the servise is completed.
> >
> > Martin
>
> nbackup command doesn't return log info. may be because it's very cpu
> intensive... dunno
>
> BTW, I don't like nbackup... is not binary compatible with other versions
> and have issues.

I didn't know it. Which issues? I use it and a DB backup tool with issues is a 
nightmare.

Martin

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Martin Schreiber
On Friday 15 January 2016 16:35:32 Julio Jiménez wrote:
>
> BTW, the service is cancelled client side (in the program) but server
> continues executing it. In fact database is restored ok. So seems something
> is not working as expected (or running service can't be stopped once you
> run it).
>
In the documentation I did not find another way than to close the connection. 
If you find something other please report.
BTW most details are not documented. I had to search in Firebird sources and 
even there the information is sparse.

Martin

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Julio Jiménez
2016-01-15 17:48 GMT+01:00 Martin Schreiber :

> On Friday 15 January 2016 16:35:32 Julio Jiménez wrote:
> >
> > BTW, the service is cancelled client side (in the program) but server
> > continues executing it. In fact database is restored ok. So seems
> something
> > is not working as expected (or running service can't be stopped once you
> > run it).
> >
> In the documentation I did not find another way than to close the
> connection.
> If you find something other please report.
> BTW most details are not documented. I had to search in Firebird sources
> and
> even there the information is sparse.
>
>
Don't worry. I'll try to investigate it.

Using gbak command and then ctrl-break  stops the backup/restore service in
the server. I think there must be a way to stop it using API too. Probably
we must ask/search at firebirdsql forums.

Thanks.


-- 
Julio Jiménez Borreguero
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Julio Jiménez
2016-01-15 18:04 GMT+01:00 Martin Schreiber :

> On Friday 15 January 2016 17:19:28 Julio Jiménez wrote:
> > 2016-01-15 14:35 GMT+01:00 Martin Schreiber :
> > > On Friday 15 January 2016 14:08:46 Martin Schreiber wrote:
> > > > I'll add an end event which runs in main thread.
> > >
> > > git master b1033eaabd62d029ee30c0158f2b8af6b7286382 has
> > > tfbservice.onasyncendmain.
> > > "
> > > procedure tmainfo.endmain(const sender: tfbservice; const aborted:
> > > Boolean);
> > > begin
> > >  if aborted then begin
> > >   showmessage('Aborted');
> > >  end
> > >  else begin
> > >   showmessage('Finished');
> > >  end;
> > > end;
> > > "
> >
> > Working but... a little issue.
> >
> > Event if fired twice so it shows Aborted dialog and then it shows
> Finished
> > dialog (the two windows). And of course.. the service continues executing
> > in the server as I commented in my last message.
>
> I don't understand. First onasyncend is called in service thread context,
> later onasyncendmain in main context. Or do you mean something other?
>
>

OMG my fault. I'm mixing messages...

All is ok. One message window is from onasyncendmain event.. and the other
is in the button execute event...

Sorry.

-- 
Julio Jiménez Borreguero
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Julio Jiménez
2016-01-15 14:35 GMT+01:00 Martin Schreiber :

> On Friday 15 January 2016 14:08:46 Martin Schreiber wrote:
>
> > I'll add an end event which runs in main thread.
>
> git master b1033eaabd62d029ee30c0158f2b8af6b7286382 has
> tfbservice.onasyncendmain.
> "
> procedure tmainfo.endmain(const sender: tfbservice; const aborted:
> Boolean);
> begin
>  if aborted then begin
>   showmessage('Aborted');
>  end
>  else begin
>   showmessage('Finished');
>  end;
> end;
> "
>

Working but... a little issue.

Event if fired twice so it shows Aborted dialog and then it shows Finished
dialog (the two windows). And of course.. the service continues executing
in the server as I commented in my last message.



-- 
Julio Jiménez Borreguero
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Martin Schreiber
On Friday 15 January 2016 14:08:46 Martin Schreiber wrote:

> I'll add an end event which runs in main thread.

git master b1033eaabd62d029ee30c0158f2b8af6b7286382 has 
tfbservice.onasyncendmain.
"
procedure tmainfo.endmain(const sender: tfbservice; const aborted: Boolean);
begin
 if aborted then begin
  showmessage('Aborted');
 end
 else begin
  showmessage('Finished');
 end;
end;
"
Martin

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Julio Jiménez
2016-01-15 18:56 GMT+01:00 Martin Schreiber :

> On Friday 15 January 2016 18:42:25 Julio Jiménez wrote:
> > 2016-01-15 18:39 GMT+01:00 Martin Schreiber :
> > > Please tray again with git master
> > > e5e164282b9f98b887d1feaddf8ca558316d84a2. What I do not understand is
> why
> > > isc_service_start() does not return with nbak
> > > until the servise is completed.
> > >
> > > Martin
> >
> > nbackup command doesn't return log info. may be because it's very cpu
> > intensive... dunno
> >
> > BTW, I don't like nbackup... is not binary compatible with other versions
> > and have issues.
>
> I didn't know it. Which issues? I use it and a DB backup tool with issues
> is a
> nightmare.
>
>
About Nbackup pros and cons:
http://www.firebirdsql.org/manual/nbackup-overview.html

I don't use nbackup because some of the limitations. My experience in the
past (years ago... with first versions of Firebird) was not very good.
Corrupted backups and more...

In server side I use gbak. Is not so fast but have lots of options and
advantages too.

Having firebird services in MSE is great. Delphi and Lazarus had it time
ago.

Cheers

-- 
Julio Jiménez Borreguero
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Fwd: Firebird services

2016-01-15 Thread Martin Schreiber
On Friday 15 January 2016 18:39:19 Martin Schreiber wrote:
> On Friday 15 January 2016 16:35:32 Julio Jiménez wrote:
> > Does nback work for you?
> >
> >
> > nback does the copy but once it finishes fires an exception:
> >
> > #0  08058B92 :0 fpc_unicodestr_decr_ref()
> > #1   :0 ??()
> >
> > Attached updated example/test  project with changes...
>
> Please tray again with git master e5e164282b9f98b887d1feaddf8ca558316d84a2.

I had to change the AV fix because of a sideeffect (git master 
5b3fb47142de6896e78ee6e7ca9e35621a15348a). Please retest.

Martin

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk