Heteroclinic.net logo

www.heteroclinic.net

In Depth 3D Computer Graphics
Chapter 1 Mesh File XIV, A Crash Dump

201604

We jumped to a situation while keeping the rendering program running for some minutes. It crashed -- just shut down the virtual machine. This is a very rare situation of Java. We will get an log file as the following, for example.

hs_err_pid5016.log.

In Depth 3D Computer Graphics
Chapter 1 Mesh File XV, Fix of the Crash

201604

The crash dump log looks scary. If you don't analyze such logs at a daily base, just please do not try. It is painful to find what goes with a very program file even just a single file. But I remembered the original file I modified from, it does not crash I run it again for hours. There are so many changes, things added, things removed, so it is painful. I tried to identify several hotspots, then debug. The problem is in the disaply() function. There are quite some new operators. The memory claimed will not be released quite soon until a gc happens. And the display function will be called dozens times a second. At least refactor this part fixes the crash if it may not be the root cause. We can use TextRenderer as a member variable of the class, each display() call just re-use the same object in the heap.

In Depth 3D Computer Graphics
Appedix A. Axonometric projection Demo I

201604

In this appendix, we will try to implement axonometric projection.

The following is an example of an orthorgonal cube rendered using axonometric projection. CubeDemoAxonometricProjection.png

In Depth 3D Computer Graphics
Appedix A. Axonometric projection Demo II

201604

We implemented the projection with the following code. The shear matrix will do the trick. We also showed how the strange crash we jumped to is fixed.