09-18-2025 02:12 PM
I am trying to connect to a webcam from LabVIEW. To do so, I attempted to use the Vision Acquisition Software, Vision Common Resources, and IMAQdx libraries (I tested the 2023 and 2022 versions). To this end, I tried to create a control for the “session in” input of the NI-IMAQdx “open” function, and LabVIEW crashed immediately (Crash 0x00000000). I tested the libraries both together and separately, and also repaired, uninstalled, and reinstalled them several times, without resolving the error. I am sure I have testing licenses since I see them activated in the NI License Manager.
I ran these tests with LabVIEW 2024 Q1 (64-bit) and LabVIEW 2023 Q1 (64-bit) on two different computers, always obtaining the same crash. This issue prevents me from using any NI-IMAQdx functionality, since all functions depend on IMAQdx “open”, or more specifically on IMAQdx.ctl, which I have identified as the component that fails to open and causes the crash.
I am attaching the crash report and screenshots of the steps followed to reproduce the error. I have also checked several forums, and the only solution I found suggests using a 32-bit version; however, the system where I need to implement the webcam viewer is developed in 64-bit, so I must use this version, preferably with LabVIEW 2023 Q1.
09-18-2025 05:53 PM
Hello, Alonso.
I can see you are a New Member, new to the Forum and also possibly new to LabVIEW.
Unlike many other programming languages, LabVIEW code is not well-represented by "pictures of code" (contrast this to C++, where a picture, or simply a text file with the code, can easily be tested). A frequent request by responders (such as I) is to include LabVIEW code that illustrates the problem.
Please write a small VI that opens your Webcam and tries to take a picture (a Snap or a Grab, whichever you like) and display it in a window. I suggest you use 2024 Q1 (64-bit), as I happen to have 2024 Q3 (64-bit) on one of my machines, and should be able to easily test your code. Somewhere, I think, I wrote a tiny demo for this Forum that did a "Grab and Show" -- I'll look for it.
Bob Schor
09-18-2025 08:46 PM - edited 09-18-2025 08:49 PM
Hello again, Alonzo.
I found the little Demo I wrote for the Forum. I'm (deliberately) going to attach a picture of the code (after I said "Don't attach pictures") for the following reasons:
Here is the Demo:
You will notice that there are two "lines of code" here -- one that has three IMAQdx functions on the Error Line (Configure Grab, Grab2, and Close Camera) and a lower While Loop that has "something" that writes (presumably an image) to an Image Window on the Front Panel.
You will notice that there is something that connects the two While loops that looks like a purple "pipe" -- this is a Stream Channel Wire, and the two While Loops are running something called a "Producer/Consumer Design Pattern", a form of parallel processing where the Producer (the top loop, getting Images from the Camera at, I think, 30 Frames/sec) "packages" a single "Grab" Image and (virtually instantaeously) transfers it to the Consumer (lower loop) where it gets written to the Image Window. Notice that the Stop button stops the Producer, and sends a "Last Data" signal to the Consumer to tell it to stop.
As it turns out, I wrote this in LabVIEW 2021, and just verified it ran fine in LabVIEW 2021. I've got LabVIEW 2024 (Q3, 64-bit) on a computer at work, and I'm certain it will work there, but why don't you try it on your system? If you get an error, let us know precisely what it was. Since this is using IMAQdx "primatives" (and not "Assistants"), there should be only a few places for things to go wrong.
Bob Schor
09-18-2025 11:25 PM
Hi Bob,
Thank you very much for your quick reply.
Sorry that my previous images were not very explanatory. I would like to implement the code you sent me—indeed I tried, up to the point of needing to create an IMAQdx Session I/O block or a control for the “session in” input of any IMAQdx block where my code crashes.
I found on another forum that someone experienced a very similar problem:
https://forums.ni.com/t5/LabVIEW/The-program-crashes-as-soon-as-the-IMAQdx-session-control-on-the/m-...
I also cannot open any of the example VIs that might contain this block. I've seen that this function/block calls IMAQdx.ctl which is the component that seems to be crashing. It might be a compatibility or licensing issue?
I recorded a ~1.5-minute video showing the installed licenses and libraries, as well as some cases when the crash occurs. I hope this provides more context than the images. I would attach code, but I can’t generate the error until I create the control, and LabVIEW neither saves nor lets me save anything once that error occurs.
Thank you again for your help. I look forward to your response.
Alonso Cifuentes
09-19-2025 03:24 AM
@AlonsoCifuentes wrote:
I also cannot open any of the example VIs that might contain this block. I've seen that this function/block calls IMAQdx.ctl which is the component that seems to be crashing. It might be a compatibility or licensing issue?I recorded a ~1.5-minute video showing the installed licenses and libraries, as well as some cases when the crash occurs. I hope this provides more context than the images. I would attach code, but I can’t generate the error until I create the control, and LabVIEW neither saves nor lets me save anything once that error occurs.
Thank you again for your help. I look forward to your response.
Alonso Cifuentes
Consider to upgrade to the latest versions LabVIEW as well as IMAQdx, for me it works with both 2025 Q3:
Andrey.
09-19-2025 07:36 AM
I just tried my old code on LabVIEW 2024 Q3 (64-bit). It "almost" works, but there seems to be a possible "bug" in the Configure Grab VI that ships with IMAQdx. You'll notice my code uses the "default" name for the first camera plugged into the computer (typically its WebCam, if one is built-in, as on a Laptop). Well, my desktop doesn't have a built-in WebCam, but rather a Logitec C920, so I needed to change the constant "cam0" wired in to Config Grab to "C920", at which point it worked fine.
But what if I failed to wire anything there? Configure Grab tests for this case, and if you wire nothing, it substitutes "cam0". Is this a bug? Well, not really, I suppose -- if you don't furnish a "real" camera name, it will throw Error -1074360311, "Camera not found", which is true, but a more "helpful" error message would be to say "Camera "cam0" not found".
Bob Schor