Main Site Documentation

CLR_E_OUT_OF_RANGE in file MMP


#1

I’ve been trawling the web and very little useful info on this compile error
anyone experienced it?

On VS2010, NETMF 4.1, Glide 1.0.2, (though does not appear to be Glide related)


#2

useful:
http://www.eggheadcafe.com/microsoft/NET-Microframework/30965316/mirco-framework-error-clreoutofrange.aspx

important bits below:


#3

still can’t get past this problem, seems to be related to number of references I have added to my project.


#4

Are you using multidimmemtional arrays?


#5

Hi Gus, No multi-dim arrays, but I do have array’s of objects.

I had been working on the GUI end of my project for a few weeks, and now trying to integrate into the IO project, …

When I compile the stand alone GUI part of the project it compiles
When I compile the stand alone IO part of the project it compiles

I am concerned by adding references I’ve gone over some limit.


#6

Gus, I am using the glide keyboard example: (but this hasn’t presented a problem)


            int[][] keyWidth_Letters = new int[4][];
            int[][] keyWidth_Numbers = new int[4][];
            int[][] keyWidth_Symbols = new int[4][];
.....

Attached are my references:

My \bin\Debug\le\appl.exe = 658KB >>> CLR_E_OUT_OF_RANGE

other projects that compile are larger and smaller that the one above with the CLR_E_ compile error:
My \bin\Debug\le\appl.exe = 588KB >>>COMPILES
My \bin\Debug\le\appl.exe = 1097KB >>>COMPILES


#7

I found the root cause after several chunks of hair being pulled out.

After several attempts to isolate code, references etc,
I narrowed it down to one file that had an array of objects. each object had an array of objects also. about 200 items in all.

By limiting the size of the array to a small value CLR_E_OUT_OF_RANGE went away.
so now some redesign required.

Thanks Gus.

I Would really love for someone to explain how to prevent it in future and what size limitations it has, so I don’t go near it again :stuck_out_tongue:


#8

There is no documentation on this from Microsoft but if you think “embedded systems” then you should never hit the limit, if you know what I mean :slight_smile:


#9

Gus, Is there a way to work out how close I am to the limits of memory resources on the FEZ Cobra?,
as I have about 30% more development to do before completion of the project. Should I gauge this by the exe size in the bin\debug\le\ ?


#10

Couple things to keep in mind

  1. Alocation units should be less than 700kbyte
  2. Dlls shouldn’t be too large

Like I said, write “embedded code” and you will never hit the limits


#11

For others new to embedded in the .NETMF space, I think this is what is being referring to as “think Embedded”:
a) http://wiki.tinyclr.com/index.php?title=Thinking_Small
b) http://wiki.tinyclr.com/index.php?title=Loading_Resources
c) http://wiki.tinyclr.com/index.php?title=Custom_Heap

I think my main problem is that the Glide dll comes with preloaded keyboard 320x240 image resources inside the Glide.Dll, and because I am using the larger 480x272 LCD I need to add extra custom 480x272 keyboard image resources to fit my larger screen. (an extra 8 x 21KB) which is a waste.

It would be good if inbuilt resources could stretch to my screen size, (must look into this further) and then I wouldn’t need an extra 160K of keyboard images to load on startup. ???


#12

I noticed you had the GHi…hardware.emx dll in your references. I don’t think you need that one.


#13

Hi Mike,
I am using FEZ Cobra (which shows up as EMX based on boot) I need access to pin definitions. Or am I missing something.


#14

try removing it and see what happens.


#15

What time zone are you in Mike?
(I’m GMT +10)


#16

GMT - 4