03-08-2018 10:43 AM
Hello everyone,
I got 2 applications working fine in developpement system.
App1 executable works fine.
App2 executable doesn't work (got error 1 when enqueueing)
App1 and App2 are similar with same queues pattern.
My conclusion is that create Queue went wrong (only on executable) but i don't have any other error comming up.
I tried this :
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PAiTSAW
But i can't fill up MachineName or IP Address, no projects found... so i managed by adding indicators and rebuilding app to find queue Ref was empty.
I tried to recode the generic call of queues contained in a PPL into the MainProject itself (in order to see if it was dependencies problems) but the problem remains, same error code, same ref empty.
I am stuck right now. I can't think about a new workaround, any help will be apreciated.
BestRegards
Solved! Go to Solution.
03-08-2018 10:51 AM
You are going to have to share some code if you want help solving your problem.
03-08-2018 11:00 AM
I am searching new fixing point i coudn't think of.
I can't share my code first and it won't help you since it works on developement system... and 10 executable applications at least.
03-08-2018 11:22 AM
You are obviously losing your queue reference somewhere if it is showing up empty. You need to look for places where the queue reference might be destroyed.
03-08-2018 11:24 AM - edited 03-08-2018 11:25 AM
@Gigi_31 wrote:
I am searching new fixing point i coudn't think of.
I can't share my code first and it won't help you since it works on developement system... and 10 executable applications at least.
But we can at least see the code and possibly spot something that might not work in an executable. You have the advantage of knowing what the code looks like and can't solve the problem. We don't even know what your code looks like, so how could we possibly solve the problem?
You said the working and non-working applications are similar. But that means they aren't identical. So what are the differences between them?
03-08-2018 11:46 AM
The difference between application are more or less drivers, HMI. The pattern remain the same.
Yesterday i have added a new PPL with a new class handling treeview but i can't see the relationship with a queue error.
Calls of that PPL are done on asynchronous VI so there are no reason they impact my main VI which only handle events.
See attached, 2 vis of my library handling queues and snapshot of my Init.
I have only one createQueueVI, oneRelease and some Queues and Dequeues.
The error starting inside the Enque Init Element (only on executable !!!!)
Hope this helps to get context !
03-08-2018 12:08 PM
Are you creating the queue inside of the async VI and then trying to access it after the VI has closed? I believe the queue reference is destroyed when the async VI is stopped.
03-08-2018 12:09 PM
Those VI's seem okay. I'm guessing the issue occurs at a higher level in your code. Does your queue reference pass through any case structures, event structures, or diagram disable structures? If so, maybe there is a case where the queue reference isn't getting passed through and the structure is putting out a "default" queue reference of 0 which would be invalid and give you error 1.
Time to do some debugging on the .exe. See if you can enable debugging on the build of the exe and use a remote connection to get into it and the block diagram. Or at least had some strategic indicators around on some queue reference wires and see if any of them go to zero.
I've also created and action engine that I initialize with a file path. Then I scatter that around various parts of my code so that it can don things like write error messages to a file, or perhaps other values. I'll have an input with a string so I can identify it and later look back on my error log and see by time and string reference along with the data or error to see when and where the problem occurred.
03-08-2018 05:06 PM
@RavensFan wrote:
Those VI's seem okay. I'm guessing the issue occurs at a higher level in your code. Does your queue reference pass through any case structures, event structures, or diagram disable structures? If so, maybe there is a case where the queue reference isn't getting passed through and the structure is putting out a "default" queue reference of 0 which would be invalid and give you error 1.
Time to do some debugging on the .exe. See if you can enable debugging on the build of the exe and use a remote connection to get into it and the block diagram. Or at least had some strategic indicators around on some queue reference wires and see if any of them go to zero.
I've also created and action engine that I initialize with a file path. Then I scatter that around various parts of my code so that it can don things like write error messages to a file, or perhaps other values. I'll have an input with a string so I can identify it and later look back on my error log and see by time and string reference along with the data or error to see when and where the problem occurred.
Add "FOR loop" to that list of structures. If a FOR loop executes zero times, anything on the left side won't come out the right side unless there's a shift register. (For the OP - how does a FOR Loop execute zero times? Auto-indexing over an empty array would do that!)
03-09-2018 02:40 AM
Hello everyone,
I want to thanks you all for your tips. Unfortunately i have already checked all things you proposed...
I did another try building another exe and installer ... and found my mistake.
It was one asynchronous process i forgot to add in executable always incuded sources files.
That is still weird i got empty reference on queue whereas the problem was a missing reference file.
It was working on developpement system because asynchronous VI was already on memory.
Thank you all for brainstorming about this 🙂