Introduce a limit for warnings in a compile

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Introduce a limit for warnings in a compile

Parkinbot
As far as I know, there is currenty no means to break execution during a F5
and F6 compile. This gets especially a nasty problem, when OpenSCAD decides
to emit a very large number of warnings, e.g. when compiling some older
code. Sometimes also a simple initalization bug can cause such a behaviour.
Then it can happen that you have to wait minutes (up to and years) until
control comes back.

Wouldn't make it sense to introduce a limit on the number of warnings a
compile can output?




--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Introduce a limit for warnings in a compile

Troberg
I think the bigger issue is that you can't pause or stop execution. With a
complex model, you really want to be able to break a 3 minute render you
started, and then noticed an error in the code...



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Introduce a limit for warnings in a compile

Parkinbot
Yeah!
During F6 you can save your work, quit OpenSCAD and restart. But during F5
you rely on killing the task and can only continue with the lastest backup,
if you didn't explicitly save your work.

So in practice you make a typo in a variable name and get a million warnings
on a sweep, without any chance to break, or being able to find the reason
because of myriads warnings after control is back.  



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Introduce a limit for warnings in a compile

nophead
Have you tried turning on "Stop on first warning" in preferences?

On Mon, 25 Mar 2019 at 10:36, Parkinbot <[hidden email]> wrote:
Yeah!
During F6 you can save your work, quit OpenSCAD and restart. But during F5
you rely on killing the task and can only continue with the lastest backup,
if you didn't explicitly save your work.

So in practice you make a typo in a variable name and get a million warnings
on a sweep, without any chance to break, or being able to find the reason
because of myriads warnings after control is back. 



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
rew
Reply | Threaded
Open this post in threaded view
|

Re: Introduce a limit for warnings in a compile

rew
On Mon, Mar 25, 2019 at 10:41:56AM +0000, nop head wrote:
> Have you tried turning on "Stop on first warning" in preferences?

I would count that as a "workaround", and not as a solution.

In practice, users will encounter this problem when they least expect
it and (almost) never when they have prepared for it. So being able to
abort a lenghty render remains something that should be possible.

Imagine if I have a big project and:
  // this was guessed/aproximated from the preview...
  // translate ([30,40,50]) cube ([24, 28,33]);
  // ... now with the proper calculations:
  translate ([sin (angle1)*len3, cos(angle1)*len3, len4])
        cube ([atan(angle2)*len5, .... ]);

where you've worked an hour to determine the sin/cos atan etc stuff
but then end up in the un-interruptible stream of warnings due to a
typo. Losing the work on those coordinates would cause a lot of
frustration....

        Roger.


> On Mon, 25 Mar 2019 at 10:36, Parkinbot <[hidden email]> wrote:
>
> > Yeah!
> > During F6 you can save your work, quit OpenSCAD and restart. But during F5
> > you rely on killing the task and can only continue with the lastest backup,
> > if you didn't explicitly save your work.
> >
> > So in practice you make a typo in a variable name and get a million
> > warnings
> > on a sweep, without any chance to break, or being able to find the reason
> > because of myriads warnings after control is back.
> >
> >
> >
> > --
> > Sent from: http://forum.openscad.org/
> >
> > _______________________________________________
> > OpenSCAD mailing list
> > [hidden email]
> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
> >

> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


--
** [hidden email] ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Introduce a limit for warnings in a compile

nophead
Yes but with stop on first warning you get one warning and it stops. You fix that and F5 again and so on. It only goes on to the uninterruptible preview if it is clear of warnings. Yes it would be nice to interrupt that and sometime I can because sometimes it gives the progress bar with the cancel option and sometimes not, I think. 

On Mon, 25 Mar 2019 at 11:00, Rogier Wolff <[hidden email]> wrote:
On Mon, Mar 25, 2019 at 10:41:56AM +0000, nop head wrote:
> Have you tried turning on "Stop on first warning" in preferences?

I would count that as a "workaround", and not as a solution.

In practice, users will encounter this problem when they least expect
it and (almost) never when they have prepared for it. So being able to
abort a lenghty render remains something that should be possible.

Imagine if I have a big project and:
  // this was guessed/aproximated from the preview...
  // translate ([30,40,50]) cube ([24, 28,33]);
  // ... now with the proper calculations:
  translate ([sin (angle1)*len3, cos(angle1)*len3, len4])
        cube ([atan(angle2)*len5, .... ]);

