Author Topic: Most annoying bug....  (Read 10631 times)

0 Members and 1 Guest are viewing this topic.

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Most annoying bug....
« Reply #25 on: October 23, 2015, 02:03:52 pm »
languages should be case insensitive. shoot the developers.

WTF? Languages should be case insensitive? L and l are clearly different glyphs, I can't imagine why anyone would ever expect them to compare equal.
No longer active here - try the IRC channel if you just can't be without me :)
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19517
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Most annoying bug....
« Reply #26 on: October 23, 2015, 02:38:47 pm »
It didn't help that, in the default font used by the IDE, the two are virtually impossible to distinguish.

And that's the generic problem that you will automatically avoid in the future! Everybody knows about 0 and O, but L l 1 are just as problematic.

N0rmaLLy I'd expect a parser to ch0ke and c0mpLain if I transp0se '0' with 'o', th0ugh.

Why? Presumably the tokens were correct within the specified grammar.

Quote
In this case, n0 error was generated; my instructi0n t0 actuaLLy d0wnL0ad this part 0f the c0de t0 the b0ard was simpLy ign0red. I usuaLLy expect capital and L0wer case Letters t0 be interchangeabLe, 0r t0 thr0w an err0r!

That depends on the grammar in use.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19517
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Most annoying bug....
« Reply #27 on: October 23, 2015, 02:39:34 pm »
Spot the difference. View at 1:1 scale from the distance you'd normally view a screen full of code!

That font is not fit for that purpose. End of story!
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline rollatorwieltje

  • Supporter
  • ****
  • Posts: 571
  • Country: nl
  • I brick your boards.
Re: Most annoying bug....
« Reply #28 on: October 23, 2015, 03:03:26 pm »
Spot the difference. View at 1:1 scale from the distance you'd normally view a screen full of code!
Looks like that garbage font Microsoft introduced in Windows Vista. I think it's called Segoe or something like that. I pretty much use Dina everywhere: https://www.donationcoder.com/Software/Jibz/Dina/

Hrm. I'd not seen Dina before, and I like one thing about it - it makes the classic 1I|l 0O distinction better even than my current preferred font (Terminus). I want that. Problem is, I find the rest of the font very tedious to look at. It's ugly.

But then, I'm insanely picky about fonts. Maybe sometime I'll make myself a modified Terminus - pull in those Dina-style 1I|l 0O, and pull in the 9pt bold from Terminusmod, at least.
Dina 9pt feels to narrow for me, I mostly use 10pt (on a 22" full hd monitor), sometimes 8pt. And on a dark background whenever possible.
 

Offline Wilksey

  • Super Contributor
  • ***
  • Posts: 1329
Re: Most annoying bug....
« Reply #29 on: October 23, 2015, 03:08:38 pm »
No.  XC8 is based on the HiTech PICC and PICC18 compilers (Microchip bought HiTech), but XC16 and XC32 are based on GCC.

Ah, OK, 1/3rd right anyway :)
 

Online krish2487

  • Frequent Contributor
  • **
  • Posts: 500
  • Country: dk
Re: Most annoying bug....
« Reply #30 on: October 23, 2015, 04:12:16 pm »


Try the source code pro font family from Adobe.
I believe that this particular font family was designed to clearly distinguish between
i I l L 1 ! o O 0 and the similar.

PS: It is also easy on the eyes as a terminal font.


Quote from: c4757p on Today at 12:52:59 AM

>
If god made us in his image,
and we are this stupid
then....
 

Offline max_torque

  • Super Contributor
  • ***
  • Posts: 1282
  • Country: gb
    • bitdynamics
Re: Most annoying bug....
« Reply #31 on: October 23, 2015, 10:12:16 pm »
One bug that i know about, that just seems to get me time after time is the "Spi jumps into slave mode" one on AVR micros.  Set it up as a spi, master but leave the SS pin as an input (which tends to be my default port setting for unused pins when just messing around on breadboards etc) and if it goes low, the micro jumps to being a slave without some much as a "by your leave".........  fricking annoying!
 

Offline ale500

  • Frequent Contributor
  • **
  • Posts: 415
Re: Most annoying bug....
« Reply #32 on: October 24, 2015, 07:45:33 am »
I remember this bug we were blamed for. Two teams, the "starts" and we. The "stars" blame us, we receive a stream of data, buffer it (double buffer) and give it to the stars' library. Boom crash. They say we overwrite the data (double buffer system with synchronized call to another task). I log every event, which buffer I use to receive and which buffer I give to the other thread... no overwrite over many many cycles... but it crashes at some point. I fire up the debugger and patiently go through the code, optimized C code is quite difficult to follow with a disassembler... after some time I realize what happens... they, the "stars" forgot to initialize a structure where the data would be copied and some fields had old data... Even showing them the problem did not convince them... but they fixed it and there were no more crashes.... I was fortunate enough to have this logging mechanism as it clearly showed that the problem was somewhere else... as someone here says "there are big lies, small lies and what is on the screen of the oscilloscope".
Alignment problems in MIPS32 (PIC32), yeah I found out the hard way too... arm cortex-m3 has no problem with unaligned data...
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8276
Re: Most annoying bug....
« Reply #33 on: October 24, 2015, 03:29:51 pm »
Spot the difference. View at 1:1 scale from the distance you'd normally view a screen full of code!
I found it pretty quickly because my monitor is not one of those ridiculously high-resolution ones and I can actually see the pixels. (You can thank Apple for that stupid "retina" trend...)

Spot the difference. View at 1:1 scale from the distance you'd normally view a screen full of code!

Jesus Christ, that's bad. Whoever selected that font should be shot, as well as whoever designed it if it was intended for this sort of thing.

Real fonts make those much more recognizable:
I think I use that font too! Is it https://en.wikipedia.org/wiki/Fixed_(typeface) ?
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Most annoying bug....
« Reply #34 on: October 24, 2015, 03:47:16 pm »
Terminus.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5319
  • Country: gb
Re: Most annoying bug....
« Reply #35 on: October 25, 2015, 09:13:26 am »
Alignment problems in MIPS32 (PIC32), yeah I found out the hard way too... arm cortex-m3 has no problem with unaligned data...

.... Functionally maybe, but non-functionally, you can expect a hit on performance depending on the circumstances. As a real example (in code rather than data, but the same applies to data), if you use Thumb-2 extensions mixing 16 and 32 bit instructions, and you happen to have a string of adjacent 32 bit instructions straddling the word boundary, this will run significantly slower than the same code word aligned. The same applies to non-word aligned data accesses. Of course if all you're doing are a few byte by byte string manipulations there is no difference, unless it's been optimised to assume word alignment that is!

That doesn't excuse the XC32 string word alignment assumption, that is bad.

So there's no free lunch on ARM, and in the real case I describe of unexplained performance degradation, that took a couple of days to figure out, which is also the reason why any low level embedded programmer should not be afraid to routinely look at the disassembly in memory, even if they never intend to write any assembly language, or indeed understand what's been generated at anything more than a cursory level.
 

Offline crispy_tofu

  • Super Contributor
  • ***
  • Posts: 1124
  • Country: au
Re: Most annoying bug....
« Reply #36 on: October 25, 2015, 09:44:07 am »
Spot the difference. View at 1:1 scale from the distance you'd normally view a screen full of code!

 :o That's horrible.  |O Looks like the designers were having a nap while doing the l and I...
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf