Invalid JSON response body: "toString()" failed (Where are Stardog Studio log files?)


(Pierre Grenon) #1

Hello,

I have a query that fails and returns in a red box:

Invalid JSON response body: “toString()” failed

After which the query results component of the Stardog Studio is not drawn – there is only the top bar with ‘Export Results’ collapsed to the bottom border. Hovering over the bar shows an interdiction sign. Hovering over ‘Export Results’ brings up the tooltip ‘You have to run the query before you can export its results’.

The same query runs and returns results in the Web GUI, so I suppose this is a Stardog Studio UI issue. However, I have no clue how to figure out what may be the problem.

Are there log files and how can I access them?

With many thanks and best regards,
Pierre


(Jason Rogers) #2

Hi Pierre,

Thanks for reporting this. The message you’re seeing typically happens when the number of results returned by your query is too big for Studio to handle (currently) due to memory restrictions. The reason the query successfully returns results in the Web GUI is that the Web GUI adds (behind the scenes) a LIMIT 10000 clause to every query, so that it can’t possibly return a number of results greater than 10000. Thus, to get the same results in Studio as you are getting in the Web GUI, you can simply add a LIMIT clause to your query (it doesn’t have to be 10000; Studio can handle many more, or many fewer, results than that).

Hopefully that resolves your issue (please let us know). There are some log files generated by Studio, but they are currently only crash logs, so this is unlikely to be captured there.

In the meantime, we’ll be working on both improving the error messaging in this case, and on improving Studio’s handling of large queries.

Thanks!
Jason


(Pierre Grenon) #3

Hi Jason,

Thanks for your response.

  1. Re. logs, ok thanks for the clarification.

  2. On the query execution side, yes, adding a limit turns up results in Studio. All is well then.

  3. Re. (minor) weirdness in the way the panels are drawn. When the error occurs, can I clarify what I mean by ‘not drawn’?

Normally, it seems, the main panel looks like (from top to bottom):

Scrollable query area
‘Export Results’ band
Scrollable results

In the case of this error, the main panel looks like:

Scrollable query area
Rectangle of fear and anguish inducing absolute darkness
‘Export Results’ band

So there is just a solid black area into which the query area seems to disappear if you scroll it up… This area has no selectable upper boundary. The area disappears if you resize the side panel.

It’s nothing major, just weird and slightly disturbing.

Many thanks,
Pierre


(Jason Rogers) #4

Pierre,

That issue regarding the “rectangle of fear and anguish” (which we will definitely call it internally from now on) is a definite bug. We’ve made an issue internally to fix it, and should be rolling out a fix for it soon.

Thanks!

Jason


(Jason Rogers) #5

Pierre,

I actually may have spoken too soon, as I don’t think I’m able to reproduce the behavior you described regarding the “rectangle of fear and anguish.” Is it possible for you to provide a screenshot?

Thanks,
Jason


(Pierre Grenon) #6

Hey,

I don’t mean to be particular about the geography of your GUI and I apologise if my orignial description was poorly phrased, yet I feel compelled to point out that the rectangle is not a rectangle of fear as such but a rectangle of absolute darkness that induces fear and anguish in end users.

I could reproduce but it wasn’t straightforward. It seems that once it’s gone by resizing the side panel, or if you manage it one time and close reopen Studio to go to the same tab, or if you do pretty much anything but the below, the infamous rectangle makes itself desired.

  1. Start Stardog Studio – don’t resize window
  2. New tab
  3. Paste/write some query that should break the Limit (?)
    3.5 — the query may need to be long so you have to scroll down the query area
  4. Scroll down the query area to its bottom — so here, i’m not clear if you need to be at the bottom bottom or just a few lines above…
  5. Run query
  6. Wait (experience the evil of anticipating deep existential anguish, abominable fear and utter despondency)
  7. Rejoice, you can now enjoy fear and anguish

On the screenshot you can only see that darkness is there by attending to the fact that the line number 63 is cut.

It looks like a rare, freakish bug really.

Cheers,
Pierre


(Jason Rogers) #7

Hi Pierre,

I believe this is fixed a recent update to the beta release of Studio. Are you still seeing this issue?

Thanks!

Jason


(Pierre Grenon) #8

Hi Jason,

I was running 1.0.0.76. I just installed 1.0.0.88 to check this.

Unfortunately, when trying to return a query that breaks limits (which seems higher than 10k now), Stardog Studio crashes (just-in-time debug message or some such).

Is the limit now 30k, as that seems to be the number I could reach without crashing.

Cheers
Pierre


(Jason Rogers) #9

Hi Pierre,

Thanks for following up. Studio definitely should not be crashing as you described, and there should be no (reasonable) limit on the number of results a query might retrieve (we regularly run queries in Studio that retrieve around 500k results, for example). We’ll be investigating the issue you reported and, once we figure out what changed between the releases you mentioned, we’ll push out a fix.

Thanks!

Jason


(Pierre Grenon) #10

Ok, here attached the error if it’s any helps

CaptureSDerror

– it’s Windows too


(Jason Rogers) #11

Hi Pierre,

We’ve been trying to reproduce this issue, but are failing so far. Running the latest version of Studio on Windows, we are currently able to query and view 418,458 results without an issue. Can you maybe give us the exact query that you’re executing here (and, if possible – though I know it may not be – the dataset)? If there are any other distinct steps that you think might be relevant to producing this issue, feel free to mention those, as well.

Thanks,
Jason


(Pierre Grenon) #12

Hi,

I thought I had answered -- apologies

I lost the query/dataset. I managed to come up with something dumb enough to break Studio though. Still with 1.0.0.88

Try:

select ?x ?y
where
{?x rdfs:label ?y . ?z rdf:type ?w}

Maybe you need to combine ridiculous numbers of bindings. I had a crash for these:

#101470 101469
select
(Count(distinct ?x) as ?labelled)
(Count(distinct ?y) as ?labels)
where
{?x rdfs:label ?y }

#214944 46
select
(Count(distinct ?x) as ?instance)
(Count(distinct ?y) as ?class)
where
{?x rdf:type ?y }