I have some working rendering code, that I am now trying to optimize by introducing frustum culling. Basically, I
1) create a new instance of Frustum in my display loop
2) calculate the model-view matrix for a model I'm trying to render
3) multiply the projection matrix with that model-view matrix
4) call frustum.updateByPMV with the resulting matrix
5) call isAABBoxOutside with an AABBox that represents the bounding box for my model (in model space)
If I comment out the call to isAABBoxOutside, it runs fine (but obviously, without any culling going on). If I uncomment it, however, the JVM crashes when trying to render the first model after that call. The output is:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fff924f11ef, pid=1880, tid=51715
#
# JRE version: Java(TM) SE Runtime Environment (7.0_45-b18) (build 1.7.0_45-b18)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.45-b08 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C [GLEngine+0x1401ef] gleRunVertexSubmitImmediate+0x27ef
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/vinkware/NetBeansProjects/working-client/hs_err_pid1880.log
#
# If you would like to submit a bug report, please visit:
#
http://bugreport.sun.com/bugreport/crash.jsp# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
This is run on a 2012 MacBook Air with the Intel HD4000, running Mavericks.
Have I stumbled upon a bug, or am I grossly abusing the seemingly very useful Frustum class?