rschroll / revis

visvis extension for Reinteract
http://rschroll.github.com/revis/
1 stars 0 forks source link

Occasional segfaults, freezes, and other badness #2

Open rschroll opened 13 years ago

rschroll commented 13 years ago

These seem to happen only when the first figure plotted contains a volume. But sometimes it works without any problems. A worksheet that reliably crashed or froze would be helpful.

rschroll commented 13 years ago

This seems to only happen when using volshow; volshow2 and volshow3 both work fine. I think the problem is that volshow calls misc.getOpenGlCapable, which calls misc.getOpenGlInfo, which can cause segfaults if called without first making a GL context, according to function.getOpenGlInfo. This is probably OK in interactive contexts, because the figure, with the GL context, is created before any of the above happens. But in our case, the figure isn't created until the very end.

A way around this would be to get misc.getOpenGlInfo to run safely on import, but I haven't worked out a way to make that happen.

rschroll commented 13 years ago

Commit a6ee8b largely solves this problem by making sure getOpenGlInfo isn't called at a bad time. It does mean the first call to volshow may use volshow2 when your system could support volshow3. You can explicitly call those methods if you like.