where you've worked an hour to determine the sin/cos atan etc stuff
but then end up in the un-interruptible stream of warnings due to a
typo. Losing the work on those coordinates would cause a lot of
frustration....

        Roger.


> On Mon, 25 Mar 2019 at 10:36, Parkinbot <[hidden email]> wrote:
>
> > Yeah!
> > During F6 you can save your work, quit OpenSCAD and restart. But during F5
> > you rely on killing the task and can only continue with the lastest backup,
> > if you didn't explicitly save your work.
> >
> > So in practice you make a typo in a variable name and get a million
> > warnings
> > on a sweep, without any chance to break, or being able to find the reason
> > because of myriads warnings after control is back.
> >
> >
> >
> > --
> > Sent from: http://forum.openscad.org/
> >
> > _______________________________________________
> > OpenSCAD mailing list
> > [hidden email]
> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
> >

> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


--
** [hidden email] ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Introduce a limit for warnings in a compile

Parkinbot
nophead wrote
> Yes but with stop on first warning you get one warning and it stops. You
> fix that and F5 again and so on. It only goes on to the uninterruptible

Thanks, I didn't know this. I would be better if the option was "stop after
20 warnings" or so, but it lets you work at least.



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Introduce a limit for warnings in a compile

Troberg
In reply to this post by nophead
nophead wrote
> Have you tried turning on "Stop on first warning" in preferences?

That'll work for syntax errors, but not when you press F5, just to realize
that you forgot to change a value, or see that you accidentally misplaced a
decimal point. Then, you'll have to wait for a few minutes for something you
know will be wrong.

To be able to abort would be great, and something I'd use a lot.



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Introduce a limit for warnings in a compile

nophead
Not just syntax errors but also warnings about bad values, etc, but not typos that don't generate any warnings. But don't you need to see the render to spot those anyway?

On Tue, 26 Mar 2019 at 06:41, Troberg <[hidden email]> wrote:
nophead wrote
> Have you tried turning on "Stop on first warning" in preferences?

That'll work for syntax errors, but not when you press F5, just to realize
that you forgot to change a value, or see that you accidentally misplaced a
decimal point. Then, you'll have to wait for a few minutes for something you
know will be wrong.

To be able to abort would be great, and something I'd use a lot.



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Introduce a limit for warnings in a compile

Troberg
nophead wrote
> Not just syntax errors but also warnings about bad values, etc, but not
> typos that don't generate any warnings. But don't you need to see the
> render to spot those anyway?

Sometimes, but many times I see a screwup the second I hit F5. For example,
intending to change 12 to -12 on a bunch of lines, but inadvertedly changing
it to 1-2 on one of them.




--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Introduce a limit for warnings in a compile

lar3ry
In reply to this post by rew
On 25 Mar 2019 at 11:59, Rogier Wolff wrote:
> where you've worked an hour to determine the sin/cos atan etc stuff
> but then end up in the un-interruptible stream of warnings due to a
> typo. Losing the work on those coordinates would cause a lot of
> frustration....

I'd like to see  more generic solution to that problem. I have often written something that,
while it is not giving any errors, it is taking forever to render. I realize my mistake, but (as far
as I know) there is no way to interrupt it and get back the where I can modify and retry the
render.

My current workaround is to use CTRL-A to select all, Copy, then close the program and  run
it again (or reload the one my latest work was based on), and paste.

--
Magic trumps science for most people,
and wishful thinking drives a lot of decision-making.
    - Joe Haldeman


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Introduce a limit for warnings in a compile

adrianv
I definitely think we need some way to interrupt preview or render.   I've
worked on several models that take 10 minutes to render, and almost always
get into frustrating situations where I have to either wait or kill
OpenSCAD.  

I did realize that I could use an external editor which does help a great
deal with this situation.   (And I also like my editor better.)  But it is
still annoying that there's no "interrupt" button.  Is there some reason
this is difficult to implement?  Is there an open issue for this feature on
github?  




--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Introduce a limit for warnings in a compile

lar3ry
How does an external editor help?
I do like my Notepad++, but I haven't tried using it for OpenSCAD.

On 26 Mar 2019 at 14:29, adrianv wrote:

> I definitely think we need some way to interrupt preview or render.   I've
> worked on several models that take 10 minutes to render, and almost always
> get into frustrating situations where I have to either wait or kill
> OpenSCAD.  
>
> I did realize that I could use an external editor which does help a great
> deal with this situation.   (And I also like my editor better.)  But it is
> still annoying that there's no "interrupt" button.  Is there some reason
> this is difficult to implement?  Is there an open issue for this feature on
> github?  
>
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>


