Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -1074384576 occured at XNET Database Add Alias

I am getting "error -1074384576 occured at XNET Database Add Alias

 

Database cache file cannot be removed or replaced on the disc (e.g., file is write-protected)"

 

I re-create my FIBEX xml and alias each time I run my initialisation VI. This is to ensure database is in a known configuration, with the database being imported from a supplied .csv file.

This process of removing existing alias (which removes the associated .xml file) works perfectly ok, and I can run many times.

 

If I though run a VI that creates a session to perform Frame transmits (with a session close) using a Frame in that database then the next time I run my initialisation VI I get the Add Alias error again. If I delete the .xml file and ensure alias is removed using XNET Database editor it does not help.

Only if I restart Windows can I run my initialisation VI again to re-create the database. The create database VI does call XNET database close after saving and adding alias.

 

This post shows a solution but as mentioned I am Databse Close is being called.

 

Any other suggestions please?

 

Thanks

 

Windows 10, LabVIEW 2023

0 Kudos
Message 1 of 3
(1,010 Views)

I've not heard of this.  It sounds like a bug or something with the file access.  But I do have a couple of suggestions that might help get around it.  If you get this error you can try to add the alias again as a new unique name like <Name>_1, and if that can't be replaced use <Name>_2 until you find one that either can be replaced or isn't used.  This will only work if you then pass the newly assigned alias to all the functions, instead of having it hard coded as <Name> in places.

 

Another technique I've been using is I will perform a CRC32 on the file I'm adding or importing.  And then have that be part of the Alias name such as <Name>_<CRC>.  Then when I go to add an alias I perform a CRC of the file, and if matches an existing alias, I just use that instead of adding it again.  This has the added benefit of not needing to remove or add aliases in most cases.  For me these are usually DBC files I'm importing, and this is helpful when maybe one was added from a place in a temp location, but then the user selects a DBC from their documents folder.  If the CRC matches then it just uses the existing one since they are the same file.  Again for this to work you need to have the new alias name passed around.

0 Kudos
Message 2 of 3
(1,000 Views)

I've been experimenting and found if I don't use the XNET Database Editor to open and view my Frames/Signals while I am running my VIs the problem hasn't re-occured. It may come back again but has been ok for a couple of days now.

0 Kudos
Message 3 of 3
(923 Views)