mB 5.0.0.3 beta 4 : Violation error

Discuss about beta versions of mikroBasic
compiler.
Post Reply
Author
Message
Kalain
Posts: 1093
Joined: 11 Mar 2005 18:26
Location: Aubenas, France

mB 5.0.0.3 beta 4 : Violation error

#1 Post by Kalain » 24 Sep 2007 21:45

Hi,

I think this is the first time I got this error message with mB 5.0.0.3 beta 4.
I'm not sure if there is a link with but I just played with brackets to see behavior.
mB got 98% of task processor for quite long time (1 min) before to crash.
Image


Image
Alain

Kalain
Posts: 1093
Joined: 11 Mar 2005 18:26
Location: Aubenas, France

#2 Post by Kalain » 24 Sep 2007 21:57

Hi,

In my case, if you add some brackets (open and close) in a "Select case... case..." without "end select". This cause a violation error.

mB got 98-100% of task processor, an when trying to close it error message occurs.

Image
Alain

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

#3 Post by zristic » 25 Sep 2007 07:40

Please show the code which causes this.

Kalain
Posts: 1093
Joined: 11 Mar 2005 18:26
Location: Aubenas, France

#4 Post by Kalain » 25 Sep 2007 20:40

Hi,

Try this code (18F452), it compiles fine.
Do not try to find something logic inside. I swaped around 800 lines.

Code: Select all

program Test

structure Tmenu
  dim  Last  as  byte
  dim  Current  as  byte
end structure

dim
pg_mos2 as TMenu
 xc as word

sub procedure goto_xc(dim gotoxc as word)
  do
    if xc>gotoxc then dec(xc) end if
    if xc<gotoxc then inc(xc) end if
    if pg_mos2.current < 16 then
      if porta = 16 then gotoxc = xc end if

    else
      select case pg_mos2.current
      case 18 'pause
       select case portA  'line 22
        case 1 'droite

        end select
      end select
    end if
  loop until xc=gotoxc
end sub


main:
TRISA = $FF
TRISB = 0
TRISC = 0
TRISD = 0
ADCON1 = 7
ADCON0 = 0
CCP1CON = 0

end.
Now in line 22 add "{" character, mB should got 98% of task processor.
If you close mb you got an error message.

reopen mb and delete "{" character at line 22.
Now, if you comment line 25 with " ' " character and add again at line 22 a "{" character, mB should got again 98% task processor.
If you close mb you got another error message different from previous one.
Alain

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

#5 Post by zristic » 26 Sep 2007 10:03

I've just tried it with the version which is to be released and it all behaves well.
I guess it's been fixed- someone has reported a similar problem recently, probably the fix took effect in this case too.

Thanks for reporting.

Post Reply

Return to “mikroBasic Beta testing”