Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the OpenGL CPAN distribution.

Report information
The Basics
Id: 39761
Status: resolved
Priority: 0/
Queue: OpenGL

People
Owner: Nobody in particular
Requestors: mithaldu [...] yahoo.de
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.57
Fixed in: (no value)



Subject: error-less crash when 0.57 is used with coro
A word ahead: Coro is a module that allows for parallelization without using threads, something which is very valuable for me, since threading in Perl is difficult to say the least, in regards to sharing data between threads. Under the latest ActivePerl 5.10.0.1004, i installed Coro 4.749, then Microsoft Visual C++ 2008 Express Edition and after copying the includes from http://graphcomp.com/opengl/GL.zip into the VC includes directory, i could use the ActivePerl CPAN to install OpenGL 0.57. The test included in the installer ran fine. However when trying to run the code in the attached file, it prints out "foo1foo2", draws one frame, then immediately quits. No errors appear anywhere. Removing the OpenGL package via PPM, then installing either 0.56 from bribes or 0.56.1 from wxperl allows the attached file to execute flawlessly again. I'll happily help out in any manner i can, if you need information or assistance.
Subject: test_case.pl
#!/usr/bin/perl -w use strict; use OpenGL qw/ :all /; use Coro; $|++; sub cbRenderScene { glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(0,0,-5); glBegin(GL_TRIANGLES); glNormal3f( 0, 0, 1); glColor4f( 1, 0, 0, 1); glVertex3f(-1, -1, 1); glColor4f( 0, 1, 0, 1); glVertex3f( 1, -1, 1); glColor4f( 0, 0, 1, 1); glVertex3f( 1, 1, 1); glEnd(); glutSwapBuffers(); # and crash cede(); } glutInit(); glutInitDisplayMode( GLUT_DOUBLE ); glutCreateWindow( 'test' ); glutDisplayFunc(\&cbRenderScene); glutIdleFunc(\&cbRenderScene); glMatrixMode(GL_PROJECTION); gluPerspective(45,1,1,100); print "foo1"; # set up coro to do something after every frame async { while (1) { print "foo2"; cede(); } }; glutMainLoop(); __END__
I just tried your test program on a winXP box running cygwin and the default installs of Coro and its dependencies. The program appeared to work fine. Display window could be resized and lots of text was spitting out as the frames were refreshed. However, I did not expect it to work since. In general, you cannot mix and match multiple event loops without great care. The OpenGL module uses FreeGLUT by default and it is possible that the win32 FreeGLUT event handling conflicts with the events required by Coro. I do not use ActivePerl and cannot offer any suggestions in that respect. Regards, Chris On Thu Oct 02 07:06:48 2008, Xenofur wrote: Show quoted text
> A word ahead: Coro is a module that allows for parallelization
without Show quoted text
> using threads, something which is very valuable for me, since
threading Show quoted text
> in Perl is difficult to say the least, in regards to sharing data > between threads. > > Under the latest ActivePerl 5.10.0.1004, i installed Coro 4.749, then > Microsoft Visual C++ 2008 Express Edition and after copying the > includes from http://graphcomp.com/opengl/GL.zip into the VC includes > directory, i could use the ActivePerl CPAN to install OpenGL 0.57.
The Show quoted text
> test included in the installer ran fine. > > However when trying to run the code in the attached file, it prints
out Show quoted text
> "foo1foo2", draws one frame, then immediately quits. No errors appear > anywhere. > > Removing the OpenGL package via PPM, then installing either 0.56 from > bribes or 0.56.1 from wxperl allows the attached file to execute > flawlessly again. > > I'll happily help out in any manner i can, if you need information or > assistance.
From: mithaldu [...] yahoo.de
Thanks for actually getting back about this. :) This can be put to resolved since one of the later Coro versions seems to have removed the crash. As for Coro and OpenGL interacting, i don't think there's much to worry about there. Coro is pretty much a "goto" implementation on steroids more than an actual event handler. I've been using the two together with considerable success since then. On another note: Are you one of the maintainers of this module? I'm asking because I'd like to contribute a few things to it, but emailing the address on graphcomp was only met with silence.
RT-Send-CC: bfree [...] graphcomp.com
On Wed Mar 25 14:41:58 2009, Xenofur wrote: Show quoted text
> Thanks for actually getting back about this. :) > > This can be put to resolved since one of the later Coro versions seems > to have removed the crash. > > As for Coro and OpenGL interacting, i don't think there's much to > worry about there. Coro is pretty much a "goto" implementation on > steroids more than an actual event handler. I've been using the > two together with considerable success since then.
Glad it is working for you now. Coro looks intriguing and I'll probably take a closer look when time permits. Thanks for the recommendations. Show quoted text
> On another note: Are you one of the maintainers of this module? > I'm asking because I'd like to contribute a few things to it, > but emailing the address on graphcomp was only met with silence.
Yes. Bob Free is the owner/maintainer of the Perl OpenGL module (a.k.a. POGL) and I am a co-maintainer. I'm afraid we don't have a mailing list set up but please feel free to e-mail Bob and me with ideas or contributions. We can get swamped so the turn around might take awhile but someone will eventually get around to it... :-) I'm currently working to complete integration of POGL into PDL (the Perl Data Language) to update the hand rolled OpenGL binding for improved portability, performance, and capability. Regards, Chris