From: Colin Jennings <colin_jennings@in...> - 2005-09-02 19:41:56
I've got wxPerl working with embedded perl in my C/C++ app and working with multiple short-lived
perl interpreters, but there is one problem....
1. On *rare* occassion, I get a compile error in my perl script when running it through my
application via embedded perl (perl_parse fails on a missing semi-colon, for example).
2. I fix the compile error (I put in the missing semi-colon).
3. I re-run the perl script in the application in which perl is embedded.
4. My application now re-runs perl_parse (as it did in step 1), but now perl_parse loops infinitely
while claiming memory at a furious pace.
Bottom line, if perl_parse succeeds everytime, then I can run mulitple short-lived perl interpreters
all day. If it fails, I have to restart the application, else I get into an infinite loop.
I also removed usage of Wx from the perl script and the problem goes away.
I'm running WinXP with
wxWidgets 2.6.1 as DLL's
The test script I used to narrow down the problem. Remove the 'use Wx;' and perl_parse can fail all
day with no problems.
my $a = 1;
my $b = 2;
my $c = $a + $b;
Here is the meat of my embedded perl code...
if (exitstatus = perl_parse(iti_perl,iti_xs_init,3,perl_argv,(char **) NULL))
sprintf(output_string,"Error: Perl parse exit status of %d [From Perl Parse]!", exitstatus) ;
exitstatus = perl_run(iti_perl) ;
After digging through embedded perl documentation I have no idea where to go with this one out side
of wxPerl. Thanks in advance for any help.