fracplanet crashes on second generate button click
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
fracplanet (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
To reproduce:
- Launch fracplanet
- click the "Generate" button
- wait a second or so until it has finished
- click the "Generate" button
** crash to desktop SIGSEGV
The cause:
messages in the queue arriving for the viewer after it has been deleted.
To fix:
In file: fracplanet_main.cpp function: FracplanetMain:
Comment out:
viewer.reset();
and put
if (!viewer)
on the line before:
viewer.reset(new TriangleMeshVie
Your regenerate() function should now start like this:
void FracplanetMain:
{
const bool first_viewer=
if (viewer)
{
viewer-
// viewer.reset();
}
meshes.clear();
mesh_
mesh_
//! \todo Recreating viewer every time seems like overkill, but Ubuntu (in VM) doesn't seem to like it otherwise.
if (!viewer)
viewer.
// Tweak viewer appearance so controls not too dominant
QFont viewer_font;