CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Searching forum for <ILLEGAL OP CODE> crashes page

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
benoitstjean



Joined: 30 Oct 2007
Posts: 566
Location: Ottawa, Ontario, Canada

View user's profile Send private message

Searching forum for <ILLEGAL OP CODE> crashes page
PostPosted: Fri Jan 29, 2021 7:37 am     Reply with quote

haha... So I'm trying to search this forum for the keyword "ILLEGAL OP CODE" because somehow my unit rebooted with this error yesterday but when I type this exact string <ILLEGAL OP CODE> in the forum search box, the page returns the following error message:

Fatal error: Allowed memory size of 31457280 bytes exhausted (tried to allocate 65536 bytes) in /var/www/ccsinfo/forum/search.php on line 509

haha. That's funny.

So now, my question is if there's a way to 'catch' this error, perhaps the address where it occurs similar to the code to catch the INT_ADDRERR interrupt?

Using the PIC24EP on 5.026.

Thanks.

Ben
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Jan 29, 2021 8:15 am     Reply with quote

Probably crashed cause it's so dang cold here in Ontario !

Have to ask, is there a 'global' error function in 'C' ?

When I was coding in QB45, there was an 'ON ERROR......." command, so you could 'trap' on any error, then do 'something' based on the error code number. Back of the book (yeah we HAD books then, there was a list of all the error code numbers and what they meant).

brrrrr
Ttelmah



Joined: 11 Mar 2010
Posts: 19540

View user's profile Send private message

PostPosted: Fri Jan 29, 2021 10:50 am     Reply with quote

Illegal op-code, only causes a reset. No trap.
However it can be caused by two things. The first is 'what it says', trying to
execute a memory address containing an impossible instruction. The second
is it can also be triggered by trying to access memory using the W
register, when this is uninitialised.
Commonest 'reason;, is popping an illegal return address from
the stack. So something overwriting the stack area.
I'd look at writing a diagnostic byte to a variable, and set this to
different values through the code, then when the reset occurs you can
narrow down massively where is had got to.
benoitstjean



Joined: 30 Oct 2007
Posts: 566
Location: Ottawa, Ontario, Canada

View user's profile Send private message

PostPosted: Fri Jan 29, 2021 11:09 am     Reply with quote

Ok thanks. I guess for now it's not critical, first time I see this.

And not sure who manages this website but as stated in my original message, trying to search this forum for the keyword "ILLEGAL OP CODE" in the search box crashed the page! Problem is reproducible!

Cheers!

Ben
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Jan 29, 2021 6:18 pm     Reply with quote

gee Ben, after it was 'ILLEGAL'..... Laughing

Actually just tested it. 99 hits, YOURS was #1 !!!!
Ttelmah



Joined: 11 Mar 2010
Posts: 19540

View user's profile Send private message

PostPosted: Sat Jan 30, 2021 4:11 am     Reply with quote

The forum administrators themselves can't do anything about this.
The forum itself is based upon an 'off the shelf' program, and it is the
code in this that is having the issue. However the search works OK if
you select the second 'all terms' search form, rather than the first.
However as Jay says, there have not been any posts about this.
The search returns 99 hits, but none are for this exact form.
Must admit, I've never seen one in many years. It is a 'rare beasty'....
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Jan 30, 2021 5:23 am     Reply with quote

re: ..Must admit, I've never seen one in many years. It is a 'rare beasty'...

so 'only in Canada,eh' !
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Jan 30, 2021 6:38 am     Reply with quote

Use google to search the Microchip forums:
Quote:
site:microchip.com/forums illegal opcode
jeremiah



Joined: 20 Jul 2010
Posts: 1354

View user's profile Send private message

Re: Searching forum for <ILLEGAL OP CODE> crashes page
PostPosted: Sat Jan 30, 2021 9:28 am     Reply with quote

benoitstjean wrote:
haha... So I'm trying to search this forum for the keyword "ILLEGAL OP CODE" because somehow my unit rebooted with this error yesterday but when I type this exact string <ILLEGAL OP CODE> in the forum search box, the page returns the following error message:

Fatal error: Allowed memory size of 31457280 bytes exhausted (tried to allocate 65536 bytes) in /var/www/ccsinfo/forum/search.php on line 509

haha. That's funny.



I would recommend contacting CCS support (via email) and reporting the forum bug to them. They could in turn report it to their vendor for the software
Ttelmah



Joined: 11 Mar 2010
Posts: 19540

View user's profile Send private message

PostPosted: Sun Jan 31, 2021 2:42 am     Reply with quote

It's actually the word 'code' that causes the crash. Problem is that just
about every thread in the forum mentions 'code' somewhere. Using the
top search says 'search for any term'. So the search in the board just
runs out of memory trying to search for a term that applies in so many
places!...
Using 'search for all terms', narrows it down. Or just look for 'illegal op'.
benoitstjean



Joined: 30 Oct 2007
Posts: 566
Location: Ottawa, Ontario, Canada

View user's profile Send private message

PostPosted: Sun Jan 31, 2021 3:00 pm     Reply with quote

haha! Ok! Thanks all. Yeah I guess it makes sense that if the seach contains 'code' then it'll freak out.

Have a good one!

Ben
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group