magiclantern_simplified icon indicating copy to clipboard operation
magiclantern_simplified copied to clipboard

Refactor ptpcam (fix warnings / bugs)

Open coon42 opened this issue 3 years ago • 6 comments

contrib/ptpcam gives alot of warnings when compiling and tends to crash when exiting with ctrl+c while it is running. We may refactor it a bit to make it more stable.

coon42 avatar Jan 10 '22 17:01 coon42

Trying to clean up old PRs and issues. Can you still repro this? If so, can you give instructions on how? Doesn't look like this is intended to build on Linux - Windows only?

reticulatedpines avatar Jul 30 '22 21:07 reticulatedpines

It's probably intended to build on Windows but it also works fine on Linux (ubuntu 18.04)

I think warnings got reduced by alot meanwhile. There are only some macro redefinitions left like:

"htobe16" redefined
"htobe32" redefined
"be16toh" redefined
"be32toh" redefined

etc.

Can be reproduced by executing make in ptpcam directory on dev branch using ubuntu 18.04

coon42 avatar Jul 30 '22 23:07 coon42

Doesn't build for me, errors on missing <usb.h> - some dev library provides this I guess? Could do with an improved README or something.

reticulatedpines avatar Jul 31 '22 12:07 reticulatedpines

yes, I think it should work after installing libusb-dev

coon42 avatar Jul 31 '22 12:07 coon42

Good, builds for me with that added. Still has a few compile warnings for me so I'm happy to leave this ticket for that part of the work.

"tends to crash" is not descriptive enough for a useful bug report, though I don't doubt you :)

Please file crashes you care about as separate issues, with repro instructions and stack traces / valgrind output etc.

reticulatedpines avatar Jul 31 '22 18:07 reticulatedpines

I agree that those are two different issues. We should only handle one issue per ticket, thus the ctrl+c crash issue has been moved to https://github.com/reticulatedpines/magiclantern_simplified/issues/65. I may try to fix the remaining duplicated definitions so this ticket can be closed.

coon42 avatar Jul 31 '22 18:07 coon42