BaseX GUI just spins?

Monday, 19 August 2019 · 6 messages · last reply 21 Aug 2019
BK
Buddy Kresge19 Aug 2019 14:15 #
I have a situation that I don't know if others are experiencing - but it has happened quite a bit over the last week with 9.2.4 I have the below function.
declare function base:employeeIdMostRecentInstancesBetweenMap ($rangeBeginDate as xs:date, $rangeEndDate as xs:date, $employee as element()?, $query as function(xs:date, xs:date, item()*) as item()*) as map(xs:string, item()*)
{
let $allInstances := $query($rangeBeginDate, $rangeEndDate, $employee )
let $resultsMap := base:instancesBetweenMap($allInstances, $rangeBeginDate, $rangeEndDate)
return
    $resultsMap
};
I then wanted to put in a statement that would throw an error and return some information so that I could debug a situation. Basically I just added one statement to throw the error. Now when I run, BaseX Gui just spins and spins and spins. No value is returned. Never gets to this statement. I take out the let statement and it all works again.
declare function base:employeeIdMostRecentInstancesBetweenMap ($rangeBeginDate as xs:date, $rangeEndDate as xs:date, $employee as element()?, $query as function(xs:date, xs:date, item()*) as item()*) as map(xs:string, item()*)
{
let $foo := error(xs:QName("err"), concat("val: ", "here - this is where I would put the info I wanted to display."  ))
let $allInstances := $query($rangeBeginDate, $rangeEndDate, $employee )
let $resultsMap := base:instancesBetweenMap($allInstances, $rangeBeginDate, $rangeEndDate)
return
    $resultsMap
};
Any insights you can provide would be greatly appreciated. Buddy
BK
Buddy Kresge21 Aug 2019 00:04 #
Any thoughts/feedback on this? This just happened again, where I simply put in a statement to break after a line of execution, and everything just spins in BaseX GUI. I take it out, and it runs find. It is making debugging virtually impossible when these situations happen and I have no idea why this would be happening (meaning, if I'm doing something wrong - but I do not believe I am). Buddy Kresge buddy.kresge at known2u.com<mailto:buddy.kresge at known2u.com> o: 860-800-6677 ext: 501 c: 860-986-4830
Quoted text · Buddy Kresge · 24 lines
From: Buddy Kresge Sent: Monday, August 19, 2019 8:15 AM To: BaseX <basex-talk at mailman.uni-konstanz.de> Subject: BaseX GUI just spins? I have a situation that I don't know if others are experiencing - but it has happened quite a bit over the last week with 9.2.4 I have the below function. declare function base:employeeIdMostRecentInstancesBetweenMap ($rangeBeginDate as xs:date, $rangeEndDate as xs:date, $employee as element()?, $query as function(xs:date, xs:date, item()*) as item()*) as map(xs:string, item()*) { let $allInstances := $query($rangeBeginDate, $rangeEndDate, $employee ) let $resultsMap := base:instancesBetweenMap($allInstances, $rangeBeginDate, $rangeEndDate) return $resultsMap }; I then wanted to put in a statement that would throw an error and return some information so that I could debug a situation. Basically I just added one statement to throw the error. Now when I run, BaseX Gui just spins and spins and spins. No value is returned. Never gets to this statement. I take out the let statement and it all works again. declare function base:employeeIdMostRecentInstancesBetweenMap ($rangeBeginDate as xs:date, $rangeEndDate as xs:date, $employee as element()?, $query as function(xs:date, xs:date, item()*) as item()*) as map(xs:string, item()*) { let $foo := error(xs:QName("err"), concat("val: ", "here - this is where I would put the info I wanted to display." )) let $allInstances := $query($rangeBeginDate, $rangeEndDate, $employee ) let $resultsMap := base:instancesBetweenMap($allInstances, $rangeBeginDate, $rangeEndDate) return $resultsMap }; Any insights you can provide would be greatly appreciated. Buddy
CG
Christian Grün21 Aug 2019 06:19 #
Hi Buddy, Some questions in return: 1. What happens if you run the same query on command line? 2. As $foo will never be referenced in your query: What happens if you replace "let $foo := error(...)" by "error(...)," ? 3. What happens if you use prof:dump(...) instead of error( ..)? 4. As there are various factors that cannot be derived from the query snippet (type and size of processed data, other parts of your code that influence how your query will be compiled, …): Could your provide us with an SSCCE? Thanks in advance, Christian Buddy Kresge <buddy.kresge at known2u.com> schrieb am Mi., 21. Aug. 2019, 00:05:
Quoted text · Buddy Kresge · 94 lines
> Any thoughts/feedback on this? This just happened again, where I simply > put in a statement to break after a line of execution, and everything just > spins in BaseX GUI. I take it out, and it runs find. It is making > debugging virtually impossible when these situations happen and I have no > idea why this would be happening (meaning, if I’m doing something wrong – > but I do not believe I am). > > > > Buddy Kresge > > buddy.kresge at known2u.com > > o: 860-800-6677 ext: 501 > > c: 860-986-4830 > > > > *From:* Buddy Kresge > *Sent:* Monday, August 19, 2019 8:15 AM > *To:* BaseX <basex-talk at mailman.uni-konstanz.de> > *Subject:* BaseX GUI just spins? > > > > I have a situation that I don’t know if others are experiencing – but it > has happened quite a bit over the last week with 9.2.4 > > > > I have the below function. > > > > declare function base:employeeIdMostRecentInstancesBetweenMap > ($rangeBeginDate as xs:date, $rangeEndDate as xs:date, $employee as > element()?, $query as function(xs:date, xs:date, item()*) as item()*) as > map(xs:string, item()*) > > { > > let $allInstances := $query($rangeBeginDate, $rangeEndDate, $employee ) > > let $resultsMap := base:instancesBetweenMap($allInstances, > $rangeBeginDate, $rangeEndDate) > > return > > $resultsMap > > }; > > > > I then wanted to put in a statement that would throw an error and return > some information so that I could debug a situation. Basically I just added > one statement to throw the error. Now when I run, BaseX Gui just spins and > spins and spins. No value is returned. Never gets to this statement. I > take out the let statement and it all works again. > > > > declare function base:employeeIdMostRecentInstancesBetweenMap > ($rangeBeginDate as xs:date, $rangeEndDate as xs:date, $employee as > element()?, $query as function(xs:date, xs:date, item()*) as item()*) as > map(xs:string, item()*) > > { > > let $foo := error(xs:QName("err"), concat("val: ", "here – this is where I > would put the info I wanted to display." )) > > let $allInstances := $query($rangeBeginDate, $rangeEndDate, $employee ) > > let $resultsMap := base:instancesBetweenMap($allInstances, > $rangeBeginDate, $rangeEndDate) > > return > > $resultsMap > > }; > > > > Any insights you can provide would be greatly appreciated. > > > > Buddy > > >
BK
Buddy Kresge21 Aug 2019 13:24 #
Thanks for these ideas and will try these. As far as #4, what is ‘SSCCE’ – sorry in advance for the not recognizing (ha ha). Buddy Kresge buddy.kresge at known2u.com<mailto:buddy.kresge at known2u.com> o: 860-800-6677 ext: 501 c: 860-986-4830
Quoted text · Christian Grün · 43 lines
From: Christian Grün <christian.gruen at gmail.com> Sent: Wednesday, August 21, 2019 12:19 AM To: Buddy Kresge <buddy.kresge at known2u.com> Cc: BaseX <basex-talk at mailman.uni-konstanz.de> Subject: Re: [basex-talk] BaseX GUI just spins? Hi Buddy, Some questions in return: 1. What happens if you run the same query on command line? 2. As $foo will never be referenced in your query: What happens if you replace "let $foo := error(...)" by "error(...)," ? 3. What happens if you use prof:dump(...) instead of error( ..)? 4. As there are various factors that cannot be derived from the query snippet (type and size of processed data, other parts of your code that influence how your query will be compiled, …): Could your provide us with an SSCCE? Thanks in advance, Christian Buddy Kresge <buddy.kresge at known2u.com<mailto:buddy.kresge at known2u.com>> schrieb am Mi., 21. Aug. 2019, 00:05: Any thoughts/feedback on this? This just happened again, where I simply put in a statement to break after a line of execution, and everything just spins in BaseX GUI. I take it out, and it runs find. It is making debugging virtually impossible when these situations happen and I have no idea why this would be happening (meaning, if I’m doing something wrong – but I do not believe I am). Buddy Kresge buddy.kresge at known2u.com<mailto:buddy.kresge at known2u.com> o: 860-800-6677 ext: 501 c: 860-986-4830 From: Buddy Kresge Sent: Monday, August 19, 2019 8:15 AM To: BaseX <basex-talk at mailman.uni-konstanz.de<mailto:basex-talk at mailman.uni-konstanz.de>> Subject: BaseX GUI just spins? I have a situation that I don’t know if others are experiencing – but it has happened quite a bit over the last week with 9.2.4 I have the below function. declare function base:employeeIdMostRecentInstancesBetweenMap ($rangeBeginDate as xs:date, $rangeEndDate as xs:date, $employee as element()?, $query as function(xs:date, xs:date, item()*) as item()*) as map(xs:string, item()*) { let $allInstances := $query($rangeBeginDate, $rangeEndDate, $employee ) let $resultsMap := base:instancesBetweenMap($allInstances, $rangeBeginDate, $rangeEndDate) return $resultsMap }; I then wanted to put in a statement that would throw an error and return some information so that I could debug a situation. Basically I just added one statement to throw the error. Now when I run, BaseX Gui just spins and spins and spins. No value is returned. Never gets to this statement. I take out the let statement and it all works again. declare function base:employeeIdMostRecentInstancesBetweenMap ($rangeBeginDate as xs:date, $rangeEndDate as xs:date, $employee as element()?, $query as function(xs:date, xs:date, item()*) as item()*) as map(xs:string, item()*) { let $foo := error(xs:QName("err"), concat("val: ", "here – this is where I would put the info I wanted to display." )) let $allInstances := $query($rangeBeginDate, $rangeEndDate, $employee ) let $resultsMap := base:instancesBetweenMap($allInstances, $rangeBeginDate, $rangeEndDate) return $resultsMap }; Any insights you can provide would be greatly appreciated. Buddy
IL
Imsieke, Gerrit, le-tex21 Aug 2019 13:50 #
Quoted text · Buddy Kresge · 3 lines
On 21.08.2019 13:24, Buddy Kresge wrote: > Thanks for these ideas and will try these. As far as #4, what is > ‘SSCCE’ – sorry in advance for the not recognizing (ha ha).
LMGTFY… http://letmegooglethat.com/?q=SSCCE SCNR – Gerrit
BK
Buddy Kresge21 Aug 2019 13:52 #
Ha!! Thanks 😊 Buddy Kresge buddy.kresge at known2u.com o: 860-800-6677 ext: 501 c: 860-986-4830
Quoted text · Imsieke, Gerrit, le-tex · 12 lines
-----Original Message----- From: BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de> On Behalf Of Imsieke, Gerrit, le-tex Sent: Wednesday, August 21, 2019 7:51 AM To: basex-talk at mailman.uni-konstanz.de Subject: Re: [basex-talk] BaseX GUI just spins? On 21.08.2019 13:24, Buddy Kresge wrote: > Thanks for these ideas and will try these. As far as #4, what is > ‘SSCCE’ – sorry in advance for the not recognizing (ha ha). LMGTFY… http://letmegooglethat.com/?q=SSCCE SCNR – Gerrit

⚡Generated with XQuery