morpho icon indicating copy to clipboard operation
morpho copied to clipboard

[Bug] Overflow in mesh constructor

Open ancaandrei opened this issue 4 years ago • 9 comments

Describe the bug Error 'IndxBnds': Index out of bounds. in AreaMesh at line 82 from global at line 9

To Reproduce Steps to reproduce the behavior:

  1. Go to '../morpho/examples/cholesteric/cholesteric.morpho'
  2. Change dx to dx = 0.00000000001
  3. Run morpho5 cholesteric.morpho
  4. See error

Expected behavior Error should not be there or the error should say that the mesh has an upper bound.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

ancaandrei avatar Oct 27 '21 21:10 ancaandrei

What's the status of this?

softmattertheory avatar Nov 21 '21 14:11 softmattertheory

I have not yet started debugging this issue

ConduitDan avatar Nov 22 '21 15:11 ConduitDan

Great can you de-assign yourself @ConduitDan and reassign when you're actively working on it. It may be something I jump in on (it's a minor error really...)

softmattertheory avatar Nov 23 '21 14:11 softmattertheory

So i think what we need to do is add range count checking to the functions in mesh builder. What is the current preferred method if the check fails. I don't think there is a way of throwing an error yet.

ConduitDan avatar Nov 30 '21 20:11 ConduitDan

I'll start with a printed error with a return nil

ConduitDan avatar Nov 30 '21 20:11 ConduitDan

Agreed @ConduitDan I think this needs 0.6 and error raising...

softmattertheory avatar Dec 07 '21 22:12 softmattertheory

We've got error raising now! I'm assigning to me!

ConduitDan avatar Feb 22 '22 15:02 ConduitDan

Woohoo error raising!

softmattertheory avatar Feb 22 '22 15:02 softmattertheory

Revisiting this

ConduitDan avatar Mar 29 '22 14:03 ConduitDan