Project

General

Profile

Actions

Bug #2041

closed

BufferOverflowException when setting color role for 3D bar chart

Added by Jan Goyvaerts over 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
-
Target version:
Start date:
07/16/2013
Due date:
% Done:

0%

Estimated time:

Description

Running this code:

final Integer count = (Integer) model.getData(binX, binY);

model.setData(binX, binY, count + 1);

if (count >= 20) {

model.setData(binX, binY, WColor.white, ItemDataRole.MarkerBrushColorRole);

}

Causes the exception below. The exception is not thrown when the color isn't set.

java.nio.BufferOverflowException

at java.nio.Buffer.nextPutIndex(Buffer.java:499)

at java.nio.HeapByteBuffer.putFloat(HeapByteBuffer.java:449)

at eu.webtoolkit.jwt.chart.WGridData.barDataFromModel(WGridData.java:1347)

at eu.webtoolkit.jwt.chart.WGridData.initializeBarSeriesBuffers(WGridData.java:944)

at eu.webtoolkit.jwt.chart.WGridData.initializeGL(WGridData.java:245)

at eu.webtoolkit.jwt.chart.WCartesian3DChart.updateGL(WCartesian3DChart.java:520)

at eu.webtoolkit.jwt.WClientGLWidget.render(WClientGLWidget.java:1484)

at eu.webtoolkit.jwt.WGLWidget.render(WGLWidget.java:3095)

at eu.webtoolkit.jwt.WWidget.createSDomElement(WWidget.java:1361)

at eu.webtoolkit.jwt.WContainerWidget.createDomChildren(WContainerWidget.java:880)

at eu.webtoolkit.jwt.WContainerWidget.createDomElement(WContainerWidget.java:818)

at eu.webtoolkit.jwt.WContainerWidget.createDomElement(WContainerWidget.java:1088)

at eu.webtoolkit.jwt.WWebWidget.createActualElement(WWebWidget.java:783)

at eu.webtoolkit.jwt.WWidget.createSDomElement(WWidget.java:1362)

at eu.webtoolkit.jwt.StdWidgetItemImpl.createDomElement(StdWidgetItemImpl.java:108)

at eu.webtoolkit.jwt.StdGridLayoutImpl2.createElement(StdGridLayoutImpl2.java:684)

at eu.webtoolkit.jwt.StdGridLayoutImpl2.createDomElement(StdGridLayoutImpl2.java:278)

at eu.webtoolkit.jwt.WContainerWidget.createDomChildren(WContainerWidget.java:829)

at eu.webtoolkit.jwt.WContainerWidget.createDomElement(WContainerWidget.java:818)

at eu.webtoolkit.jwt.WContainerWidget.createDomElement(WContainerWidget.java:1088)

at eu.webtoolkit.jwt.WWebWidget.createActualElement(WWebWidget.java:783)

at eu.webtoolkit.jwt.WWidget.createSDomElement(WWidget.java:1362)

at eu.webtoolkit.jwt.WContainerWidget.createDomChildren(WContainerWidget.java:880)

at eu.webtoolkit.jwt.WContainerWidget.createDomElement(WContainerWidget.java:818)

at eu.webtoolkit.jwt.WContainerWidget.createDomElement(WContainerWidget.java:1088)

at eu.webtoolkit.jwt.WWebWidget.createActualElement(WWebWidget.java:783)

at eu.webtoolkit.jwt.WWidget.createSDomElement(WWidget.java:1362)

at eu.webtoolkit.jwt.WebRenderer.serveMainAjax(WebRenderer.java:767)

at eu.webtoolkit.jwt.WebRenderer.serveMainscript(WebRenderer.java:533)

at eu.webtoolkit.jwt.WebRenderer.serveResponse(WebRenderer.java:171)

at eu.webtoolkit.jwt.WebSession.serveResponse(WebSession.java:1766)

at eu.webtoolkit.jwt.WebSession.render(WebSession.java:1731)

at eu.webtoolkit.jwt.WebSession.notify(WebSession.java:297)

at eu.webtoolkit.jwt.WApplication.notify(WApplication.java:2789)

at eu.webtoolkit.jwt.WebSession.handleRequest(WebSession.java:1531)

at eu.webtoolkit.jwt.WtServlet.doHandleRequest(WtServlet.java:351)

at eu.webtoolkit.jwt.ServletApi.handleRequest(ServletApi.java:27)

at eu.webtoolkit.jwt.ServletApi3.doHandleRequest(ServletApi3.java:98)

at eu.webtoolkit.jwt.WtServlet.handleRequest(WtServlet.java:245)

at eu.webtoolkit.jwt.WtServlet.doGet(WtServlet.java:253)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:931)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)

at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)

at java.lang.Thread.run(Thread.java:662)

