Canada
Asked

Camera Snapshot Feature Not Functioning

The Camera Snapshot feature appears to not function.

Reproduction Steps: -Open ARC, open the appropriate project (in this case the JD example project). -Turn on the robot and connect to it via WiFi and then the software. -Verify the robot's camera works by turning it on. -Go to Project > Add > Camera > Camera Snapshot to add the Snapshot skill. -Click Save Now on Camera Snapshot. -Alternatively go to Workspace 2 and test it using the snapshot button in the Mobile Builder.

In both instances Camera will throw the following error message: Camera Initialized: EZB://192.168.1.1 @ 320x240 Save Image (C:\Users\Admin\Pictures\My Robot Pictures\638996678888847564.jpg) Error: System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+. at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams) at EZ_B.Camera.bK3HeJoySe53tA6X65ri(Object , Object , Object , Object ) at EZ_B.Camera.JkNlcB5OOqy(Bitmap )

Other Details: Within the My Robot Pictures Folder it creates a 0 byte .jpg file which can't be opened as there's no data inside.  I'm on Windows 10 and have verified the same issue comes up in Windows 11 on a separate device.  I've also double checked that the My Robot Pictures folder has write permissions as described in this old thread, as well as all the other steps that were detailed there as well. It does appear to work when using a laptop webcam, so it must have something to do with how the system draws a file from the camera.

Is there a way that this can be fixed? I believe this is a software error, but I may have missed something.


Related Hardware JD Humanoid
Related Controls Camera Snapshot Camera Device

ARC Pro

Upgrade to ARC Pro

Take control of your robot's destiny by subscribing to Synthiam ARC Pro, and watch it evolve into a versatile and responsive machine.

PRO
Canada
#1  

Hi Zachary - I’m Athena. Thanks for the clear reproduction steps and the error details - that GDI+ error plus a 0-byte .jpg gives us useful clues. Let’s methodically troubleshoot this so we can find a reliable fix or a workaround.

Short summary / likely causes

  • The error System.Runtime.InteropServices.ExternalException(0x80004005): A generic error occurred in GDI+ typically means the Image.Save() failed after the file was created. Common causes:
    • ARC (or the camera stream) provided an invalid/disposed bitmap (no data to save).
    • The process cannot write to the target folder (Windows Controlled Folder Access / AV / permissions).
    • The specific video/camera stream format returned by the EZB camera is not compatible with the snapshot saving routine for that camera type (a software bug).
  • The fact that a laptop webcam works but the EZB camera fails strongly suggests either (A) an imaging/bitmap incompatibility for the EZB stream, or (B) a write/Windows security block that only affects ARC when handling the EZB camera stream.

What I want you to try first (quick tests, in order)

  1. Test saving to a different folder (simplest permissions test)

    • Open Camera Device settings -> Media -> Change (save location) and set it to C:\Temp (create folder first).
    • Restart ARC (optional), run the Camera Device, then press Camera Snapshot -> Save Now.
    • If this works, it indicates a permissions/Controlled Folder Access issue for your Pictures folder.
  2. Try running ARC as Administrator

    • Close ARC, right-click its icon and Run as administrator. Try Save Now again.
    • If this fixes it, it again points to permissions/Windows blocking.
  3. Check Windows Controlled Folder Access / Antivirus

    • Windows Security -> Virus & threat protection -> Ransomware protection -> Controlled folder access.
    • If enabled, either disable it temporarily or add ARC to the allowed apps list. Then test snapshot again.
  4. Try a lower resolution / different camera settings

    • In Camera Device, set a lower resolution (try 160x120 or 320x240) and re-test Save Now.
    • If lower resolution works, the problem may be memory/bitmap size or a codec issue.
  5. Test from a minimal ARC project

    • Create a new blank project with only:
      • Camera Device (pointed to your EZB camera)
      • Camera Snapshot
    • Start the camera and try Save Now. This rules out interference from other skills/plugins.
  6. Verify Camera Snapshot target title

    • Open Camera Snapshot settings and ensure its "Title" references the exact Camera Device skill name (if changed). The Snapshot skill uses that title to identify a running Camera Device.
    • The Snapshot skill log line you posted shows "Camera Initialized: EZB://192.168.1.1 @ 320x240" so it is finding the camera - but confirm the Snapshot skill is pointing at that running Camera Device.

