tordanik/OSM2World — pull request #47 by hjanetzek (2013-03-29 09:54:10+00:00)
Title: avoid crash on 'reload file'

At least on my driver calling glDeleteBuffer (via target reset) from OpenOSMThread crashes constantly. So I've added a flag to reset target on next run of 'renderTo' instead. Not sure if this is correct. It would probably be better to clear all views before reloading, but then I'm really not into threads observing each other :)

Thread [OpenOSMThread] (Suspended (breakpoint at line 271 in JOGLRendererVBO$VBOData))
JOGLRendererVBO$VBODataFloat(JOGLRendererVBO$VBOData).delete() line: 271
JOGLRendererVBO.freeResources() line: 555
JOGLTarget.reset() line: 99
TerrainView(DebugView).setConfiguration(Configuration) line: 51
ToggleDebugViewAction.update(Observable, Object) line: 67
Data(Observable).notifyObservers(Object) line: 142
Data(Observable).notifyObservers() line: 98
Data.loadOSMFile(File, ElevationCalculator, boolean, ConversionFacade$ProgressListener) line: 78
OpenOSMAction$OpenOSMThread.run() line: 151