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

Bespoke validation functions returning TIMEDOUT error unexpectedly #1121

Open
LukeLongworth opened this issue Feb 26, 2024 · 3 comments
Open

Comments

@LukeLongworth
Copy link
Contributor

Problem: I am getting a TIMEDOUT error with my bespoke validation function for an unknown reason. To try and diagnose it, I recreated the error in a very simple question:
image
image
Then at the PRT I just check whether ans1 = 1.

In this form, the question works exactly as intended, but when I un-comment the line that calls an integral, I get a TIMEDOUT error in the validation. This feels very strange to me. The only way I can recreate this error is by calling the defint function to integrate an exponential function with an argument of the form (constant*f(x)). I'm not even assigning values to a variable, I'm simply calling the function in the Question variables

Things that cause this to break:

  • int(e^(s*x),x,0,1)
  • int(%e^(s*x),x,0,1)
  • defint(e^(s*x),x,0,1)
  • int(%e^(s*x^2),x,0,1)
  • (s:1, int(e^(s*x),x,0,1)
  • int(e^(m*x),x,0,1)
  • int(e^(2*x),x,0,1)
  • laplace(e^(2*x),x,s)
  • assume(s>0); int(e^(x*ln(s)),x,0,1)

Things that don't cause this to break:

  • int(e^(s*x),x)
  • int(e^x,x,0,1)
  • laplace(e^x,x,s)
  • int(s*x^2,x,0,1)
  • assume(s>0); int(ln(s*x),x,0,1)
  • assume(s>0); int(s^x,x,0,1)
  • ev(subst([x=1],int(e^(s*x),x)) - subst([x=0],int(e^(s*x),x)),simp)
  • int(exp(s*x),x,0,1) (this confuses me the most)
  • assume(s>0); int(exp(x*ln(s)),x,0,1)

These issues do not persist when I call the problem function somewhere outside of the Question variables (e.g. in the Question text or General Feedback). I am not sure where to find the source code that calls bespoke validation functions, so I don't have any suggestions as to where the issue arises except that it seems to be about the defint function, sorry!

@sangwinc
Copy link
Member

@LukeLongworth I'm very sorry but I can't reproduce this on my test server! Can you email me your question and I'll try to break one of the older (live) servers.

Just to note that Maxima has an interactive integrator. Try the following on a desktop Maxima system

integrate(x^n,x);

It is possible this interactivity is causing the timeout.

@LukeLongworth
Copy link
Contributor Author

I've returned to this issue and have some updates:

Firstly, it doesn't seem to be defint after all, as I've discovered some extra functions that cause the issue:

  • int((sin(t)*e^(-2*t),t)
  • int((sinh(t)*e^(-2*t),t)
  • int((ln(t)*e^(-2*t),t)
    Even though the following do not cause the issue:
  • int(((e^(i*t) - e^(-i*t))/(2*i))*e^(-2*t),t)
  • int(((e^(t) - e^(-t))/2)*e(-2*t),t)

Secondly, this issue is persisting in STACK version 2024012900 in a different installation. Santiago kindly added me to an IDEMS test server so I could check, and I am observing the exact same behaviour, both when I import an existing question and create a new one. I've included this question (imported once from each server) below. I observe this this on both my work device and on my phone.

custom validation glitch.zip.zip

@sangwinc
Copy link
Member

@LukeLongworth, I can't reproduce the error, either on my development machine or on our public demo server
https://stack-demo.maths.ed.ac.uk/demo/
which is also running 2024012900. What value does your server have for the "timeout" in the STACK settings?
Perhaps a zoom call is needed to sort this all out?

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

No branches or pull requests

2 participants