I get a "System.NullReferenceException" when I perform "Generate Application"

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

cross mob
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

I get a "System.NullReferenceException"  when I perform a "Generate Application".  Yet if I copy ALL the components from one schematic page and paste them into second page and disable the first page.  I perform a "Generate Application" and get no errors.

This is the case whether I use Creator 4.1 or 4.2.

Attached is a simple project.  The offending page is enabled and the second page (working one) is disabled.  Perform the "Generate Application" yourself.  If you get the error as I did, disable the first page and then enable the second page.  Perform another "Generate Application".  It should complete with no error.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
1 Solution
Anonymous
Not applicable

Hi Len,

The only difference between two schematic is the pin selection. In "Generates Error" schematic, pin vbat_n_0 is selected as P0[2] which is SAR1 reference. In "Works" schematic, pin vbat_n_0 is not selected and it is left to the creator to decide. Following scenario succeeds in the build-

- If you select both the pins manually

- If you leave both the pin selection to creator

In the "Generates Error" schematic, even if you had selected P0[2] for vbat_n_0, creator should have picked P0[4] for SAR reference (that means, SAR0 block selection for the component). I will let software team know about this issue. Thanks for bringing it to our notice.

-Rajiv

View solution in original post

0 Likes
5 Replies
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Hello Leonard,

If you just disable the VDAC8_test_0 component, then also there will be no  "System.NullReferenceException" error.There will be error but due to missing main.c source file/function.

0 Likes

anks,

You are correct.  If I disable VDAC8_test_0, the error goes away.  I already know that.  In fact, if I disable VDAC8_vbat_ref_0 or ADC_SAR_Seq_0 or Vbat_n_0 the error goes away.  If fact, if I don't disable any of the components and change ADC_SAR_Seq_0's input range to something other than using the VDAC as reference: no error.

However I need all the components at these configurations.

You should also note that I had copied ALL the components in "Generates Error" into "Works" verbatim.  "Generates Error" fails and "Works" succeeds.  Something is wrong here with the fitter SW.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
Anonymous
Not applicable

Hi Len,

The only difference between two schematic is the pin selection. In "Generates Error" schematic, pin vbat_n_0 is selected as P0[2] which is SAR1 reference. In "Works" schematic, pin vbat_n_0 is not selected and it is left to the creator to decide. Following scenario succeeds in the build-

- If you select both the pins manually

- If you leave both the pin selection to creator

In the "Generates Error" schematic, even if you had selected P0[2] for vbat_n_0, creator should have picked P0[4] for SAR reference (that means, SAR0 block selection for the component). I will let software team know about this issue. Thanks for bringing it to our notice.

-Rajiv

0 Likes

Rajiv,

Beautiful!  If I unlock vbat_n_0 in "Generates Errors" and let the the fitter allocate the pin, the error is gone!

Interesting.  Thanks for looking into it.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes

Rajiv,

Interested in another Creator/compiler "issue"?  Checkout:  Re: Issue with variables used in interrupts that are NOT assigned volatile.

Thanks in advance for your help.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes