WeBWorK Problems

Problem fails for one specific student

Problem fails for one specific student

by David Brodbeck -
Number of replies: 5

I'm at a bit of a loss for how to troubleshoot this one.

The problem Library/Hope/Multi1/04-01-Linear-transformations/Lin_trans_11.pg works for everyone except one student. When Webwork tries to render the problem page for him. It errors out with the following:

Error messages

'require' trapped by operation mask at /usr/lib64/perl5/vendor_perl/Encode.pm line 5. Compilation failed in require at /usr/lib64/perl5/vendor_perl/Encode/Alias.pm line 22.

Call stack

The following information can help locate the source of the problem.

  • in WeBWorK::PG::Local::new called at line 51 of /opt/webwork/webwork2/lib/WeBWorK/PG.pm
  • in WeBWorK::PG::new called at line 738 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
  • in WeBWorK::ContentGenerator::Problem::pre_header_initialize called at line 213 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
  • in WeBWorK::ContentGenerator::go called at line 386 of /opt/webwork/webwork2/lib/WeBWorK.pm
Any suggestions on how to proceed? The fact that I can only reproduce it when acting as him is hard for me to figure out.
In reply to David Brodbeck

Re: Problem fails for one specific student

by Paul Vojta -

What is the user's random seed?  If you change your random seed to that value, does the error occur for you?

In reply to Paul Vojta

Re: Problem fails for one specific student

by David Brodbeck -
Good question. Where would I find the random seed?
In reply to David Brodbeck

Re: Problem fails for one specific student

by Glenn Rice -

One way to find it is to open the set in the "Hmwk Sets Editor", click on "Edit individual versions of set setname," and then click on "Edit data for username" for that user.  The seed will be listed in the "User Value" for the problem settings for that problem.

In reply to Glenn Rice

Re: Problem fails for one specific student

by David Brodbeck -
Thanks. I found their seed and changed mine to match, and now the problem fails for me, too.

So I suppose a quick fix would be to give them a different seed for that one problem? (The problematic seed is 4283, if it matters.)
In reply to David Brodbeck

Re: Problem fails for one specific student

by Glenn Rice -
Changing the seed for the student is certainly a good fix. It won't change the problem for the student since it is a static problem. It doesn't have a single random parameter.

So that problem does not work very well. I see warnings already when the problem loads with that seed. Then when I enter the correct answer I get the "Can't generate enough valid points for comparison" warning. The problem is caused by a poor choice of function for r(x).  The function is sin(x/e)^pi - cos^2(pi * x).  What happens is that sin(x/e) can be negative, and then that is raised to the power of pi.  Negative numbers can't be raised to non-integer powers.  It is a bit odd that this doesn't happen more frequently for this problem.  I guess the odds of sin(x/e) being negative are not that high?

I any case, I don't get the error that you get. Just the warnings. Admittedly, warnings that prevent the problem from functioning as intended, but not fatal errors.

Looking at the Encode/Alias.pm module installed on my system (the default package for Ubuntu 22.04), I don't see anything on line 22 that would cause the error message that you are getting either. However there is a "require" statement on line 104. I am guessing that you have an older version of that module that has something similar in it. Since this is in WWSafe "require" calls are trapped and you get that error. In any case, this may be an issue with the version of that module that you have installed. One thing that is odd is that for the file on my system, that "require" statement will only occur when the PERL_ENCODE_DEBUG environment variable is set. It is also a little odd that the Encode::Alias module is called at all here. That module is not shared with the safe zone, so that alone should cause a problem. It seems that the warnings in that problem are triggering this for your server setup for some reason. I wonder if warnings of any kind from PG trigger this same error for you?