BIRT Engine and server doesn't respondhttps://www.eclipse.org/forums/index.php/mv/msg/368632/898723/#msg_898723
I'm not using the BIRT Viewer, I'm getting birt's partial html response a injecting it is the page.
See below:

When I request the engine to render the report the server blocks and the client is stuck waiting for a response.
This only happens for a specific combination of parameters in a specific envirement or screen resolution, I'm not sure but I was always able to reproduce the problem in my machine and my collegue in other machine wasn't for the same combination of parameters, but he reproduce for other sequence that I couldn't.

There is no exception in the server.log and in the BIRT log with the level=ALL option I can only see that the engine doesn't close and exit like it does in normal executions.

Memory looks fine and SQL connection looks fine since I can see that BIRT executes the queries, parse the results and beforeClose event of the DataSet is always executed.

The bigger problem with this is that after this problem I have to restart the server to continue.

I was able to reproduce the problem using the Birt Designer. Using a specific combination of parameters I was always able to reproduce the problem. I started to remove some components of my report and I realized that the problem was in a pie chart.
I started to change some definitions in the pie and I realized that a specific rotation with a coverage of 100% on the pie, for that specific combination of parameters, was causing the problem.

Would be possible that BIRT crashes doing some dimension calculation?

I think it could be important to know that i'm sending the chart dimensions (width and height) through parameters, calculated based on the client screen dimensions, that is why I'm considering user screen resolution as the reason for working in one and not working in others.

So now, changing coverage and rotation is working fine, in all the tests that we did, but I don't know the specific cause of the problem so it could happen again.

Thank you ]]>Ricardo Rodrigues2012-07-27T11:01:06-00:00Re: BIRT Engine and server doesn't respondhttps://www.eclipse.org/forums/index.php/mv/msg/368632/899125/#msg_899125
I have not seen this problem, but could you post the design? What
output format for the chart are you using?

Jason

On 7/27/2012 7:01 AM, Ricardo Rodrigues wrote:
> I'm using BIRT Engine v3.2.1, running on Glassfish 3.1.2 (build 23).
> I'm not using the BIRT Viewer, I'm getting birt's partial html response
> a injecting it is the page. See below:
>
> @RequestMapping(value = "/filter.htm")
> public void filter(@RequestBody Filter filter, HttpServletRequest
> request, HttpServletResponse response) throws Exception {
> try {
> Map parametersMap = reportUtils.getParametersMap(filter);
> if(filter.getName() == null){
> throw new ReportException("There is no Report Name provided
> to generate the report");
> }
> ServletContext sc = request.getSession().getServletContext();
>
> this.birtReportEngine = BirtEngine.getBirtEngine(sc);
> response.setContentType("text/html");
>
> IReportRunnable design;
> //Open report design
> design =
> birtReportEngine.openReportDesign(sc.getRealPath("/reports") + "/" +
> filter.getName());
> //create task to run and render report
> IRunAndRenderTask task =
> birtReportEngine.createRunAndRenderTask(design);
> //the multi-select values to use. This just needs to be
> Object[].
> task.setParameterValues(parametersMap);
>
> task.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY,
> ReportController.class.getClassLoader());
> task.getAppContext().put("BIRT_VIEWER_HTTPSERVLET_REQUEST",
> request);
>
> //set output options
> HTMLRenderOption options = new HTMLRenderOption();
> options.setEmbeddable(true);
> options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_HTML);
> //options.setUrlEncoding("UTF-8");
> options.setOutputStream(response.getOutputStream());
> options.setImageHandler(new HTMLServerImageHandler());
>
> options.setBaseImageURL(request.getContextPath() + "/images");
> options.setImageDirectory(sc.getRealPath("/images"));
> task.setRenderOption(options);
>
> //run report
> task.run();
> task.close();
> } catch (Exception e) {
> e.printStackTrace();
> throw new Exception(e);
> }
> }
>
>
> When I request the engine to render the report the server blocks and the
> client is stuck waiting for a response.
> This only happens for a specific combination of parameters in a specific
> envirement or screen resolution, I'm not sure but I was always able to
> reproduce the problem in my machine and my collegue in other machine
> wasn't for the same combination of parameters, but he reproduce for
> other sequence that I couldn't.
>
> There is no exception in the server.log and in the BIRT log with the
> level=ALL option I can only see that the engine doesn't close and exit
> like it does in normal executions.
>
> Memory looks fine and SQL connection looks fine since I can see that
> BIRT executes the queries, parse the results and beforeClose event of
> the DataSet is always executed.
>
> The bigger problem with this is that after this problem I have to
> restart the server to continue.
>
> I was able to reproduce the problem using the Birt Designer. Using a
> specific combination of parameters I was always able to reproduce the
> problem. I started to remove some components of my report and I realized
> that the problem was in a pie chart.
> I started to change some definitions in the pie and I realized that a
> specific rotation with a coverage of 100% on the pie, for that specific
> combination of parameters, was causing the problem.
>
> Would be possible that BIRT crashes doing some dimension calculation?
>
> I think it could be important to know that i'm sending the chart
> dimensions (width and height) through parameters, calculated based on
> the client screen dimensions, that is why I'm considering user screen
> resolution as the reason for working in one and not working in others.
>
> So now, changing coverage and rotation is working fine, in all the tests
> that we did, but I don't know the specific cause of the problem so it
> could happen again.
>
> Thank you]]>Jason Weathersby2012-07-30T15:39:37-00:00Re: BIRT Engine and server doesn't respondhttps://www.eclipse.org/forums/index.php/mv/msg/368632/899140/#msg_899140
We are now debugging the birt source and looks like birt gets into a infinite loop.

