List of Resolved Bugs

General discussion on mikroC.
Author
Message
pizon
mikroElektronika team
Posts: 823
Joined: 11 Oct 2004 08:53

List of Resolved Bugs

#1 Post by pizon » 12 Aug 2005 10:26

Last Update: 2005-12-28

Here follows a list of bugs that have been resolved so far.

--
Last edited by pizon on 29 Dec 2005 11:43, edited 1 time in total.

pizon
mikroElektronika team
Posts: 823
Joined: 11 Oct 2004 08:53

Re: List of Resolved Bugs

#2 Post by pizon » 12 Aug 2005 10:29

Bug ID: #051104301
Submitted by: thieulam

Severity: Minor
Status: Status: Resolved since 5.0.0.0

Description:
Trying to perform division on two floats (doubles) generates linker error and the project does not get compiled.

The floating point division routine does not initialize all the registers it uses, which causes the linker not to link some of the temporaries used.

Workaround:
Perform any of the 3 remaining operations (+ - *) on floats, anywhere in the project code. This will, as a side effect, initialize all the registers needed.


Notes:
On PIC18 only.

pizon
mikroElektronika team
Posts: 823
Joined: 11 Oct 2004 08:53

Re: List of Resolved Bugs

#3 Post by pizon » 12 Aug 2005 10:30

Bug ID: #050511301
Submitted by: rajkovic

Severity: Minor
Status: Resolved since 2.0.0.3

Description:
Under certain conditions, local variables declared as static are altered between the function calls, i.e. the linker shares them although it shouldn't.

Workaround:
Use only global static variables.

The bug has been resolved, and will be included in the following patch.

-

pizon
mikroElektronika team
Posts: 823
Joined: 11 Oct 2004 08:53

Re: List of Resolved Bugs

#4 Post by pizon » 12 Aug 2005 10:31

Bug ID: #050511302
Submitted by: gambrose

Severity: Moderate
Status: Resolved since 2.0.0.3

Description:
When trying to use the functions from the Keypad library for PIC16, the code cannot compile properly.

Workaround:
None.

The bug has been resolved, and will be included in the following patch.

-

pizon
mikroElektronika team
Posts: 823
Joined: 11 Oct 2004 08:53

Re: List of Resolved Bugs

#5 Post by pizon » 12 Aug 2005 10:33

Bug ID: #050530301
Submitted by: R.Rivett

Severity: Moderate
Status: Resolved since 2.1.0.0.

Description:
Expressions that use variables larger than 1 byte are evaluated incorrectly in if..then, while.. and do..while constructs if the construct is the last piece of code in the source file:

Code: Select all

long aa;

void main() {

 while(1) {
   aa = 511;

   if(aa < 512)     // won't work without the dummy assignment
     Delay_ms(100);
   else
     Delay_ms(1000);


   if(aa < 513)     // won't work without the dummy assignment
     Delay_ms(100);
   else
     Delay_ms(1000);

   while(aa < 512)  // won't work without the dummy assignment
     aa++;

   do {             // won't work without the dummy assignment
     asm nop;
   } while(aa < 512);

 }
}//~!
This bug exists both for PIC16 and PIC18 families, and is manifested on variables larger than 1-byte: (un)signed int, (un)signed long;

Workaround:
Add a dummy assignment statement after the last condition evaluation construct:

Code: Select all

long aa;
short ss1;

void main() {

 while(1) {
   aa = 511;

   if(aa < 512)
     Delay_ms(100);
   else
     Delay_ms(1000);


   if(aa < 513)
     Delay_ms(100);
   else
     Delay_ms(1000);


   while(aa < 512)
     aa++;

   do {
     asm nop;
   } while(aa < 512);

   (short)ss1;      // dummy assignment statement, just pushes ss1 (single byte)
                    //   to software stack (2 asm instructions).
 }
}//~!

-

pizon
mikroElektronika team
Posts: 823
Joined: 11 Oct 2004 08:53

Re: List of Resolved Bugs

#6 Post by pizon » 12 Aug 2005 10:34

Bug ID: #050531301
Submitted by: zristic

Severity: Major
Status: Resolved since 2.1.0.0.

Description:
Using interrupts on PIC16 MCUs for codes over 2K causes unpredictable programme behaviour.

Workaround:
Make sure this instruction is the first one in the interrupt() routine:

Code: Select all

PCLATH = 0;
The PCLATH register should be cleared by compiler.

--

User avatar
rajkovic
mikroElektronika team
Posts: 694
Joined: 16 Aug 2004 12:40

Re: List of Resolved Bugs

#7 Post by rajkovic » 23 Dec 2005 11:52

Bug ID: #051203301
Submitted by: reab

Severity: Moderate
Status: Resolved since 5.0.0.0

Description:
The EEPROM Editor tool does not pass values over 127-th byte in EEPROM.

This bug is tool-related, so it matters both for PIC16 and PIC18 families.

Workaround:
Edit EEPROM values in PICFlash programmer - it has its own EEPROM tool, similar to the one of the compiler.

User avatar
rajkovic
mikroElektronika team
Posts: 694
Joined: 16 Aug 2004 12:40

Re: List of Resolved Bugs