If these quick tests don’t help, try this controlled test and log capture

  • Start the Camera Device (EZB camera) and then click Save Now in Camera Snapshot.
  • Immediately open ARC’s Debug/Log window and copy the detailed error log lines (full stack trace). Paste them into your reply. The stack trace you posted is helpful, but the debug log may have more context (file path, inner exception).

Workarounds / programmatic snapshot

  • You can try invoking the Camera Snapshot snapshot command programmatically (useful for testing). In a script/button run:
// send the Snapshot command to the Camera Snapshot skill
controlCommand("Camera Snapshot", "CameraSnapshot");
print("Snapshot command sent");
  • If that returns the same error, it confirms the save path / bitmap path is being hit programmatically as well.

Other things to confirm

  • ARC version and build (Help -> About). Please tell me the ARC version and build number.
  • EZB firmware version (displayed in the EZ-B window when connected). Link/code page you referenced: https://synthiam.com/Support/Hardware/JD-Humanoid
  • Are you using any special firewall/AV or managed corporate machine policies that might block writes to Pictures?
  • Controlled Folder Access status (on/off).

Why I suspect Windows controlled folder / GDI+ permission first

  • The snapshot file is created but zero bytes means the save attempt reached file creation but failed while writing pixel data. Windows Controlled Folder Access (or AV) will often allow a process to create a file but block actual writing of contents, which produces the exact symptom you described. The fact the webcam works may indicate different buffering behavior between the sources. Running as Admin or changing the save folder usually isolates this quickly.

If it looks like a camera/stream incompatibility

  • If the permission checks pass and a minimal project still fails, this may be an ARC bug in handling the EZB video stream while saving via GDI+. In that case:
    • Please send the ARC debug log around the Save Now attempt (the full exception and any camera plugin debug lines).
    • I’ll provide a recommended workaround (saving via Camera Device alternate stream or using a different snapshot approach) and file a reproducible report for engineering if needed.

Useful links

Next steps for you

  1. Try steps 1-6 above and tell me:
    • Which step changed behavior (if any).
    • ARC build number and EZB firmware version.
    • The full debug log (if Save Now still fails).
  2. If you prefer, I can give an alternate method to capture/save the frame using a small JS script (if you confirm ControlCommand works).

I’ll stay with you until we get this snapshot saving reliably working. Which test can you run now and what are the ARC and EZB firmware versions?


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
#2  

I've completed all six of the tests you requested. No change in the error message has occurred. Notable information on the tests are detailed as below; otherwise presume no change in ARC Camera window error message.

Test 1) It saves the same 0 btye file into the new folder. Test 3) That setting was not enabled by default.

ARC's Debug Log has no changes between connection completion and attempting to save a snapshot. The only error message is the one previously stated in the Camera window Debug area. The debug log has been pasted below anyway.

Attempting connection on 192.168.1.1:23 Connected to 192.168.1.1:23 Reports EZB v4 OS With Comm 2 Firmware 'EZ-B v4.x/2 Native Firmware' on 'EZ-Robot EZ-B v4.x/2' supports the following capabilities:

  • ADC with 12 bit Resolution
  • Can stream Audio v4 codec
  • Reports battery voltage
  • Reports CPU temperature
  • Read/Write Digital I/O Ports
  • Hardware UART TX/RX with DMA buffer and adjustable baud rate
  • I2C Master
  • LIPO battery protection & shutdown
  • PWM Duty on digital ports
  • PWM servos on digital ports
  • PWM servos on digital ports can release their position
  • Servo speed for PWM servos on digital ports
  • Has NVRam configuration and can be restored to default settings
  • Transmit Uart TX on all digital ports
  • Adjustable I2C clock speed
  • Configurable UART TX digital port baud timing
  • Ultrasonic Ping distance sensor support
  • 12 Byte Unique Identifier
  • Can stream video v4 codec
  • Native UART Connectivity from ARC
  • Native WiFi Connectivity from ARC
  • Broadcasts to ARC's PnP network scanner

EZ-B v4.x/2 Native Firmware ID: 90-50-0-0-120-255-60-58-57-38-37-37 Setting battery monitor voltage: 7 Setting battery protection: True Setting i2c rate: 100000 EZ-B voltage is 7.060529352 EZ-B temperature is 25.18245512996727024C Connected

ARC Version: 2025.06.22.00 EZ-B Firmware Version:  WiFi 3165 v2018.09.30.00 This is my personal device, so no additional corporate policies are active. I also do not have a separate antivirus installed other than Windows Defender. The ControlCommand doesn't work either, so that won't be a solution.

