makaip / mathematix

A nodeblock-based math webapp.
https://makaip.github.io/mathematix/
GNU General Public License v3.0
4 stars 0 forks source link

Graph Rendering Errors From Nerdamer Implementation #16

Closed makaip closed 8 months ago

makaip commented 8 months ago

We should consider switching back to eval() temporarily bc Radical functions crash the website and Reciprocal functions don't render :(

AlexanderJCS commented 8 months ago

Reciprocal functions were never able to render.

I was considering moving everything except asymptote detection back to eval(), which will also give perf improvements

I can fix all nerdamer-related issues with this later today.

makaip commented 8 months ago

Looks like some sort of parsing error with writing the operations to the function blocks in events.js or something idk lol. Here's the error for Division, which doesn't render, but the page is still responsive.

e {name: 'ParseError', message: 'Division by zero not allowed!: 4: undefined', stack: 'ParseError: Division by zero not allowed!: 4: unde…kaip.github.io/mathematix/editor/events.js:160:5)'}
P.parseRPN @ all.min.js:1
P.parse @ all.min.js:1
(anonymous) @ all.min.js:1
ye @ all.min.js:1
$e @ all.min.js:1
drawGridRenderer @ draw.js:72
(anonymous) @ events.js:160

Here's the error for Radicals/Logarithms, which only freezes on Windows 10 in Google Chrome. However, it still runs on Mac. There appears to be some sort of error with draw calls as users can still click the function type toggles, where after a long delay, the frame finally unfreezes.

all.min.js:1 Uncaught e {name: 'ParseError', message: '5 does not equal 0: 3', stack: 'ParseError: 5 does not equal 0: 3\n    at new e (ht…aip.github.io/mathematix/editor/events.js:155:45)'}
AlexanderJCS commented 8 months ago

This, makai, is when we use try/catch blocks. and no, they are not better than chat gpt.

This seems pretty straightforward. I'll fix later today