--
Magic trumps science for most people,
and wishful thinking drives a lot of decision-making.
    - Joe Haldeman


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Introduce a limit for warnings in a compile

doug.moen
An external editor helps because when you kill OpenSCAD, your editor window remains open.

On Tue, Mar 26, 2019, at 7:23 PM, [hidden email] wrote:

> How does an external editor help?
> I do like my Notepad++, but I haven't tried using it for OpenSCAD.
>
> On 26 Mar 2019 at 14:29, adrianv wrote:
> > I definitely think we need some way to interrupt preview or render.   I've
> > worked on several models that take 10 minutes to render, and almost always
> > get into frustrating situations where I have to either wait or kill
> > OpenSCAD.  
> >
> > I did realize that I could use an external editor which does help a great
> > deal with this situation.   (And I also like my editor better.)  But it is
> > still annoying that there's no "interrupt" button.  Is there some reason
> > this is difficult to implement?  Is there an open issue for this feature on
> > github?  
> >
> >
> >
> >
> > --
> > Sent from: http://forum.openscad.org/
> >
> > _______________________________________________
> > OpenSCAD mailing list
> > [hidden email]
> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
> >
>
>
> --
> Magic trumps science for most people,
> and wishful thinking drives a lot of decision-making.
>     - Joe Haldeman
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Introduce a limit for warnings in a compile

adrianv
In reply to this post by lar3ry
Well, you can debate whether it really constitutes "help" or not, but you can
set up OpenSCAD so it automatically previews if the file changes.  Then you
work in your preferred editor, and when you are ready to preview, you save
and OpenSCAD goes to work.  If something is wrong, you can kill OpenSCAD
without interfering with your editing activities.  Or you can continue to
edit while OpenSCAD works instead of being stuck with a completely dead
window.   Or you can run a 2nd OpenSCAD.  


lar3ry wrote
> How does an external editor help?
> I do like my Notepad++, but I haven't tried using it for OpenSCAD.





--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Introduce a limit for warnings in a compile

adrianv
I tried adding an issue for this and it was closed with this note:

"Render can be cancelled already (although there are limits to imposed by
external libraries when that can happen). Preview is covered by #1195."

Issue 1195 was opened in January 2015, it looks like.  So I guess don't hold
your breath on that one.  





--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Introduce a limit for warnings in a compile

MichaelAtOz
Administrator
In reply to this post by adrianv
> As far as I know, there is currenty no means to break execution during a F5
and F6 compile.

> I think the bigger issue is that you can't pause or stop execution. With a
> complex model, you really want to be able to break a 3 minute render you
started


Render/F6 can be cancelled, via the button to the right of the progress bar.
<http://forum.openscad.org/file/t359/Capture_F6_cancel.jpg>
It happens between CGAL calls which can't be interrupted (unless someone
want to improve it), so once it enters the, often long, final union, that
can't be interupted.

Preview/F5, there is an  issue
<https://github.com/openscad/openscad/issues/1195>   for that, contributions
are welcome.

> I'd like to see  more generic solution to that problem. I have often
> written something that,
> while it is not giving any errors, it is taking forever to render. I
> realize my mistake, but (as far
> as I know) there is no way to interrupt it and get back the where I can
> modify and retry the
> render.
> My current workaround is to use CTRL-A to select all, Copy, then close the
> program and  run
> it again (or reload the one my latest work was based on), and paste.

During a render/F6 you can Save or Save-As & Quit, if you have a slow PC it
may be clunky.

> where you've worked an hour to determine the sin/cos atan etc stuff
> but then end up in the un-interruptible stream of warnings due to a
> typo. Losing the work on those coordinates would cause a lot of
> frustration....

F5/F6 both backup the source if it has changed since the last save. See
here
<https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/FAQ#OpenSCAD_crashed/was_killed,_are_my_unsaved_changes_lost?>
.

That is the only path for a long F5 ATM, kill the process & get the backup
if you haven't save it.

For details on external editor use see  here
<https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_an_external_Editor_with_OpenSCAD>
.



-----
Admin - email* me if you need anything, or if I've done something stupid...

* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: Introduce a limit for warnings in a compile

lar3ry
In reply to this post by doug.moen
Thanks, Michael and Adrian. Between the stop button and the external editor,
I think I'll be pretty happy with it.





--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org