NO

Author Topic: Too many include paths and libs causes cap out  (Read 4345 times)

MichaelT

  • Guest
Too many include paths and libs causes cap out
« on: August 30, 2011, 01:51:19 PM »
If there are too many (more than 11) individual paths to include folders and libs. Then the ones above that amount cannot be found.

I don't know if this is because the total buffer available for all the paths run out, or if there is an upper limit on how many paths you can reference. In any case, I found that if I have more than 11 paths then all others beyond that are not found.

If the path that cannot be found is put earlier in the path list then it can be found, but the one pushed back drops out.

This can be tested in project alternatives -> folders. (for both includes and libraries)

I am using the latest 6.50 version.


Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: Too many include paths and libs causes cap out
« Reply #1 on: August 30, 2011, 02:51:32 PM »
Something to test with.
Maybe size is the problem.
Code: [Select]
@REM MakeDirs.bat
FOR /L %%n IN (1,1,15) DO md inc%%n
FOR /L %%n IN (1,1,15) DO echo //inc%%n.h>inc%%n\inc%%n.h
Code: [Select]
#include "inc1.h"
#include "inc2.h"
#include "inc3.h"
#include "inc4.h"
#include "inc5.h"
#include "inc6.h"
#include "inc7.h"
#include "inc8.h"
#include "inc9.h"
#include "inc10.h"
#include "inc11.h"
#include "inc12.h"
#include "inc13.h"
#include "inc14.h"
#include "inc15.h"

int main(int argc, char **argv)
{
return 0;
}
May the source be with you

CommonTater

  • Guest
Re: Too many include paths and libs causes cap out
« Reply #2 on: August 30, 2011, 10:36:43 PM »
Ok, a little searching on MSDN tells me that a search path (like those in the project->project options-> folders) can be up to 32,767 characters in length.  With each individual path being limited to 260 (MAX_PATH) that's room for 126 paths.  So unless you are running out of environment space or there is an arbitrary limit in POIDE, you should be able to use way more than 11...  Back in the mean old DOS days the working environment was something in the order of 512 bytes... I don't know for sure what it is today, but I've never hit it...

I do know the 32 bit POIDE has a limit on the number of opened files (8 I believe) that the 64 bit does not?
Which are you using?





MichaelT

  • Guest
Re: Too many include paths and libs causes cap out
« Reply #3 on: September 02, 2011, 09:51:59 AM »
It's not about includes in source code.
I am using both versions.

The issue is in the 'Project->Project options->Folders'.
I haven't tested the 'Tools->Options->Folders' but I would assume it's the same there.

There you can add paths to the folders containing libs & includes.
Add too many and the ones at the bottom doesn't seem to be picked up.

One could argue -'Why so many?' but it's beside the point. The limit is there.

I put together a graphical snapshot on how it could look like.
It's in the attachement.

Regards/

Mike

P.s

This is a nonsense project just to illustrate the point. So please don't interpret the included
paths in any serious way.
« Last Edit: September 02, 2011, 09:57:17 AM by MichaelT »

CommonTater

  • Guest
Re: Too many include paths and libs causes cap out
« Reply #4 on: September 02, 2011, 02:26:45 PM »
Ok... with that setup in your Project Options, open the project (.ppj) file in notepad, copy and past the resulting LIB= path here...

If it's truncated by POIDE, yes that's likely a bug.
But if it's not... it may indicate other problems on your system.

What operating system are you using?


I'm using Win7 x64, 8gb memory with Pelles C, 6.50.8 rc4 x64 and just test-built a project with the project libraries bloated out to 40 folder paths, including junk folders, with the needed ones at the end, and it worked.

It might be good if someone else could test this on an x86 system...
 




« Last Edit: September 02, 2011, 02:30:18 PM by CommonTater »

MichaelT

  • Guest
Re: Too many include paths and libs causes cap out
« Reply #5 on: September 07, 2011, 01:52:28 PM »
Hmm, this is very odd. Suddenly it worked again. No changes made.. I am truly dumbfounded. Either it's an erratic bug, or (as CommonTater mentioned, something is wrong in the system) but until it (if) happens again, then I can't say if this is truly a bug or not..

CommonTater

  • Guest
Re: Too many include paths and libs causes cap out
« Reply #6 on: September 07, 2011, 03:10:03 PM »
That makes it sound like something to do with your operating system's environment space...
I'm not sure if there's a setting for that or not...

Out of curiosity... what OS/version are you running?



MichaelT

  • Guest
Re: Too many include paths and libs causes cap out
« Reply #7 on: September 07, 2011, 03:44:59 PM »
Currently I am using XP (home) but on my stationary I use Win 7 x64. I had the problem on both machines, which is why I am truly surprised. I have a a similar set of software on both machines, which makes me wonder if any of those are not playing nice.

CommonTater

  • Guest
Re: Too many include paths and libs causes cap out
« Reply #8 on: September 07, 2011, 06:55:17 PM »
Next time the problem comes up (and it probably will)...
Immediately open a command shell  (WIN+R enter CMD click OK) and type SET at the command line...
I'm betting you've got something planting a huge string in there taking up all your environment space.

Also interesting would be to add the "Open Command Prompt in Project Directory" addin and pop open a command shell from inside the IDE and see what's SET in there...

http://forum.pellesc.de/index.php?topic=3542.0

(As in... before you present this as a bug you need to investigate it far enough that you can literally make it happen on demand.  It will save Pelle a ton of work... )





« Last Edit: September 07, 2011, 07:00:35 PM by CommonTater »

MichaelT

  • Guest
Re: Too many include paths and libs causes cap out
« Reply #9 on: September 09, 2011, 10:10:25 AM »
:) Well, I would not have posted it unless it happened on demand. But I am pretty sure now that Pelles C is not to blame. Something else must have messed up in the environment. Sorry for the waste of time, but shit happens  ;).


CommonTater

  • Guest
Re: Too many include paths and libs causes cap out
« Reply #10 on: September 09, 2011, 12:16:49 PM »
No worries... I know Pelle is a busy guy so if we can minimize these reports for him we should.