M
MichaelAtOz
Fri, Feb 24, 2017 2:12 AM
I was playing with assert() and got something funny.
After Preview this is expected:
http://forum.openscad.org/file/n20545/assert_a.jpg
But press F5 five more times, and you get:
http://forum.openscad.org/file/n20545/assert_b.jpg
On a previous occasion the following was true, but it is not happening now.
It stays that way until you add or delete a line in the editor.
Adding/changing text on an existing line does not have that effect.
This could be assert() or maybe console output. But generating an error,
like referencing an unknown variable, does not behave the same.
On 2017.01.20/64 W64
Admin - PM me if you need anything, or if I've done something stupid...
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!
View this message in context: http://forum.openscad.org/Strange-behaviour-with-assert-tp20545.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
I was playing with assert() and got something funny.
After Preview this is expected:
<http://forum.openscad.org/file/n20545/assert_a.jpg>
But press F5 five more times, and you get:
<http://forum.openscad.org/file/n20545/assert_b.jpg>
On a previous occasion the following was true, but it is not happening now.
It stays that way until you add or delete a line in the editor.
Adding/changing text on an existing line does not have that effect.
This could be assert() or maybe console output. But generating an error,
like referencing an unknown variable, does not behave the same.
On 2017.01.20/64 W64
-----
Admin - PM me if you need anything, or if I've done something stupid...
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!
--
View this message in context: http://forum.openscad.org/Strange-behaviour-with-assert-tp20545.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
MK
Marius Kintel
Fri, Feb 24, 2017 2:26 AM
On Feb 23, 2017, at 21:12, MichaelAtOz oz.at.michael@gmail.com wrote:
I was playing with assert() and got something funny.
> On Feb 23, 2017, at 21:12, MichaelAtOz <oz.at.michael@gmail.com> wrote:
>
> I was playing with assert() and got something funny.
>
I guess we should prioritize fixing this:
https://github.com/openscad/openscad/issues/454
-Marius
M
MichaelAtOz
Fri, Feb 24, 2017 5:10 AM
It is somewhat different, you get the error the first time, and the next four
times, it is the fifth when the msg disappears...
Admin - PM me if you need anything, or if I've done something stupid...
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!
View this message in context: http://forum.openscad.org/Strange-behaviour-with-assert-tp20545p20547.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
It is somewhat different, you get the error the first time, and the next four
times, it is the fifth when the msg disappears...
-----
Admin - PM me if you need anything, or if I've done something stupid...
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!
--
View this message in context: http://forum.openscad.org/Strange-behaviour-with-assert-tp20545p20547.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
NH
nop head
Fri, Feb 24, 2017 8:37 AM
It is very weird. Flushing the caches does not get it back but pressing F6
twice does!
On 24 February 2017 at 05:10, MichaelAtOz oz.at.michael@gmail.com wrote:
It is somewhat different, you get the error the first time, and the next
four
times, it is the fifth when the msg disappears...
Admin - PM me if you need anything, or if I've done something stupid...
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!
View this message in context: http://forum.openscad.org/
Strange-behaviour-with-assert-tp20545p20547.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
It is very weird. Flushing the caches does not get it back but pressing F6
twice does!
On 24 February 2017 at 05:10, MichaelAtOz <oz.at.michael@gmail.com> wrote:
> It is somewhat different, you get the error the first time, and the next
> four
> times, it is the fifth when the msg disappears...
>
>
>
> -----
> Admin - PM me if you need anything, or if I've done something stupid...
>
> 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!
> --
> View this message in context: http://forum.openscad.org/
> Strange-behaviour-with-assert-tp20545p20547.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
NH
nop head
Fri, Feb 24, 2017 10:05 AM
It is very weird. Flushing the caches does not get it back but pressing F6
twice does!
On 24 February 2017 at 05:10, MichaelAtOz oz.at.michael@gmail.com wrote:
It is somewhat different, you get the error the first time, and the next
four
times, it is the fifth when the msg disappears...
Admin - PM me if you need anything, or if I've done something stupid...
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!
View this message in context: http://forum.openscad.org/Stra
nge-behaviour-with-assert-tp20545p20547.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Perhaps this line is to blame:
https://github.com/openscad/openscad/blob/4a0ac7b2fa6e8ca390e3b95e1c2d2541cf9d77af/src/printutils.cc#L62
if (i == 5) return; // Suppress output after 5 equal ERROR or WARNING
outputs.
On 24 February 2017 at 08:37, nop head <nop.head@gmail.com> wrote:
> It is very weird. Flushing the caches does not get it back but pressing F6
> twice does!
>
> On 24 February 2017 at 05:10, MichaelAtOz <oz.at.michael@gmail.com> wrote:
>
>> It is somewhat different, you get the error the first time, and the next
>> four
>> times, it is the fifth when the msg disappears...
>>
>>
>>
>> -----
>> Admin - PM me if you need anything, or if I've done something stupid...
>>
>> 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!
>> --
>> View this message in context: http://forum.openscad.org/Stra
>> nge-behaviour-with-assert-tp20545p20547.html
>> Sent from the OpenSCAD mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> OpenSCAD mailing list
>> Discuss@lists.openscad.org
>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>
>
>
TP
Torsten Paul
Fri, Feb 24, 2017 10:07 AM
Yes, that's unrelated to the error caching topic. I've seen this
too before but could not really pin-point how that happens.
It might be some race condition in the console handling as this
tries to overwrite and restore output streams when compiling.
https://github.com/openscad/openscad/blob/master/src/mainwin.cc#L2788
On Linux that missing output might end up on the terminal window
if OpenSCAD was started from there.
A similar effect happens with long running F6 and pressing CTRL-S.
I guess changing that might be a bigger project, maybe even
including separating console log and application output. This
could also allow to at least prevent HTML support for the log
output.
ciao,
Torsten.
Yes, that's unrelated to the error caching topic. I've seen this
too before but could not really pin-point how that happens.
It might be some race condition in the console handling as this
tries to overwrite and restore output streams when compiling.
https://github.com/openscad/openscad/blob/master/src/mainwin.cc#L2788
On Linux that missing output might end up on the terminal window
if OpenSCAD was started from there.
A similar effect happens with long running F6 and pressing CTRL-S.
I guess changing that might be a bigger project, maybe even
including separating console log and application output. This
could also allow to at least prevent HTML support for the log
output.
ciao,
Torsten.
NH
nop head
Fri, Feb 24, 2017 10:10 AM
F6 fixes it because it adds "WARNING: no top level geometry", so the
circular buffer no longer has five messages the same. I think the buffer
should be cleared each time a new compilation is started.
On 24 February 2017 at 10:05, nop head nop.head@gmail.com wrote:
It is very weird. Flushing the caches does not get it back but pressing
F6 twice does!
On 24 February 2017 at 05:10, MichaelAtOz oz.at.michael@gmail.com
wrote:
It is somewhat different, you get the error the first time, and the next
four
times, it is the fifth when the msg disappears...
Admin - PM me if you need anything, or if I've done something stupid...
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!
View this message in context: http://forum.openscad.org/Stra
nge-behaviour-with-assert-tp20545p20547.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
F6 fixes it because it adds "WARNING: no top level geometry", so the
circular buffer no longer has five messages the same. I think the buffer
should be cleared each time a new compilation is started.
On 24 February 2017 at 10:05, nop head <nop.head@gmail.com> wrote:
> Perhaps this line is to blame: https://github.com/openscad/openscad/blob/
> 4a0ac7b2fa6e8ca390e3b95e1c2d2541cf9d77af/src/printutils.cc#L62
>
> if (i == 5) return; // Suppress output after 5 equal ERROR or WARNING
> outputs.
>
> On 24 February 2017 at 08:37, nop head <nop.head@gmail.com> wrote:
>
>> It is very weird. Flushing the caches does not get it back but pressing
>> F6 twice does!
>>
>> On 24 February 2017 at 05:10, MichaelAtOz <oz.at.michael@gmail.com>
>> wrote:
>>
>>> It is somewhat different, you get the error the first time, and the next
>>> four
>>> times, it is the fifth when the msg disappears...
>>>
>>>
>>>
>>> -----
>>> Admin - PM me if you need anything, or if I've done something stupid...
>>>
>>> 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!
>>> --
>>> View this message in context: http://forum.openscad.org/Stra
>>> nge-behaviour-with-assert-tp20545p20547.html
>>> Sent from the OpenSCAD mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> OpenSCAD mailing list
>>> Discuss@lists.openscad.org
>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>>
>>
>>
>
NH
nop head
Fri, Feb 24, 2017 10:51 AM
Added lastmessages.clear() into resetPrintedDepracations() seems to fix it,
although perhaps the name of the function should be changed to
resetPrintCounts or something.
void resetPrintedDeprecations()
{
printedDeprecations.clear();
lastmessages.clear();
}
On 24 February 2017 at 10:10, nop head nop.head@gmail.com wrote:
F6 fixes it because it adds "WARNING: no top level geometry", so the
circular buffer no longer has five messages the same. I think the buffer
should be cleared each time a new compilation is started.
On 24 February 2017 at 10:05, nop head nop.head@gmail.com wrote:
Perhaps this line is to blame: https://github.com/openscad/op
enscad/blob/4a0ac7b2fa6e8ca390e3b95e1c2d2541cf9d77af/src/
printutils.cc#L62
if (i == 5) return; // Suppress output after 5 equal ERROR or WARNING
outputs.
On 24 February 2017 at 08:37, nop head nop.head@gmail.com wrote:
It is very weird. Flushing the caches does not get it back but pressing
F6 twice does!
On 24 February 2017 at 05:10, MichaelAtOz oz.at.michael@gmail.com
wrote:
It is somewhat different, you get the error the first time, and the
next four
times, it is the fifth when the msg disappears...
Admin - PM me if you need anything, or if I've done something stupid...
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!
View this message in context: http://forum.openscad.org/Stra
nge-behaviour-with-assert-tp20545p20547.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Added lastmessages.clear() into resetPrintedDepracations() seems to fix it,
although perhaps the name of the function should be changed to
resetPrintCounts or something.
void resetPrintedDeprecations()
{
printedDeprecations.clear();
lastmessages.clear();
}
On 24 February 2017 at 10:10, nop head <nop.head@gmail.com> wrote:
> F6 fixes it because it adds "WARNING: no top level geometry", so the
> circular buffer no longer has five messages the same. I think the buffer
> should be cleared each time a new compilation is started.
>
> On 24 February 2017 at 10:05, nop head <nop.head@gmail.com> wrote:
>
>> Perhaps this line is to blame: https://github.com/openscad/op
>> enscad/blob/4a0ac7b2fa6e8ca390e3b95e1c2d2541cf9d77af/src/
>> printutils.cc#L62
>>
>> if (i == 5) return; // Suppress output after 5 equal ERROR or WARNING
>> outputs.
>>
>> On 24 February 2017 at 08:37, nop head <nop.head@gmail.com> wrote:
>>
>>> It is very weird. Flushing the caches does not get it back but pressing
>>> F6 twice does!
>>>
>>> On 24 February 2017 at 05:10, MichaelAtOz <oz.at.michael@gmail.com>
>>> wrote:
>>>
>>>> It is somewhat different, you get the error the first time, and the
>>>> next four
>>>> times, it is the fifth when the msg disappears...
>>>>
>>>>
>>>>
>>>> -----
>>>> Admin - PM me if you need anything, or if I've done something stupid...
>>>>
>>>> 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!
>>>> --
>>>> View this message in context: http://forum.openscad.org/Stra
>>>> nge-behaviour-with-assert-tp20545p20547.html
>>>> Sent from the OpenSCAD mailing list archive at Nabble.com.
>>>>
>>>> _______________________________________________
>>>> OpenSCAD mailing list
>>>> Discuss@lists.openscad.org
>>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>>>
>>>
>>>
>>
>
NH
nop head
Fri, Feb 24, 2017 10:55 AM
As an aside I could make this a PR, but as I have another PR outstanding
how do I manage that in git? Do I do a new branch from master, if so how do
I get both fixes in my local build if they are on separate git branches.
On 24 February 2017 at 10:51, nop head nop.head@gmail.com wrote:
Added lastmessages.clear() into resetPrintedDepracations() seems to fix
it, although perhaps the name of the function should be changed to
resetPrintCounts or something.
void resetPrintedDeprecations()
{
printedDeprecations.clear();
lastmessages.clear();
}
On 24 February 2017 at 10:10, nop head nop.head@gmail.com wrote:
F6 fixes it because it adds "WARNING: no top level geometry", so the
circular buffer no longer has five messages the same. I think the buffer
should be cleared each time a new compilation is started.
On 24 February 2017 at 10:05, nop head nop.head@gmail.com wrote:
Perhaps this line is to blame: https://github.com/openscad/op
enscad/blob/4a0ac7b2fa6e8ca390e3b95e1c2d2541cf9d77af/src/pri
ntutils.cc#L62
if (i == 5) return; // Suppress output after 5 equal ERROR or WARNING
outputs.
On 24 February 2017 at 08:37, nop head nop.head@gmail.com wrote:
It is very weird. Flushing the caches does not get it back but pressing
F6 twice does!
On 24 February 2017 at 05:10, MichaelAtOz oz.at.michael@gmail.com
wrote:
It is somewhat different, you get the error the first time, and the
next four
times, it is the fifth when the msg disappears...
Admin - PM me if you need anything, or if I've done something stupid...
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!
View this message in context: http://forum.openscad.org/Stra
nge-behaviour-with-assert-tp20545p20547.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
As an aside I could make this a PR, but as I have another PR outstanding
how do I manage that in git? Do I do a new branch from master, if so how do
I get both fixes in my local build if they are on separate git branches.
On 24 February 2017 at 10:51, nop head <nop.head@gmail.com> wrote:
> Added lastmessages.clear() into resetPrintedDepracations() seems to fix
> it, although perhaps the name of the function should be changed to
> resetPrintCounts or something.
>
> void resetPrintedDeprecations()
> {
> printedDeprecations.clear();
> lastmessages.clear();
> }
>
>
> On 24 February 2017 at 10:10, nop head <nop.head@gmail.com> wrote:
>
>> F6 fixes it because it adds "WARNING: no top level geometry", so the
>> circular buffer no longer has five messages the same. I think the buffer
>> should be cleared each time a new compilation is started.
>>
>> On 24 February 2017 at 10:05, nop head <nop.head@gmail.com> wrote:
>>
>>> Perhaps this line is to blame: https://github.com/openscad/op
>>> enscad/blob/4a0ac7b2fa6e8ca390e3b95e1c2d2541cf9d77af/src/pri
>>> ntutils.cc#L62
>>>
>>> if (i == 5) return; // Suppress output after 5 equal ERROR or WARNING
>>> outputs.
>>>
>>> On 24 February 2017 at 08:37, nop head <nop.head@gmail.com> wrote:
>>>
>>>> It is very weird. Flushing the caches does not get it back but pressing
>>>> F6 twice does!
>>>>
>>>> On 24 February 2017 at 05:10, MichaelAtOz <oz.at.michael@gmail.com>
>>>> wrote:
>>>>
>>>>> It is somewhat different, you get the error the first time, and the
>>>>> next four
>>>>> times, it is the fifth when the msg disappears...
>>>>>
>>>>>
>>>>>
>>>>> -----
>>>>> Admin - PM me if you need anything, or if I've done something stupid...
>>>>>
>>>>> 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!
>>>>> --
>>>>> View this message in context: http://forum.openscad.org/Stra
>>>>> nge-behaviour-with-assert-tp20545p20547.html
>>>>> Sent from the OpenSCAD mailing list archive at Nabble.com.
>>>>>
>>>>> _______________________________________________
>>>>> OpenSCAD mailing list
>>>>> Discuss@lists.openscad.org
>>>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>>>>
>>>>
>>>>
>>>
>>
>
TP
Torsten Paul
Fri, Feb 24, 2017 11:33 AM
Ah, good catch, that perfectly matches the issue description.
As an aside I could make this a PR, but as I have another
PR outstanding how do I manage that in git? Do I do a new
branch from master, if so how do I get both fixes in my
local build if they are on separate git branches.
Yes, the common way would be to create another branch based
on master and create a pull request for that.
As this fix looks good I'd expect Marius to merge that
pretty quick so it might be fine to just wait for that to
show up in master and merge it back to your other local
fix branch.
Otherwise it's indeed a bit more work to have a local branch
with both fixes. I usually just create some testing branch in
case I need some version that combines multiple fixes or
features.
E.g. simply:
git checkout -b combined-fixes master
git merge fix1 fix2
There might be better ways to do that, but as I don't need
that very often, I did not research much into that direction.
ciao,
Torsten.
Ah, good catch, that perfectly matches the issue description.
> As an aside I could make this a PR, but as I have another
> PR outstanding how do I manage that in git? Do I do a new
> branch from master, if so how do I get both fixes in my
> local build if they are on separate git branches.
>
Yes, the common way would be to create another branch based
on master and create a pull request for that.
As this fix looks good I'd expect Marius to merge that
pretty quick so it might be fine to just wait for that to
show up in master and merge it back to your other local
fix branch.
Otherwise it's indeed a bit more work to have a local branch
with both fixes. I usually just create some testing branch in
case I need some version that combines multiple fixes or
features.
E.g. simply:
git checkout -b combined-fixes master
git merge fix1 fix2
There might be better ways to do that, but as I don't need
that very often, I did not research much into that direction.
ciao,
Torsten.