Hey there,
 
I'm attempting to create dynamic, context-sensitive pop-up menus with the glutCreateMenu() and associated functions. My most significant issue at the moment is that triggering a pop-up menu (ie, clicking the mouse button to which the menu is bound) correctly causes the menu to appear, but selecting any option from the list causes Python to throw an Access Violation error originating in glutMainLoop():

Traceback (most recent call last):
  File "C:\Utilities\OpenGL\My Prog.py", line 1176, in <module>
    main()
  File "C:\Utilities\OpenGL\My Prog.py", line 274, in main
    glutMainLoop()
WindowsError: exception: access violation writing 0x00000000

The given memory address is usually very low, 0x00000000 or 0x00000001 (I don't know whether this is significant or helpful). The error causes the rendering window to hang, and the python interpreter returns to a command prompt, as if the running program had ended. The rendering window must be forced to end and close by Windows.
 
I wonder whether this error stems from the fact I'm simply trying to stretch the GLUT popup menus beyond their intended capabilities in a clumsy way, or if it's got something to do with conflicting glutMouseFunc() bindings when the popups try to add in their own callbacks on top of the context-based picking functions I'm already using (exactly how do the popups effect the bindings I'm already using? Does the next mouse-click to follow the opening of a popup menu get ignored by the currently bound MouseFunc callback and get handled by a seperate, specific popup handler?). The latter seems unlikely as I've tried doing some isolated testing of the most basic popup-functionality (where glutMouseFunc() isn't otherwise defined, except indirectly through glutAttachMenu()), and the Access Violation still occurs when a menu selection is made. Any suggestions?
 
Thanks,
Jordan