Steps to reproduce the issue
Just click this link (making sure you have a Joomla 4 site with demo data and logged out) - then change the domain name to be that of your local Joomla 4 install
http://0.0.0.0:8087/index.php/en/blog?view=form&layout=edit&a_id=4&catid=8&return=aHR0cDovLzAuMC4wLjA6ODA4Ny9pbmRleC5waHAvZW4vYmxvZy80LWFib3V0LXlvdXItaG9tZS1wYWdlLWVuLWdi
Expected result
No errors - possible a 403 Forbidden (as you are not logged in) or a 404 at a push
Actual result
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /Users/phil/Sites/joomla-cms/libraries/src/Event/AbstractEvent.php on line 132
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0
Warning: Unknown: Cannot call session save handler in a recursive manner in Unknown on line 0
System information (as much as possible)
Session save handler not touched from a default install.
Additional comments
To replicate this first I was editing a front end article and pressed CMD+Q and chrome closed, when restarted I was logged out with this error - but now I can reproduce it on demand.
actually this is happening on any 404 page at the moment
http://0.0.0.0:8087/index.php/en/easdgasdfsadfasdfasdfgaefg
http://0.0.0.0:8087/index.php/en/inasdfasdfasdfasdfasdfjashdkfj%20h