Code Dump Problem

hi i am using FEZ board for my development

sometimes , It’s giving problem in application load in hardware .
while i dump my application,
it gives “Unhandled Exception” like “System.NullReferenceException occurred in Microsoft.SPOT.TinyCoreRME.dll”

after that my application can not being execute in hardware

Please any one can help me urgently

Tell us more.

What board are you using?
Does this happen with simple “hello world” type application?

@ Architect -

 if (Configuration.Heap.SetCustomHeapSize(6 * 1024 * 1024))
                {
                    // this will only take effect after resetting the system
                    PowerState.RebootDevice(false);
                }

                Bitmap logo = Resource.GetBitmap(Resource.BitmapResources.logo4);
                Configuration.StartUpLogo.Set(logo.GetBitmap(), (SystemMetrics.ScreenWidth - logo.Width) / 2, (SystemMetrics.ScreenHeight - logo.Height) / 2);
                Configuration.LCD.EnableLCDBootupMessages(false);

                SetLCDConfigurations7();

                Application app = new Application();

                Touch.Initialize(app);
                const int CAL_POINTS = 5;
               
                short[] sx = new short[CAL_POINTS] { 400, 80, 80, 720, 720 };
                short[] sy = new short[CAL_POINTS] { 240, 48, 432, 432, 48 };
                short[] cx = new short[CAL_POINTS] { 519, 187, 188, 841, 855 };
                short[] cy = new short[CAL_POINTS] { 511, 275, 732, 718, 287 };

              
                uint tout = 1000 * 900;
                GHIElectronics.NETMF.Hardware.LowLevel.Watchdog.Enable(tout);
                TimeSpan TSDue1 = new TimeSpan(0, 0, 0);
                TimeSpan TSPrd1 = new TimeSpan(0, 0, 5);
                ThreadWatchdocTimer = new Timer(TimerWatchdogReset, null, TSDue1, TSPrd1);
               
                Microsoft.SPOT.Touch.Touch.ActiveTouchPanel.SetCalibration(CAL_POINTS, sx, sy, cx, cy);

                ThemeResources.CurrentTheme = new GreenTheme();

                LicenseManager.SetLicenseKey(Resource.GetString(Resource.StringResources.MFRichMediaExtensionsLicenseKey));
                Window mainWindow = new SysInitializeScreen();

                mainWindow.Visibility = Visibility.Visible;
                logo.Dispose();

                app.Run(mainWindow);

[line]here is my code in which i m getting this error, i am using FEZ board, i have attached error image also with this post

There are many FEZ boards. Which one?

@ Architect -
FEZ COBRA

@ Architect -

[line]
yes it is giving problem in simple application too

and one more thing i want to tell that , i am using this hardware continuous from last 2 month,
i did not switch of this from last 2 months, so can it be reason for this problem ?

because if i will make if off for 1 week or more , it will again start and i can dump my code into hardware

Is it any memory issues ? because or my high usage of memory for static variables and JPG images ?

while i dump code is it possible that memory has been corrupted or memory fragmentation issue ?

Is it maybe Power Supply. I read somewhere that strange things can happen, if you use just USB DP module…

Null Reference exception typically means something you’re trying to access has been GCed from under you. It’s your code. You have to figure out what it is by DEBUGGING IT. Breakpoints. Watched Variables. Simplify your app. Show us a repro.

We’re all here for you but you have to help yourself dude, we can’t debug your code remotely