Code Explorer error "Object reference not set to an instance of an object"

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ScYa_2781401
Level 2
Level 2

On one Windows instance running on a virtual machine (Linux host), I am having issues with PSoC Creator that might be caused by the .NET stuff.  On another Windows-only machine I don't have the issues.  That machine hasn't been updated in a while (it's a laptop).

After some recent updates of Windows 10, PSoC Creator 4.2 is consistently getting the error in Code Explorer that says "An error occurred while building the code outline for 'xxx\main.c'.  Object reference not set to an instance of an object.  PSoC Creator runs for a while, then crashes if I put the cursor in the wrong spot. 

This is code that had been working for years on that virtual machine, and just started failing when I added some new components and shifted some pin assignments around.  Even when working on projects that weren't changed it errors and crashes.

For example, I have a UART component named RS485 in my projects.  If I park my cursor in front of the RS485 name anywhere in my main.c program, PSoC Creator will crash.  If I put the cursor in front of CyDelay, it won't. 

I've been able to clean and build the programs without editing my code in the IDE, so that part works.  Editing Top Design or changing pins works properly.  The crashes are limited to editing.

Using Update Manager I have repaired PSoC Creator 4.2, and it still has the same failure.  I then removed (uninstalled) PSoC Creator and did a clean install.  Still have the problem.  Cypress might want to take a look at the dependencies for Microsoft's .Net framework.  There may be an issue.  Like I mentioned earlier, it works ok on a different Windows 10 machine.

0 Likes
1 Solution
ScYa_2781401
Level 2
Level 2

Some additional information -

The Windows instance that this does work on is running Windows 10 Home version 1803.  I'd give you the build, but since I forgot and left the laptop on during the day Microsoft is currently updating it to 1903, so we'll have to see what happens.

Regardless of the Windows version, I keep the source and workspace files on a shared drive on my Linux machine.  Up until now that hasn't been an issue.  However...

Just for the heck of it, I copied the workspace directory over to the local directory of my Windows virtual guest.  It essentially moved from Y:\soandso to C:\Users\Scott\Documents\soandso.  Once I copied the files from the shared drive to the C: drive, then it started working.

At this point I'm guessing that it has something to do with the Oracle Virtualbox extensions that provide the access to the shared drive.  I have been able to duplicate this with multiple workspaces.  So...

Running PSoC Creator 4.2 works on the virtual guest as long as the workspace files are considered local to the guest Windows OS.  If the files are on a shared drive, they can be accessed, edited, etc., but the Code Outliner has issues with them and PSoC Creator crashes.  So I'll just have to copy the files back and forth when I update Github or if I want to use one machine for programming the firmware on the PSoC and another for editing/compiling the code.

It seems to work without issue using a network share over WiFi.  Just the Virtualbox share fails.  It looks like this question can be closed out, as the prompt to obtain the Windows version made me think about just how I am accessing these files.

View solution in original post

0 Likes
3 Replies
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi ScYa_2781401​,

Can you please share the Windows build version that you are working on?

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes

This is running the following Windows version:

Windows 10 Home

Version 1903

OS Build 18362.418

For some reason it thinks it was installed on 10/12/2019, but it's a lot,

lot, older than that.

Scott

On Mon, Nov 4, 2019 at 5:26 AM RakshithM_16 <community-manager@cypress.com>

0 Likes
ScYa_2781401
Level 2
Level 2

Some additional information -

The Windows instance that this does work on is running Windows 10 Home version 1803.  I'd give you the build, but since I forgot and left the laptop on during the day Microsoft is currently updating it to 1903, so we'll have to see what happens.

Regardless of the Windows version, I keep the source and workspace files on a shared drive on my Linux machine.  Up until now that hasn't been an issue.  However...

Just for the heck of it, I copied the workspace directory over to the local directory of my Windows virtual guest.  It essentially moved from Y:\soandso to C:\Users\Scott\Documents\soandso.  Once I copied the files from the shared drive to the C: drive, then it started working.

At this point I'm guessing that it has something to do with the Oracle Virtualbox extensions that provide the access to the shared drive.  I have been able to duplicate this with multiple workspaces.  So...

Running PSoC Creator 4.2 works on the virtual guest as long as the workspace files are considered local to the guest Windows OS.  If the files are on a shared drive, they can be accessed, edited, etc., but the Code Outliner has issues with them and PSoC Creator crashes.  So I'll just have to copy the files back and forth when I update Github or if I want to use one machine for programming the firmware on the PSoC and another for editing/compiling the code.

It seems to work without issue using a network share over WiFi.  Just the Virtualbox share fails.  It looks like this question can be closed out, as the prompt to obtain the Windows version made me think about just how I am accessing these files.

0 Likes