One of the slices in the pie chart has an loStart with an x value of -1.2175^E12 which is a very large -ve number.
This value gets passed into java2d's MaskFill class method FillAAPgram and appears to hang in here and never return.
See the screeshot attach.

The report is attach.

Note:
After my change from 100% to 90% chart coverage, the problem still couldn't be reproduced.

Thank you]]>Ricardo Rodrigues2012-07-30T16:18:11-00:00Re: BIRT Engine and server doesn't respondhttps://www.eclipse.org/forums/index.php/mv/msg/368632/899147/#msg_899147
If you remove the chart scripts do you get this error. It looks like
something is wrong with the loStart location as you have seen. I would
like to figure out if the plot calc engine has a bug.

Jason

On 7/30/2012 12:18 PM, Ricardo Rodrigues wrote:
> Hi Jason,
>
> We are now debugging the birt source and looks like birt gets into a infinite loop.
>
> One of the slices in the pie chart has an loStart with an x value of -1.2175^E12 which is a very large -ve number.
> This value gets passed into java2d's MaskFill class method FillAAPgram and appears to hang in here and never return.
> See the screeshot attach.
>
> The report is attach.
>
> Note:
> After my change from 100% to 90% chart coverage, the problem still couldn't be reproduced.
>
> The problem only happens for a specific combination of parameters:
> [userValue, dateTo, width, drillCatId, type, drillValData, dimension, title, xAxisTitle, height, level, drillCatData, role, dateFrom]
> [-1, 7-30-2012, 1170pt, 114, pieGraph, Joseph_Van_2_M, student, Student Connected Report, Joseph_Van_2_M's Students, 275.25pt, student, Joseph_Van_2_M, ROLE_ADMIN, 08-01-2011]
> Where here we think what really matters is the number os results returned from the query
>
> Any help would be appreciated
>
> Thank you
>]]>Jason Weathersby2012-07-30T16:30:19-00:00Re: BIRT Engine and server doesn't respondhttps://www.eclipse.org/forums/index.php/mv/msg/368632/899151/#msg_899151
I removed the scripts from the line, bar and pie charts and I got the same error for the same combination of parameters.

We are finding hard to understand how that loStart is calculated and how it is related with the coverage of the pie

On 7/30/2012 12:49 PM, Ricardo Rodrigues wrote:
> Hi Jason,
>
> I removed the scripts from the line, bar and pie charts and I got the
> same error for the same combination of parameters.
>
> We are finding hard to understand how that loStart is calculated and how
> it is related with the coverage of the pie
>
> Thank you]]>Jason Weathersby2012-07-30T16:59:06-00:00Re: BIRT Engine and server doesn't respondhttps://www.eclipse.org/forums/index.php/mv/msg/368632/899264/#msg_899264
Debugging addSliceLabel()
I see the getXStartClosestToPie() method uses a number from label_list.get(0).getXStartClosestToPie( y );
Now this first element in the list is a SliceLabel with a dRampRate of -1.4^11.
The angle by sheer bad luck was 90.0000000000040001 degrees
The tan of 90 is infinity and we are close to this number.
See screenshot attach.

I replicated this bug with BIRT 4.2.
We need to garantie that this won't happen again and specially that Birt doesn't get in a loop and breaks the server.

Can you garantie that if we define the coverage to auto, or a specific value for the rotation, or anything else, this won't happen again?
Or could you guys create a quick fix for this? ... even throwing an exception avoiding the loop would be enough for us.

Thank you]]>Ricardo Rodrigues2012-07-31T09:14:33-00:00Re: BIRT Engine and server doesn't respondhttps://www.eclipse.org/forums/index.php/mv/msg/368632/899376/#msg_899376
You probably need to log a bugzilla for this. Even if auto fixes the
issue, the chart engine should not allow this to happen, Do you have an
example report that we can run that shows the issue?

Jason

On 7/31/2012 5:14 AM, Ricardo Rodrigues wrote:
> Jason,
>
> Debugging addSliceLabel()
> I see the getXStartClosestToPie() method uses a number from label_list.get(0).getXStartClosestToPie( y );
> Now this first element in the list is a SliceLabel with a dRampRate of -1.4^11.
> The angle by sheer bad luck was 90.0000000000040001 degrees
> The tan of 90 is infinity and we are close to this number.
> See screenshot attach.
>
> I replicated this bug with BIRT 4.2.
> We need to garantie that this won't happen again and specially that Birt doesn't get in a loop and breaks the server.
>
> Can you garantie that if we define the coverage to auto, or a specific value for the rotation, or anything else, this won't happen again?
> Or could you guys create a quick fix for this? ... even throwing an exception avoiding the loop would be enough for us.
>
> Our Suggested Solution:
>
> private void computeRampRate( )
> {
> double angle = slice.getdMidAngle( ) % 360;
> if(angle%90 < TAN_INFINITY_THRESHOLD || angle%90 <
> TAN_INFINITY_THRESHOLD) {
> angle = angle - 1; //subtract 1 degree if close to 90 or
> 270 as this will result in a very very large number like 1.4^12
> }
> dRampRate = Math.tan( Math.toRadians( angle ) );
>
> if (angle>180 && angle < 360)
> {
> bUp = false;
> }
> }
>
> Thank you
>]]>Jason Weathersby2012-07-31T15:38:44-00:00Re: BIRT Engine and server doesn't respondhttps://www.eclipse.org/forums/index.php/mv/msg/368632/899623/#msg_899623
I reported the bug here:https://bugs.eclipse.org/bugs/show_bug.cgi?id=386399]]>Ricardo Rodrigues2012-08-01T15:41:31-00:00Re: BIRT Engine and server doesn't respondhttps://www.eclipse.org/forums/index.php/mv/msg/368632/899638/#msg_899638
Thanks for posting this.