ArgumentException when accessing resources

I’ve been playing with a FEZ Bit (modifying the sample application,) and just got in some custom PCBs using the SCM20100E SOM. I’m now trying to port my code over–and am encountering the following error when it’s trying to run:

The thread '<No Name>' (0x2) has exited with code 0 (0x0).
139
Failed allocation for 1019 blocks, 16304 bytes

Failed allocation for 1028 blocks, 16448 bytes

    #### Exception System.ArgumentException - 0xfd000000 (1) ####
    #### Message: 
    #### System.Drawing.Internal.Bitmap::CreateInstantFromResources [IP: 0000] ####
    #### System.Reflection.MethodBase::Invoke [IP: 0000] ####
    #### System.Resources.ResourceManager::GetObject [IP: 0083] ####
    #### System.Resources.ResourceManager::GetObject [IP: 0007] ####
    #### GHIElectronics.TinyCLR.UI.Controls.Button::InitResource [IP: 0009] ####
    #### Demos.Icon::.ctor [IP: 0004] ####
    #### Demos.ApplicationWindow::.ctor [IP: 000c] ####
    #### Demos.EncoderWindow::.ctor [IP: 0010] ####
    #### Demos.Program::Main [IP: 01a0] ####
Exception thrown: 'System.ArgumentException' in GHIElectronics.TinyCLR.Drawing.dll
An unhandled exception of type 'System.ArgumentException' occurred in GHIElectronics.TinyCLR.Drawing.dll

I’m assuming there is some step I’m missing–I’m just not sure what it is. Any help would be appreciated.

How about telling us what you did do to so we could make an intelligent statement about what you missed?

Showing your code might also be a good idea.

I am guessing you have a larger display on your custom board? That needs more memory than what you have?

Apologies! Not witholding anything, just didn’t know what was relevant. It’s essentially the default FEZBit code (TinyCLR-Samples/Official Demos/FEZ Bit at master · ghi-electronics/TinyCLR-Samples · GitHub) but with the display controller changed to an ILI9341.

Gus, yes indeed–went to a 240x320 display with the GHI ILI9341 driver. Lowering the resolution in the code doesn’t display anything, but it does stop it crashing–so you may be exactly right there. Guess I need some more RAM.

No you don’t more ram. We have a new feature in preview 3 that lets you use your display with smaller a resolution. It is called pixel doubling.

See it here SPI

And how about sharing pictures of your boards? :nerd_face: