Access violation

General discussion on mikroC for dsPIC30/33 and PIC24.
Post Reply
Author
Message
picer
Posts: 13
Joined: 11 Dec 2008 16:36

Access violation

#1 Post by picer » 23 Dec 2008 02:26

I've started getting Access violation at address 00007D42. Read of address 00007D42 or other various addresses such as 0000028, 0000000, 00006574


or External exception C000001D.


Seems like when I type something it does this, hit ok then it's fine again till after I type something again. It still compiles everything but hard to write code if you have to hit enter every time you type something. Has this happened to anyone yet? I've also just reinstalled and same thing, I've put nothing new on this computer at all since this was originally installed.

reab
Posts: 263
Joined: 28 Aug 2005 20:43
Location: West Sussex, United Kingdom
Contact:

#2 Post by reab » 23 Dec 2008 12:59

Hi Picer,

You are not alone!

I've been having this for some time but as I'm often installing/uninstalling its difficult too know where the problem is. I finish up relaunching the application which works for a while untill I change something simple such as a variable!

Could also be something to do with A/V software or heaven forbid - a Microsoft update!!!
Be kind and like your words - you never know, you may have to eat them one day!

picer
Posts: 13
Joined: 11 Dec 2008 16:36

#3 Post by picer » 23 Dec 2008 17:26

Well, I completely uninstalled and manually removed the dir and reinstalled and it works again. From your reply looks like it will happen yet again. I don't have auto update turned on so I know nothing else got installed other than mcafee did an update maybe??

picdog
Posts: 390
Joined: 28 Feb 2006 09:32

#4 Post by picdog » 24 Dec 2008 09:15

Hello,
just my 2 cents.

I am developing a quite long program (about 4.000 lines of code) for a dsPIC + display, and I also suffered some things like those you pointed.

Normally the access violation requires only a restart of mikroC, then if the code is ok it is compiled without other problems.

Other strangeness is related to float variables. Many times the cursor goes to the first global float declaration of a variable with a compile error or access violation, then with restart all goes fine.

Some days ago I added to a well compiling/functioning code a block of code containing some float (local at the beginning of the function) declarations of variables (some temperature check of the devices, e.g. temperature = Analog_read(...); if(temperature<-8.0f) do something), and I wasn't able to compile this code, because every time I got access violation, until I set up casting with signed int and all went fine. So I guess there is also something related to float variables.

Best regards,

picdog
... a proud user of MikroElektronica EasyPic3, EasyPic4, BigPic4, MikroC for PIC, EasydsPIC2, dsPIC-Pro2, LV24-33 and MikroC for dsPIC :)

Nando
Posts: 1
Joined: 25 Feb 2010 23:45

Re: Access violation

#5 Post by Nando » 25 Feb 2010 23:54

Another thing that might cause an access violation is silly syntax errors like not including a pair of () between the name of an ISR and the org directive... :twisted: easy, compiler!...

For instance, writing (as I did...) void CAN_Int org 0x4A and not void CAN_Int() org 0x4A, drove me nuts for a while... :? until illumination! ...D'OH!

Happens to the best... well, a bit like me a-hum :lol:

cjogo
Posts: 34
Joined: 17 May 2009 10:34
Location: UK

Re: Access violation

#6 Post by cjogo » 26 Feb 2010 10:31

Notice you haven't adopted the new way then.....

void CAN_int() iv IVT_ADDR_C1INTERRUPT {

// Your interrupt code here.......

}

I know.... Change is painful....

Best regards

cjogo

Post Reply

Return to “mikroC for dsPIC30/33 and PIC24 General”