PRO
Canada
#3  

Thanks - that helps. You’ve already done the basic permission and folder tests, and the stack trace you pasted confirms ARC is hitting System.Drawing.Image.Save() inside the EZ_B.Camera plugin and failing while writing the image (0-byte file). Because your laptop webcam works but the EZB stream does not, this points to one of two areas:

  • the Camera Device plugin is receiving a bitmap it cannot encode/save (plugin/bitmap/codec edge case), or
  • the plugin is being blocked while writing the image (Windows/AV/file-lock scenario) in a way that wasn’t captured by the general ARC log.

Next I want to gather a bit more diagnostic info and try a couple of targeted tests that throw more plugin-level debug information (so engineering can reproduce if needed). Please follow the steps below and paste back the requested outputs.

  1. Enable plugin error detail (Stop Camera on Error)
  • Open the Camera Device skill, click the triple-dots (kebab) menu -> Settings -> Advanced (or open the Advanced configuration tab).
  • Enable "Stop Camera on Error" and save.
  • Run the camera, then click Camera Snapshot -> Save Now.
  • When the error appears, copy the full error dialog text (the plugin error window should contain a more detailed exception and maybe inner exception). Paste it here.

Why: this forces the plugin to present full exception details rather than silently failing, and often includes inner exception text that explains the GDI+ failure.

  1. Confirm skill titles and exact Snapshot target
  • Open Camera Device settings -> Advanced -> Title (top field) and copy its exact title text.
  • Open Camera Snapshot settings -> Title and copy its exact title text.
  • Paste both titles here.

Why: Snapshot uses the Camera Device title to find the running camera. I know a 0-byte file was created, but confirming exact title matching rules out an edge-case mismatch.

  1. Confirm you see a live image and the resolution
  • With the Camera Device running, confirm the image is visible in the Camera Device window.
  • Note the displayed resolution shown in the Camera Device header (you earlier posted "EZB://192.168.1.1 @ 320x240"). Confirm that is still the resolution when you try Save Now.

Why: If the device is running in a plugin-specific video codec format (v4 stream) the plugin might produce an intermediate bitmap that GDI+ cannot save.

  1. Check Windows Event Viewer for .NET / Application errors
  • Open Event Viewer -> Windows Logs -> Application, look for any .NET Runtime or Application errors at the exact time you clicked Save Now.
  • If any appear for ARC/EZ_B.Camera, copy/paste the details here.

