BIRT Reports Engine - Server doesn't respond
===

I'm using BIRT Engine v3.2.1, running on Glassfish 3.1.2 (build 23).
I'm not using the BIRT Viewer and I'm getting birt's partial html response and injecting it in the page.
See below:

Server side Spring Bean:
    
    @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 environment or screen resolution, I'm not sure here, but I was always able to reproduce the problem in my machine and my college 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 here is when it happens I have to restart the server to continue.

After some more testing, 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? Someone faced similar problem?

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 size, that is why I'm considering user screen resolution as one of the possible reasons for working for one and not working for 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 and we all know that it will happen again in the worst moment possible.

Thank you