Error "Object reference not set to an instance of an object" in AS7.0 Beta

Go To Last Post
19 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hallo, at trying Atmel Studio 7.0 Beta I got an error message box "Object reference not set to an instance of an object" at "start debugging" button. The same project works fine with AS6.2. The project ist an IAR project, which I loaded with File/Open/Open Objectfile for Degugging, format Ubrof8. My tool is JTAGICE3. In an other thread I read, that this error can depend on the grade of optimization. Optimization is set high in the IAR compiler, but as I said, it works fine with AS6.2.

Thanks for any hints

Klaus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Where, exactly, did you get this error?

 

It sounds more like an error in the operation of AS than anything to do with your code?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi awneil,

The error appears after loading the project when I press the "Start Debugging and Break Alt F5)" button. The error appears before AS7.0 starts with any code download. The same error I get, when I try  "Start Debugging (F5)" and "Attach to Target" buttons. After closing the project, I can start the programmer (Tool/Device Programming) and communication with the AVR via JTAGICE3 works fine. So it is no hardware issue. I agree to you, that it is no issue of the code, because in AS6.2 all is OK.

Klaus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Could you PM me the project? Sounds like there are something that is wrong in it... (zip the entire project folder, so that I get the object file as well so that I can try to launch with it)

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hi meolse,

it is a large project with a lot off confidential stuff. I will try to reduce the project, but this will take some time. I will come back.

Klaus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Does it happen with one of the AS sample projects?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I did not try AS sample projects, I immediatly started with my project (because it works in AS6.2)

Klaus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ah, then we have had a bug relating to the interface settings in a project that has been migrated from 6.2 to 7.0. Look through the 7.0 beta announcement thread and see if it fits your case.

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

By the way, If I select simulator instead of JTAGICE3, then there is no error message box "Object reference not set to an instance of an object" and  "Start Debugging" works and the program stops at main.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi meolsen,

reducing my project to a smaller one which shows the error is not so simple and takes to much time. So I decided to try a sample project. I took  a XmegaA3BU Xplained board and selected the sample project DMA_EXAMPLE2 for ATxmega256A3BU.

The same error happens when using the JTAGICE3 and no error happens when using the simulator in AS7.0, but simulator and JTAGICE3 works fine with AS6.2. So I think it is no use for me go on digging in my code.

Klaus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Could you send me just the cproj file? Or, just the 'tool' part of the file (starts with <com_atmel_avrdbg_tool_) with the jtagice3 selected?

 

The simulator block can look like this (will be different for jtagice3, but I would like to see everything in the <com_atmel_avrdbg_tool_ block);

<com_atmel_avrdbg_tool_simulator>
  <ToolOptions xmlns="">
	<InterfaceProperties>
	</InterfaceProperties>
  </ToolOptions>
  <ToolType xmlns="">com.atmel.avrdbg.tool.simulator</ToolType>
  <ToolNumber xmlns="">
  </ToolNumber>
  <ToolName xmlns="">Simulator</ToolName>
</com_atmel_avrdbg_tool_simulator>

 

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

here is a zip both from the working version with simulator and the not working version with JTAGICE3. It is from the sample project DMA_EXAMPLE2 for ATxmega256A3BU.

Klaus

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks, I think we have seen this one before (AVRSV-6791, reported in the 7.0 Beta thread). Fix is still pending.

 

I have added your project to our internal case, as it was another tool combination.

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, this is the same issue as what I linked to above and is has been fixed. 

 

To make your project work in the mean time, replace 

<JtagSelectedDeviceIndexInChain></JtagSelectedDeviceIndexInChain>

with

<JtagSelectedDeviceIndexInChain>0</JtagSelectedDeviceIndexInChain>

in the project file.

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

thank you, now it works.

Klaus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

Hi All, Above is the image when I tried to create a New Example Project from Atmel Studio 7.

 

Kindly help me to resolve this error.

 

Thanks in Advance.

P D Chauhan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So what version are you using?

 

Is it a new install?

 

Details of the system it's running on?

 

Describe your exact steps up to getting that message?

 

Did you try the solution in #15 ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So what version are you using?

=> Atmel Studio 7 (Version: 7.0.1417)

 

Is it a new install?

=> It is a new install.

 

Details of the system it's running on?

=> System: Windows 10

 

Describe your exact steps up to getting that message?

=> In "Start Page", clicked on "New Example Project..." link

 

Did you try the solution in #15 ?

=> The change suggested in #15 is in Project File... But even Project file is not created in my case. I faced problem while creating project itself.

 

P D Chauhan