Why: Some plugin exceptions are bubbled into Event Viewer even when ARC debug is silent.

  1. Advanced capture (optional, if you’re comfortable) If the steps above do not reveal the inner exception, I recommend running Process Monitor (Sysinternals) briefly while reproducing the issue to capture the file write operations to the snapshot folder:
  • Download and run ProcMon (https://docs.microsoft.com/sysinternals/downloads/procmon).
  • Add a filter: Process Name is ARC.exe (or Arc64.exe if present) -> Include.
  • Add a filter on Path contains "My Robot Pictures" -> Include.
  • Clear the procmon log, reproduce the Save Now, then stop capture and save the procmon log (.PML or export as text). Paste the relevant lines showing CreateFile / WriteFile / CloseFile operations for the created 0-byte .jpg.

Why: ProcMon will show whether ARC created the file and then failed writes (ACCESS DENIED, INVALID PARAMETER, etc.). This often gives the exact Windows-level reason for GDI+ save failure.

  1. Quick extra test (different encoder)
  • In Camera Device Media settings try changing Snapshot Quality (if present) to a different value (e.g., 75 or 50). Save and retest Snapshot.
  • Also try the Camera Device "Processed / Original" dropdown (if visible) and set to Original then Snapshot.

Why: If the plugin uses encoder parameters that fail (encoder null), changing quality or feeding original bits may bypass the problematic code path.

What to paste back here

  • The full plugin error dialog text after enabling Stop Camera on Error (step 1). This is the most important item.
  • The Camera Device title and Camera Snapshot Title (step 2).
  • Confirmation that a live image is visible and the resolution (step 3).
  • Any relevant Event Viewer .NET/Application error (step 4).
  • If you ran ProcMon (step 5), the small excerpt that shows the file create/write/close for the 0-byte .jpg.

If you prefer, I can also provide the ProcMon filter steps as a step-by-step with screenshots. Once you paste the plugin error dialog contents (step 1) I can usually identify whether it’s a missing encoder, invalid parameters, or an OS-level access block and give a specific workaround or a small JavaScript snapshot alternative to capture the raw frame.

Would you like the detailed ProcMon steps now, or can you enable "Stop Camera on Error" and paste that plugin exception text first?


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
#4  
  1. When the error occured, it didn't stop the camera device. The same debug log was still created as detailed below. Camera Initialized: EZB://192.168.1.1 @ 320x240 Object Recognition loaded. Save Image (C:\Users\Admin\Pictures\My Robot Pictures\638996746356288210.jpg) Error: System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+. at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams) at EZ_B.Camera.bK3HeJoySe53tA6X65ri(Object , Object , Object , Object ) at EZ_B.Camera.JkNlcB5OOqy(Bitmap )

Camera Device Skill Title: Camera Camera Snapshot Control Name: Camera

  1. Yes, I can see myself from the robot's camera at the correct resolution.

  2. There are no errors in the Event Viewer Windows Log Application.

  3. Using ProcMon, the following logs are created at the time Save Now is clicked. The only relevant ones are likely the last 4, as they mention the filename directly while the others only mention the file folder.

1:46:36.6354983 PM ARC.exe 2248 CreateFile C:\Users\Admin\Pictures\My Robot Pictures SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened 1:46:36.6355382 PM ARC.exe 2248 QueryNetworkOpenInformationFile C:\Users\Admin\Pictures\My Robot Pictures SUCCESS CreationTime: 2017-11-22 10:32:05 AM, LastAccessTime: 2025-11-25 1:46:29 PM, LastWriteTime: 2025-11-25 1:46:28 PM, ChangeTime: 2025-11-25 1:46:28 PM, AllocationSize: 8192, EndOfFile: 8192, FileAttributes: D 1:46:36.6355637 PM ARC.exe 2248 CloseFile C:\Users\Admin\Pictures\My Robot Pictures SUCCESS
1:46:36.6358856 PM ARC.exe 2248 CreateFile C:\Users\Admin\Pictures\My Robot Pictures SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened 1:46:36.6359220 PM ARC.exe 2248 QueryNetworkOpenInformationFile C:\Users\Admin\Pictures\My Robot Pictures SUCCESS CreationTime: 2017-11-22 10:32:05 AM, LastAccessTime: 2025-11-25 1:46:29 PM, LastWriteTime: 2025-11-25 1:46:28 PM, ChangeTime: 2025-11-25 1:46:28 PM, AllocationSize: 8192, EndOfFile: 8192, FileAttributes: D 1:46:36.6359441 PM ARC.exe 2248 CloseFile C:\Users\Admin\Pictures\My Robot Pictures SUCCESS
1:46:36.6362898 PM ARC.exe 2248 CreateFile C:\Users\Admin\Pictures\My Robot Pictures SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened 1:46:36.6363262 PM ARC.exe 2248 QueryNetworkOpenInformationFile C:\Users\Admin\Pictures\My Robot Pictures SUCCESS CreationTime: 2017-11-22 10:32:05 AM, LastAccessTime: 2025-11-25 1:46:29 PM, LastWriteTime: 2025-11-25 1:46:28 PM, ChangeTime: 2025-11-25 1:46:28 PM, AllocationSize: 8192, EndOfFile: 8192, FileAttributes: D 1:46:36.6363546 PM ARC.exe 2248 CloseFile C:\Users\Admin\Pictures\My Robot Pictures SUCCESS
1:46:36.6391437 PM ARC.exe 2248 CreateFile C:\Users\Admin\Pictures\My Robot Pictures SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened 1:46:36.6392014 PM ARC.exe 2248 QueryNetworkOpenInformationFile C:\Users\Admin\Pictures\My Robot Pictures SUCCESS CreationTime: 2017-11-22 10:32:05 AM, LastAccessTime: 2025-11-25 1:46:29 PM, LastWriteTime: 2025-11-25 1:46:28 PM, ChangeTime: 2025-11-25 1:46:28 PM, AllocationSize: 8192, EndOfFile: 8192, FileAttributes: D 1:46:36.6392322 PM ARC.exe 2248 CloseFile C:\Users\Admin\Pictures\My Robot Pictures SUCCESS
1:46:36.6395246 PM ARC.exe 2248 CreateFile C:\Users\Admin\Pictures\My Robot Pictures\638996751966363423.jpg SUCCESS Desired Access: Generic Write, Read Attributes, Disposition: OpenIf, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, AllocationSize: 0, OpenResult: Created 1:46:36.6399060 PM ARC.exe 2248 SetEndOfFileInformationFile C:\Users\Admin\Pictures\My Robot Pictures\638996751966363423.jpg SUCCESS EndOfFile: 0 1:46:36.6399692 PM ARC.exe 2248 SetAllocationInformationFile C:\Users\Admin\Pictures\My Robot Pictures\638996751966363423.jpg SUCCESS AllocationSize: 0 1:46:36.6408047 PM ARC.exe 2248 CloseFile C:\Users\Admin\Pictures\My Robot Pictures\638996751966363423.jpg SUCCESS

  1. Both of these suggestions were tested and resulted in no change.
PRO
Canada
#5  

Thanks - that ProcMon trace and behavior make the problem clear enough to pick the most effective next step.

What we know

  • ARC successfully creates the .jpg file (CreateFile/OpenIf) and sets its length to 0 (SetEndOfFileInformationFile = 0) then closes it. That matches the 0-byte files you see.
  • System.Drawing.Image.Save is throwing the GDI+ ExternalException while attempting to write the image data to that file.
  • This is not an OS-level Access Denied - ProcMon shows SUCCESS for file creation/writes.
  • A laptop webcam works; the EZB camera stream consistently fails. That points to an image/encoder/format edge case inside the Camera Device plugin when handling the EZB v4 stream (bitmap pixel format or encoder parameters used by the plugin are not accepted for this source).
  • Enabling "Stop Camera on Error" did not yield additional inner exception text in your environment.

Conclusion This is almost certainly a Camera Device plugin bug (GDI+ save call failing for this particular camera stream). We can continue chasing obscure diagnostics, but the fastest practical path is a workaround: capture the same camera frame from the running camera control and save it with a slightly different save path/encoder call from a plugin/skill that attaches to the Camera Device and writes the JPEG using ImageFormat.Jpeg (instead of whatever encoder/parameters path the failing code uses). Using the Camera control the same way shown in the Camera Control docs allows saving the _OutputBitmap (or the GetOutputBitmap) into a file while avoiding the plugin path that causes the GDI+ error.

Two options I can help you with - pick one

Option A - Quick: I provide a small robot skill (C# plugin) you can compile/run that attaches to your Camera Device and saves the current camera frame using Image.Save(path, ImageFormat.Jpeg). This circumvents the failing code-path and should produce a valid JPEG from the EZB stream. If you want this, I’ll give you the full source file and step-by-step compile/load instructions (it’s a simple Visual Studio class library that drops a DLL in ARC’s plugins folder). This is the fastest route to get snapshots working immediately.

Option B - Deeper diagnostics / bug report: we continue gathering low-level capture (full ProcMon export, full ARC process dump, or additional plugin-level debug) so we can pinpoint the exact pixel format or encoder parameter that triggers GDI+ to fail and propose a proper fix for the Camera Device plugin. This is slower and more technical.

If you want Option A (recommended for immediate use), here is a ready-to-compile robot skill skeleton you can use. It attaches to the first Camera Device found, and exposes a ControlCommand "SaveEZBCamera" that will save the current output bitmap as a JPEG in your My Robot Pictures folder with a timestamped filename.

Code (C# Robot Skill)

using System;
using System.IO;
using System.Drawing;
using System.Drawing.Imaging;
using System.Windows.Forms;
using System.Collections.Generic;
using ARC; // ARC assembly references (EZ-Builder/ARC)
using ARC.UCForms;

namespace CameraSnapshotFix
{
    public partial class FormMain : ARC.UCForms.FormPluginMaster
    {
        ARC.UCForms.FormCameraDevice _cameraControl;

        public FormMain()
        {
            InitializeComponent();
        }

        public override void Init()
        {
            // optional: auto-attach at startup
            AttachToCamera();
        }

        void AttachToCamera()
        {
            DetachFromCamera();

            // find the first Camera Device control
            Control[] cameras = ARC.EZBManager.FormMain.GetControlByType(typeof(ARC.UCForms.FormCameraDevice));
            if (cameras.Length == 0)
            {
                ARC.EZBManager.Log("CameraSnapshotFix: No Camera Device found in project.");
                return;
            }

            _cameraControl = (ARC.UCForms.FormCameraDevice)cameras[0];
            ARC.EZBManager.Log($"CameraSnapshotFix: Attached to camera '{_cameraControl.Text}'");
        }

        void DetachFromCamera()
        {
            if (_cameraControl != null)
            {
                ARC.EZBManager.Log($"CameraSnapshotFix: Detaching from '{_cameraControl.Text}'");
                _cameraControl = null;
            }
        }

        // allow controlcommand: SaveEZBCamera
        public override void SendCommand(string windowCommand, params string[] values)
        {
            if (windowCommand.Equals("SaveEZBCamera", StringComparison.InvariantCultureIgnoreCase))
            {
                SaveCurrentFrame();
            }
            else if (windowCommand.Equals("Attach", StringComparison.InvariantCultureIgnoreCase))
            {
                AttachToCamera();
            }
            else if (windowCommand.Equals("Detach", StringComparison.InvariantCultureIgnoreCase))
            {
                DetachFromCamera();
            }
            else
            {
                base.SendCommand(windowCommand, values);
            }
        }

        public override object[] GetSupportedControlCommands()
        {
            List<string> cmds = new List<string>();
            cmds.Add("SaveEZBCamera");
            cmds.Add("Attach");
            cmds.Add("Detach");
            return cmds.ToArray();
        }

        void SaveCurrentFrame()
        {
            try
            {
                if (_cameraControl == null)
                {
                    ARC.EZBManager.Log("CameraSnapshotFix: No camera attached.");
                    return;
                }

                if (!_cameraControl.Camera.IsActive)
                {
                    ARC.EZBManager.Log("CameraSnapshotFix: Camera is not running.");
                    return;
                }

                // Get the output bitmap from the camera control.
                // GetOutputBitmap returns an AForge unmanaged image; convert to a managed Bitmap:
                var output = _cameraControl.Camera.GetOutputBitmap;
                if (output == null)
                {
                    ARC.EZBManager.Log("CameraSnapshotFix: No output bitmap available.");
                    return;
                }

                using (Bitmap bmp = output.ToManagedImage(false))
                {
                    // Compose filename
                    string folder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures), "My Robot Pictures");
                    Directory.CreateDirectory(folder);
                    string fileName = Path.Combine(folder, DateTime.Now.ToString("yyyyMMdd_HHmmss_fff") + ".jpg");

                    // Save using ImageFormat.Jpeg (avoid encoder parameter path used by the failing code)
                    bmp.Save(fileName, ImageFormat.Jpeg);

                    ARC.EZBManager.Log($"CameraSnapshotFix: Saved snapshot to {fileName}");
                }
            }
            catch (Exception ex)
            {
                ARC.EZBManager.Log("CameraSnapshotFix: Exception saving snapshot: " + ex.ToString());
            }
        }

        protected override void FormMain_FormClosing(object sender, FormClosingEventArgs e)
        {
            DetachFromCamera();
            base.FormMain_FormClosing(sender, e);
        }
    }
}

What I will provide after you say "Yes, please give me the plugin":

  • Exact Visual Studio project settings and references you need (which ARC DLLs to reference; typically ARC.exe and EZ_B.dll and aforge.dll), and how to compile the DLL.
  • Where to place the compiled DLL so ARC loads it as a Robot Skill.
  • How to call it from ARC (ControlCommand syntax) and how to add a button in ARC to call the SaveEZBCamera control command.

If you want me to proceed with Option B (deeper diagnostics), I’ll ask you to:

  • Run ProcMon again but capture the entire ARC process during SaveNow (you already did - that was good). Export the .PML and share the small exported text lines around the event - you already pasted the key lines. For further diagnosis I might ask for an ARC process ETW trace or a small memory dump captured right after the failing SaveNow. That’s more complex though.

Recommendation I recommend Option A - I’ll give you the small robot skill that saves the current camera output using ImageFormat.Jpeg (this should avoid the failing encoder code path). It’s straightforward to compile and load and will let you take snapshots from your EZB camera immediately.

Which path do you want?

  • "A - Yes, give me the plugin and build instructions" (fast)
  • "B - Continue deeper diagnostics" (slow, more intrusive)

If you pick A, tell me whether you are comfortable compiling a Visual Studio Class Library (I’ll include exact steps) or whether you’d like step-by-step screenshots. I’ll then post the detailed compile/load steps.


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
#6  

We'll have to take a look into this to see if it can be produced.