Skip to content

Conversation

@krleon
Copy link

@krleon krleon commented Dec 2, 2025

Description

Camera 1 Still Image Test Tool did not return properly due to early timeout and unsuccessful return from lm_main due to segmentation fault caused by multiple calls to shutdown the ipc. Javascript to display and close the image display modal box after successful image capture also had a couple small errors preventing it from functioning properly.

What does this PR do?

  1. Sets consumer_ and producer_ pointers to null after deletion
  2. Adds variable to make sure activemq library is not attempted to be shutdown if it hasn't been initialized or already shutdown (this also allows program to close gracefully if the wrong system mode is entered in the command line, which previously caused a segmentation fault)
  3. Fixes a couple of typos in the testing tools python and javascript code to allow the successful test image to be shown after running camera1_still test.

Why is this change needed?

Allows user to successfully test that camera1 is working with the testing tools and to view the image from the web app after capture

Related Issue(s)

Changes Made

  • See above under what PR does

Testing Performed

  • Checked that it worked on PiTrac system using web app.

Test Environment

  • Pi Model: Pi 5 8GB
  • Camera Type: Innomaker IMX296 Mono
  • OS Version: Trixie
  • Installation Method: Package method (sudo build.sh dev)

Test Results

Camera1 Still Image Test successfully completes; Output logged to web and to log file; Camera1 Still Image Displayed in web app, and can successfully close modal dialog box.

Test Commands Run

N/A

Performance Impact

N/A

Breaking Changes

None

Dependencies

  • [X ] No new dependencies
  • [ ] New dependencies added:

  • [ ] Updated dependencies:

Hardware Compatibility

  • [ X ] Tested on Pi 5
  • Tested on Pi 4
  • [ X ] Tested with single Pi setup
  • Tested with dual Pi setup

Documentation

  • [ X ] No documentation needed
  • Documentation updated in this PR
  • Documentation PR to follow
  • Updated relevant sections:
    • README
    • Hardware guide
    • Software guide
    • Troubleshooting guide

Screenshots/Videos

Checklist

Code Quality

  • [ X ] Code follows existing patterns and conventions
  • No unnecessary comments added
  • Error handling implemented appropriately

Build & Test

  • [ X ] Successfully builds with ./packaging/build.sh build
  • [ X ] All existing tests pass
  • New tests added for new functionality
  • [ X ] Tested on actual Raspberry Pi hardware (not just CI)

Submission Requirements

  • [ X ] Commits squashed if needed (git rebase -i HEAD~n)
  • [ X ] CLA signed
  • [ X ] PR title follows format: [PR TYPE] Brief description
  • [ X ] Branch is up-to-date with main

Additional Context


…operly due to segfault caused by multiple shutdown calls to ipc. Also fixed modal for image result and extended timeout to let it finish completely.
@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

All contributors have signed the CLA. Thanks!
Posted by the CLA Assistant Lite bot.

@krleon
Copy link
Author

krleon commented Dec 2, 2025

I have read the CLA Document and I hereby sign the CLA

@connorgallopo
Copy link
Collaborator

I would put this on hold - There is an open PR of mine for completely changing how we display images in the UI including live streaming for focus etc

@connorgallopo
Copy link
Collaborator

connorgallopo commented Dec 2, 2025

#154

Here is the mentioned PR - Its a much larger refactor with a more integrated way to handle these things. I just need to rebase it

@connorgallopo
Copy link
Collaborator

@krleon I did a second pass and it's certainly an improvement to what things are. Does camera 2 need similar fixes?

Also - Did you test the fix and verify no regressions? I know not a ton of people have full builds right now so just want to drill down next steps (test/merge)

@connorgallopo
Copy link
Collaborator

@krleon Just bumping this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants