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

The variable REBLOCKS/PAGE::*CURRENT-PAGE* is unbound. #61

Open
mikeivanov opened this issue Jul 17, 2024 · 1 comment
Open

The variable REBLOCKS/PAGE::*CURRENT-PAGE* is unbound. #61

mikeivanov opened this issue Jul 17, 2024 · 1 comment

Comments

@mikeivanov
Copy link

mikeivanov commented Jul 17, 2024

I'm randomly getting an error message saying "The variable REBLOCKS/PAGE::CURRENT-PAGE is unbound." while playing with a slightly modified version of the task list tutorial.

I couldn't figure out the pattern, so I suspect some kind of concurrency bug or whatnot. (sometimes I do noting in the browser and it just pops up in the repl)

Any hints on where to start hunting for it?

@svetlyak40wt
Copy link
Member

This is a dynamic variable bound only during the http request processing.

If you are calling some functions relied on this var in the REPL or in a separate thread, then you have to capture the original value of the variable and rebind it in the thread.

For example of such capturing, see this IN-THREAD macro of REBLOCKS-WEBSOCKET system: https://github.com/40ants/reblocks-websocket/blob/master/src/websocket.lisp#L541-L570

Also see this corresponding issue: 40ants/reblocks-websocket#4

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