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

iCubGui: In BVHNodeEYE switch from glutSolidSphere to gluSphere #657

Merged
merged 1 commit into from
May 4, 2020

Conversation

traversaro
Copy link
Member

I am not an expert of glut, but apparently there are functions that start with glu*** and take in input a pointer to GLUquadricObj, and functions that start with glut and do not take in input a pointer to GLUquadricObj. BVHNodeEYE was the only class that used a glut*** function, and during the call when used with freeglut installed via vcpkg it was crashing with error:

Exception thrown: read access violation.
fgStructure.**CurrentWindow** was nullptr. occurred

and the backtrace was:

 	freeglutd.dll!fghDrawGeometrySolid(float * vertices, float * normals, float * textcs, int numVertices, wchar_t * vertIdxs, int numParts, int numVertIdxsPerPart) Line 181	C
 	freeglutd.dll!fghSphere(float radius, int slices, int stacks, unsigned char useWireMode) Line 1721	C
 	freeglutd.dll!glutSolidSphere(double radius, int slices, int stacks) Line 2066	C
>	iCubGui.exe!BVHNodeEYE::drawJoint() Line 34	C++

Changing from glutSolidSphere to gluSphere as done the other classes that inherit from BVHNodeDH fixes the crash.

Fix robotology/robotology-superbuild#355 .

This is for uniformity with similar classes.

Furthermore, when used with freeglut from vcpkg this fixes the
crash described in robotology/robotology-superbuild#355 .
@traversaro traversaro requested review from Nicogene and ale-git May 3, 2020 21:33
Copy link
Member

@Nicogene Nicogene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not an expert of glut either, but your analysis make sense to me.
LGTM 👍

@traversaro
Copy link
Member Author

@pattacini let me know if you want to handle the merge + merge forward or do you prefer if I do it.

@pattacini pattacini merged commit f755593 into robotology:master May 4, 2020
@pattacini
Copy link
Member

I'll deal with devel, no problem!
Thanks for the fix 👍

@traversaro traversaro deleted the fixiCubGuivcpkg branch May 4, 2020 07:42
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

Successfully merging this pull request may close these issues.

iCubGui does not start when installed from robotology-full-installer-2020.02-win64
3 participants