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

If I write any uppercase letter (for example R15) into dimension input box solvespace crash #1428

Open
dadoprom opened this issue Nov 29, 2023 · 2 comments

Comments

@dadoprom
Copy link

System information

  • SolveSpace version: 3.1~727b0153 - Latest from git
  • Operating system: Lubuntu 22.04.3

Expected behavior

I sketched a circle and wanted to add dimension as radius with R15 in the dimesion input box, this is not working

Actual behavior

If I write any uppercase letter (for example R15) into dimension input box solvespace crash

Additional information

Solvespace does not crash when you write lowercase letters into dimension input box

@phkahler
Copy link
Member

@dadoprom This is a known issue and will be fixed when we allow more arbitrary input for #77 Parametric sketches.

If you want to enter a radius instead of a diameter, click on the dimension (just select it, don't double click to edit. The dimension will show in the text window and a checkbox will allow you to change it from diameter to radius.

@dgramop
Copy link
Contributor

dgramop commented Dec 6, 2023

Right now solve space does crash (like the process dies) when you do this. I was able to replicate

If your dimension starts with a letter, then it crashes. Otherwise it gives you the popup as expected

Action:
Type in R15 into a dimension box.

Actual behavior:
Solvespace crashes

Expected behavior: A popup telling you you can't put a letter there
Screenshot 2023-12-06 at 12 57 10 PM

Here's the assertion it hits, that causes SolveSpace to crash:

 frame #4: 0x0000000100282e14 SolveSpace`SolveSpace::AssertFailure(file="/Users/dgramop/Projects/solvespace/src/expr.cpp", line=342, function="Eval", condition="false", message="Not supported yet") at util.cpp:15:5

dgramop added a commit to dgramop/solvespace that referenced this issue Dec 6, 2023
See solvespace#1428. Unimpl markers for solvespace#77 lead to an assert failing if the user
accidentally enters an uppercase letter as the first character of a
dimension. This leads to the application crashing unexpectedly. Now it
shows the expected error message
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

3 participants