MPLABX munmap makefle recipe error

MPLABX munmap makefle recipe error

Postby CaptFrito » Thu Jul 17, 2014 1:45 pm

Greetings all

I am in the middle of refactoring a project and I get the following error when I build in debug mode (using RealICE):

Code: Select all
*** Error in `fixDeps': munmap_chunk(): invalid pointer: 0x09f41598 ***
make[2]: *** [build/default/debug/src/commands.o] Segmentation fault
make[2]: *** Deleting file 'build/default/debug/src/commands.o'
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
nbproject/Makefile-default.mk:443: recipe for target 'build/default/debug/src/commands.o' failed
make[2]: Leaving directory '/home/dbishop/MPLABXProjects/XBF32.X'


I am stumped, I have never seen this kind of error before. It doesn't exist in the original project. Any suggestions?
CaptFrito
 
Posts: 11
Joined: Thu Jul 17, 2014 1:36 pm
PIC experience: Professional 2-5 years with MCHP products

Re: MPLABX munmap makefle recipe error

Postby ric » Thu Jul 17, 2014 2:04 pm

What PIC are you using, and what are the versions of all the toolchain you are using?
Are you willing & able to upload the full project?
Latest test project, an LED matrix display made from one reel of addressable LEDs. here
User avatar
ric
Verified identity
 
Posts: 659
Joined: Sat May 24, 2014 2:35 pm
Location: Melbourne, Australia
PIC experience: Professional 5+ years with MCHP products

Re: MPLABX munmap makefle recipe error

Postby CaptFrito » Thu Jul 17, 2014 2:22 pm

I am using a PIC32MX795F512L, XC32 1.32, MPLABX IDE v2.15, Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01, System: Linux version 3.12.21-gentoo-r1 running on amd64; UTF-8; en_US (mplab)

I have copied the project over to my older development machine that runs a slightly older MPLABX and XC32 compiler and it has the same problem.

I can post my entire project, it is far from secret, but this code is my protyping framework. It is beastly adaptaion of the old MLA code that I inherited. It's always worked though, I created a new project ona new machine with the updated MPLAB/XC codes, moved the file locations a bit (subdirectory reorg). That's when I noticed the problem (a 'release build' does not report this error).

Where can I upload the code? I suppose I'd need to tar/bzip/gzip it...?
Last edited by CaptFrito on Thu Jul 17, 2014 2:26 pm, edited 1 time in total.
CaptFrito
 
Posts: 11
Joined: Thu Jul 17, 2014 1:36 pm
PIC experience: Professional 2-5 years with MCHP products

Re: MPLABX munmap makefle recipe error

Postby Tom Maier » Thu Jul 17, 2014 2:25 pm

munmap_chunk(): invalid pointer:


Looks like new compiler doesn't like this pointer.

Or maybe the target chip is different than before.
User avatar
Tom Maier
Verified identity
 
Posts: 179
Joined: Mon May 26, 2014 2:37 pm
PIC experience: Professional 5+ years with MCHP products

Re: MPLABX munmap makefle recipe error

Postby CaptFrito » Thu Jul 17, 2014 2:30 pm

Same target chip, same problem with a slightly older compiler... It's more-or-less the same code with a new file structure layout (new project, imported old files, added them to the new project). It bbuilds about 30 files before it slams into this error.
CaptFrito
 
Posts: 11
Joined: Thu Jul 17, 2014 1:36 pm
PIC experience: Professional 2-5 years with MCHP products

Re: MPLABX munmap makefle recipe error

Postby Tom Maier » Thu Jul 17, 2014 2:39 pm

Then my next guess would be that when the code was reshuffled it made the object pointed to become far, and the pointer type is not long enough to reach it.

I don't have a lot of big experience with the pic32, so this is just a guess based on seg faults I've gotten on other architectures.
User avatar
Tom Maier
Verified identity
 
Posts: 179
Joined: Mon May 26, 2014 2:37 pm
PIC experience: Professional 5+ years with MCHP products

Re: MPLABX munmap makefle recipe error

Postby CaptFrito » Thu Jul 17, 2014 2:45 pm

Shouldn't have, but that's a reasonable supposition. I will keep hammering on it... should know something in an hour. The obejective is to reorg this and start migrating it to harmony
CaptFrito
 
Posts: 11
Joined: Thu Jul 17, 2014 1:36 pm
PIC experience: Professional 2-5 years with MCHP products

Re: MPLABX munmap makefle recipe error

Postby jtemples » Thu Jul 17, 2014 4:56 pm

That's a bug in the tools; it means fixDeps is crashing.
jtemples
Verified identity
 
Posts: 195
Joined: Sun May 25, 2014 2:23 am
Location: The 805
PIC experience: Professional 5+ years with MCHP products

Re: MPLABX munmap makefle recipe error

Postby CaptFrito » Thu Jul 17, 2014 5:20 pm

It aopears to be... I am trying to track it down so there's something to report, by it seems that it's relative path problem with fixDeps. I started out with a number of header and source files that were in directories three deep. I moved the directory that was the third level down up one level so it was a little clearer where all the files in the directory structure were. ince there was only a handful on includes to change I thought this would be a no-brainer. Maybe it's soeehting I am doing, or a sequencing thing, but we'll see. More to follow. Thanks for all the help everyone.
CaptFrito
 
Posts: 11
Joined: Thu Jul 17, 2014 1:36 pm
PIC experience: Professional 2-5 years with MCHP products

Re: MPLABX munmap makefle recipe error

Postby CaptFrito » Thu Jul 17, 2014 8:00 pm

This seems to be a bug in MPLABX and this fixDeps process. I ended up getting everything compiling, but I had to start all over again and change one file at a time and cause MPLABX to fix its own makefile one step at a time. I have one issue that remains: Whenever I move a single specific source/header file pair from down (up) one directory level and fix the #include's accordingly, it stops working. The errors do change too, sometimes it's the one I originally posted, other times it's not.

I still don't know why this is happening. On one hand, I guess I don't have to care anymore, but at another level I know I am working with a buggy toolchain that cost me an entire day.
CaptFrito
 
Posts: 11
Joined: Thu Jul 17, 2014 1:36 pm
PIC experience: Professional 2-5 years with MCHP products

Next

Return to MPLAB X IDE

Who is online

Users browsing this forum: No registered users and 5 guests

cron