LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Crash: access violation json

Solved!
Go to solution

Hi everyone,

 

I am flattening a string array to json in LabVIEW 2013. As soon as it executes LV crashes with the report. Worked fine on my 2014 version, converted the version to 2013. My guess is that the transpose array has to do with it, since it runs fine without the transpose function. Any ideas anyone? Thanks.

 

IMG_7259.PNGSchermafbeelding 2018-03-01 om 12.58.03.png

0 Kudos
Message 1 of 8
(4,239 Views)
Solution
Accepted by topic author San_Punt

Hello San_Punt,

 

to me this seems to be connected to this known issue of LabVIEW 2013: https://www.ni.com/en/support/documentation/bugs/13/archived--labview-2013-and-2013-sp1-known-issues.... It does not fit your code exactly, but maybe the workaround works for you as well.

 

LabVIEW will crash on run if array on connector pane is wired to Flatten to JSON primitive
N/A

Workaround: Remove array from connector pane, or wrap array in a cluster. Alternatively, add an Always Copy primitive before calling Flatten to JSON.

Reported Version: 2013    Resolved Version: 2014    Added: 08/19/2013

 


 


Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
0 Kudos
Message 2 of 8
(4,206 Views)

The always copy function did it for me . Many thanks!

0 Kudos
Message 3 of 8
(4,167 Views)

Nice, I am glad I could help out.

Thanks for your feedback!


Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
0 Kudos
Message 4 of 8
(4,164 Views)

I am also using json file to Deploy a classification model, earlier i trained a SVM classifier with csv file data set by which i get trained model file in JSON  format. now  when i give this json file as input to the classification Deployment, I always show the data mismatch between json & labview(Error Code - 370004, 370005). I am not able to attach JSON file but can mail it, with json file reply was not posting. All the details & data are also attached.370004..png370004.,,,.png

Download All
0 Kudos
Message 5 of 8
(3,974 Views)

Try putting the json file in a zip file!

0 Kudos
Message 6 of 8
(3,967 Views)

i have attached the json file

0 Kudos
Message 7 of 8
(3,964 Views)

Hello Aman,

 

I digged a bit deeper into your json. And found two problems in it which are the causes for aml_Read Model from JSON.vi not working:

  1. The key/path "Classification" exists three times in your json. Only the third one (starting with "kernel settings") has the expected type. The first is completely different, the second one is empty. Naturally, these two cannot be read. Although generally json does not forbid duplicate keys (see "JSON Data Interchange Format (ECMA-404)"), most standards recommend not to do so (e.g. "The JavaScript Object Notation (JSON) Data Interchange Format) (RFC7159)"). And RFC 7159 explicitly explains why duplicate key names are bad.
    Were you aware that you had duplicate paths?
  2. After fixing the previous error, the code runs into a second issue: The SubVI tries to read a path "Feature Manipulation, 0". This does simply not exist in your json.

Does this help you?

 

P.S.: Apart from this you should have posted your question as a new thread. This ensures more people will read it and you will get an answer much faster!

 


Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
0 Kudos
Message 8 of 8
(3,936 Views)