#8 Post by rajkovic » 23 Dec 2005 11:57

Bug ID: #051104301
Submitted by: thieulam

Severity: Minor
Status: Resolved since 5.0.0.0

Description:
Trying to perform division on two floats (doubles) generates linker error and the project does not get compiled.

The floating point division routine does not initialize all the registers it uses, which causes the linker not to link some of the temporaries used.

Workaround:
Perform any of the 3 remaining operations (+ - *) on floats, anywhere in the project code. This will, as a side effect, initialize all the registers needed.


Notes:
On PIC18 only.

User avatar
rajkovic
mikroElektronika team
Posts: 694
Joined: 16 Aug 2004 12:40

#9 Post by rajkovic » 23 Dec 2005 11:59

Bug ID: #050520301
Submitted by: rajkovic

Severity: Moderate
Status: Resolved since 5.0.0.0

Description:
If one function that returns value is called more than once within a single expression, each new call will overwrite the result of the previous one. For example:

Code: Select all

i = My_Function1(2) + My_Function1(5);
will not compile properly.
This does not apply to different functions, e.g.

Code: Select all

i = My_Function1(2) + My_Function2(102) + My_Function3(23) + ....;
will work OK.


Workaround:
Use one call per expression:

Code: Select all

i = My_Function1(2);
i += My_Function1(5);
...

User avatar
rajkovic
mikroElektronika team
Posts: 694
Joined: 16 Aug 2004 12:40

#10 Post by rajkovic » 23 Dec 2005 12:01

Bug ID: #050812301
Submitted by: tuancdc

Severity: Moderate
Status: Resolved since 5.0.0.0

Description:
Structures cannot be put inside unions.

Workaround:
None.

Note:
None.

-

User avatar
rajkovic
mikroElektronika team
Posts: 694
Joined: 16 Aug 2004 12:40

#11 Post by rajkovic » 23 Dec 2005 12:07

Bug ID: #051004301
Submitted by: graham

Severity: Major
Status: Resolved since 5.0.0.0

Description:
If you try to access member of a structure indirectly, you won't get proper value if structure is located outside Bank 0 or Access Bank.

Code: Select all

typedef struct menulist {
        char menuname[16];
        int menuid;
} Menulist;

MenuList *menustruct;
...
menustruct->.menuname = 'a';     // works only if menuname is in Bank0 or Access Bank

(*menustruct).menuname = 'a';    // same as previous, just different syntax
Workaround:
There is practically no workaround for this bug, which makes it a Major one. A couple of things that user can do are:
  • - make sure that all the structures you plan to access indirectly are located in Bank 0 or Access Bank,
    - access structures directly:

    Code: Select all

    my_structure.my_element = 3;
Note:

User avatar
rajkovic
mikroElektronika team
Posts: 694
Joined: 16 Aug 2004 12:40

#12 Post by rajkovic » 23 Dec 2005 12:10

Bug ID: #050914301
Submitted by: vanja

Severity: Minor
Status: Resolved since 5.0.0.0

Description:
Functions that return some value (i.e. are non-void) must have all exits covered with the return directive, otherwise the code will behave in unexpected (and unknown) way.

Workaround:
Don't miss any returns!

Note:
According to ANSI C standard, omitting the return directive should result in function returning an unknown value, but is not an error. Instead, C compilers usually issue a warning on this. However, MikroC currently does not do this; furthermore, omitting return directive in mikroC can result in program crash.

User avatar
rajkovic
mikroElektronika team
Posts: 694
Joined: 16 Aug 2004 12:40

#13 Post by rajkovic » 23 Dec 2005 12:12

Bug ID: #050823301
Submitted by: dcatania

Severity: Minor
Status: Resolved since 5.0.0.0

Description:
The un-comment tool (for source editor) doesn't work.

Workaround:
Please remove the comments manually.

Note:
This is a GUI bug.

User avatar
rajkovic
mikroElektronika team
Posts: 694
Joined: 16 Aug 2004 12:40

#14 Post by rajkovic » 23 Dec 2005 12:14

Bug ID: #050812302
Submitted by: javacasm

Severity: Minor
Status: Resolved since 5.0.0.0

Description:
Constants cannot be used as arguments in shiftLeft and shiftRight functions:

Code: Select all

...
  const unsigned short RES_SHIFT = 5;
  unsigned int temp_whole;
...
  temp_whole >>= RES_SHIFT;
Workaround:
Cast constant to variable of the same size:

Code: Select all

temp_whole >>= (char)RES_SHIFT;
Note:
None.

-

User avatar
rajkovic
mikroElektronika team
Posts: 694
Joined: 16 Aug 2004 12:40

#15 Post by rajkovic » 23 Dec 2005 12:15

Bug ID: #050510301
Submitted by: pizon

Severity: Minor
Status: Resolved since 5.0.0.0

Description:
When trying to change the IDE Editor settings (Tools -> Options... -> Editor Settings Dialog), newly chosen settings are applied and saved, but the Editor Settings Dialog never gets refreshed with the actual settings (it always shows the default ones).

This bug is IDE - related.

Workaround:
Each time you wish to change something in Editor Settings Dialog, you have to re-set all the settings.

-

Post Reply

Return to “mikroC General”