reticulatedpines / magiclantern_simplified

A Git based version of Magic Lantern, for those unwilling or unable to work using Mercurial. The vast majority of branches have been removed, with those thought to be important brought in individually and merged.
GNU General Public License v2.0
142 stars 50 forks source link

Refactor ptpcam (fix warnings / bugs) #51

Open coon42 opened 2 years ago

coon42 commented 2 years ago

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.

reticulatedpines commented 1 year ago

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?

coon42 commented 1 year ago

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

reticulatedpines commented 1 year ago

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

coon42 commented 1 year ago

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

reticulatedpines commented 1 year ago

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.

coon42 commented 1 year ago

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.