3824 [http-bio-8080-exec-10] INFO eu.webtoolkit.jwt.WtServlet - Session exiting: BA7637859593109BDBE0E7E1DB13FAB9 (#sessions = 2)

3825 [http-bio-8080-exec-9] INFO eu.webtoolkit.jwt.WtServlet - Session exiting: BA7637859593109BDBE0E7E1DB13FAB9 (#sessions = 1)

Actions #1

Updated by Jan Goyvaerts over 11 years ago

Setting a color map causes a different exception.

series.setColormap(new WStandardColorMap(0,200, true));

java.lang.IndexOutOfBoundsException

at java.nio.Buffer.checkIndex(Buffer.java:518)

at java.nio.HeapByteBuffer.getFloat(HeapByteBuffer.java:442)

at eu.webtoolkit.jwt.chart.WGridData.generateTextureCoords(WGridData.java:1606)

at eu.webtoolkit.jwt.chart.WGridData.initializeBarSeriesBuffers(WGridData.java:998)

at eu.webtoolkit.jwt.chart.WGridData.initializeGL(WGridData.java:245)

at eu.webtoolkit.jwt.chart.WCartesian3DChart.updateGL(WCartesian3DChart.java:520)

at eu.webtoolkit.jwt.WClientGLWidget.render(WClientGLWidget.java:1484)

at eu.webtoolkit.jwt.WGLWidget.render(WGLWidget.java:3095)

at eu.webtoolkit.jwt.WWidget.createSDomElement(WWidget.java:1361)

at eu.webtoolkit.jwt.WContainerWidget.createDomChildren(WContainerWidget.java:880)

at eu.webtoolkit.jwt.WContainerWidget.createDomElement(WContainerWidget.java:818)

at eu.webtoolkit.jwt.WContainerWidget.createDomElement(WContainerWidget.java:1088)

at eu.webtoolkit.jwt.WWebWidget.createActualElement(WWebWidget.java:783)

at eu.webtoolkit.jwt.WWidget.createSDomElement(WWidget.java:1362)

at eu.webtoolkit.jwt.StdWidgetItemImpl.createDomElement(StdWidgetItemImpl.java:108)

at eu.webtoolkit.jwt.StdGridLayoutImpl2.createElement(StdGridLayoutImpl2.java:684)

at eu.webtoolkit.jwt.StdGridLayoutImpl2.createDomElement(StdGridLayoutImpl2.java:278)

at eu.webtoolkit.jwt.WContainerWidget.createDomChildren(WContainerWidget.java:829)

at eu.webtoolkit.jwt.WContainerWidget.createDomElement(WContainerWidget.java:818)

at eu.webtoolkit.jwt.WContainerWidget.createDomElement(WContainerWidget.java:1088)

at eu.webtoolkit.jwt.WWebWidget.createActualElement(WWebWidget.java:783)

at eu.webtoolkit.jwt.WWidget.createSDomElement(WWidget.java:1362)

at eu.webtoolkit.jwt.WContainerWidget.createDomChildren(WContainerWidget.java:880)

at eu.webtoolkit.jwt.WContainerWidget.createDomElement(WContainerWidget.java:818)

at eu.webtoolkit.jwt.WContainerWidget.createDomElement(WContainerWidget.java:1088)

at eu.webtoolkit.jwt.WWebWidget.createActualElement(WWebWidget.java:783)

at eu.webtoolkit.jwt.WWidget.createSDomElement(WWidget.java:1362)

at eu.webtoolkit.jwt.WebRenderer.serveMainAjax(WebRenderer.java:767)

at eu.webtoolkit.jwt.WebRenderer.serveMainscript(WebRenderer.java:533)

at eu.webtoolkit.jwt.WebRenderer.serveResponse(WebRenderer.java:171)

at eu.webtoolkit.jwt.WebSession.serveResponse(WebSession.java:1766)

at eu.webtoolkit.jwt.WebSession.render(WebSession.java:1731)

at eu.webtoolkit.jwt.WebSession.notify(WebSession.java:297)

at eu.webtoolkit.jwt.WApplication.notify(WApplication.java:2789)

at eu.webtoolkit.jwt.WebSession.handleRequest(WebSession.java:1531)

at eu.webtoolkit.jwt.WtServlet.doHandleRequest(WtServlet.java:351)

at eu.webtoolkit.jwt.ServletApi.handleRequest(ServletApi.java:27)

at eu.webtoolkit.jwt.ServletApi3.doHandleRequest(ServletApi3.java:98)

at eu.webtoolkit.jwt.WtServlet.handleRequest(WtServlet.java:245)

at eu.webtoolkit.jwt.WtServlet.doGet(WtServlet.java:253)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:931)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)

at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)

at java.lang.Thread.run(Thread.java:662)

Actions #2

Updated by Jan Goyvaerts over 11 years ago

The first exception is not thrown when using WEquidistantGridData and the MarkerBrushColorRole role. The second exception is thrown too for a color map.

Actions #3

Updated by Jan Goyvaerts over 11 years ago

Setting the color role now seems to work.

Actions #4

Updated by Korneel Dumon over 11 years ago

  • Status changed from New to Resolved
Actions #5

Updated by Korneel Dumon over 11 years ago

  • Assignee set to Korneel Dumon
Actions #6

Updated by Koen Deforche about 11 years ago

  • Target version set to 3.3.2
Actions #7

Updated by Koen Deforche about 11 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF