Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illegal glut reinitialization attempt when using several objects #11

Closed
JimmyDaSilva opened this issue Mar 15, 2016 · 6 comments
Closed

Comments

@JimmyDaSilva
Copy link
Contributor

GLUT fails reinitializing the renderer for training the second object.
For now I have to look for object id myself, type it in training.ork and train them one by one

Training 2 objects.
computing object_id: 6032cd3e53c8687ca9f60576df000c3c
Info,  T0: Load /tmp/fileDTLhMD.stl
Info,  T0: Found a matching importer for this file format
Info,  T0: Import root directory is '/tmp/'
Info,  T0: Entering post processing pipeline
Info,  T0: Points: 0, Lines: 0, Triangles: 1, Polygons: 0 (Meshes, X = removed)
Error, T0: Failed to compute tangents; need UV data in channel0
Warn,  T0: Mesh 0: Not suitable for vcache optimization
Info,  T0: Cache relevant are 0 meshes (0 faces). Average output ACMR is -nan
Info,  T0: Leaving post processing pipeline
computing object_id: b5bc216623c0e4d6ca4a0d4429002102
freeglut illegal glutInit() reinitialization attempt
@JimmyDaSilva JimmyDaSilva changed the title Illegal glut reinitialization attempt when training several objects Illegal glut reinitialization attempt when using several objects Mar 15, 2016
@JimmyDaSilva
Copy link
Contributor Author

Same thing for detection actually which makes this really problematic:

Reading the mesh file original.obj
Reading the mesh file original.stl
Info,  T0: Load h�|9��.stl
Info,  T0: Found a matching importer for this file format
Info,  T0: Import root directory is './'
Info,  T0: Entering post processing pipeline
Info,  T0: Points: 0, Lines: 0, Triangles: 1, Polygons: 0 (Meshes, X = removed)
Error, T0: FindInvalidDataProcess fails on mesh normals: Found zero-length vector
Info,  T0: FindInvalidDataProcess finished. Found issues ...
Info,  T0: GenVertexNormalsProcess finished. Vertex normals have been calculated
Error, T0: Failed to compute tangents; need UV data in channel0
Info,  T0: JoinVerticesProcess finished | Verts in: 1536 out: 258 | ~83.2%
Info,  T0: Cache relevant are 1 meshes (512 faces). Average output ACMR is 0.669922
Info,  T0: Leaving post processing pipeline
Loaded b5bc216623c0e4d6ca4a0d4429002102 with the number of samples 5100

Reading the mesh file mesh.stl
freeglut illegal glutInit() reinitialization attempt

Crashes everytime it tries to load a second object, but loading only one or the other works fine.

@JimmyDaSilva
Copy link
Contributor Author

Seems like this problem goes way back:
wg-perception/linemod#3

@vrabaud
Copy link
Member

vrabaud commented Mar 15, 2016

hmmm, can you maybe check what I did there to see if glutInit is indeed only called once ? Thx.

@JimmyDaSilva
Copy link
Contributor Author

I have added a print to see when it runs glutInit

  if (!is_glut_initialized_) {
    printf("*******INIT GLUT****************\n");
    is_glut_initialized_ = true;
    glutInit(&argc, argv);
  }

Here is the ouput:

Training 2 objects.
computing object_id: 6032cd3e53c8687ca9f60576df000c3c
*******INIT GLUT****************
Info,  T0: Load /tmp/fileRVevBU.stl
Info,  T0: Found a matching importer for this file format
Info,  T0: Import root directory is '/tmp/'
Info,  T0: Entering post processing pipeline
Info,  T0: Points: 0, Lines: 0, Triangles: 1, Polygons: 0 (Meshes, X = removed)
Error, T0: Failed to compute tangents; need UV data in channel0
Warn,  T0: Mesh 0: Not suitable for vcache optimization
Info,  T0: Cache relevant are 0 meshes (0 faces). Average output ACMR is -nan
Info,  T0: Leaving post processing pipeline
Deleting the previous model 6032cd3e53c8687ca9f60576df022793 of object 6032cd3e53c8687ca9f60576df000c3c
computing object_id: b5bc216623c0e4d6ca4a0d4429002102
*******INIT GLUT****************
freeglut illegal glutInit() reinitialization attempt

I checked is_glut_initialized_ and it's the only place that it is set to true.
So my guess is that the object Renderer3dImpl is created several times and the first renderer created doesn't get enough time to be destroyed before a new one is created.

I am not familiar with ecto and I'm having a hard time figuring out the whole picture here

@JimmyDaSilva
Copy link
Contributor Author

Same issue there:
wg-perception/linemod#20

@vrabaud
Copy link
Member

vrabaud commented Mar 17, 2016

I guess that got closed by #12 right ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants