CHDK for PowerShot G1 X? - page 9 - CHDK Releases - CHDK Forum

CHDK for PowerShot G1 X?

  • 101 Replies
  • 52161 Views
Re: CHDK for PowerShot G1 X?
« Reply #80 on: 23 / April / 2017, 13:19:42 »
Advertisements
The romlog is always the same except for date.
Crash only occurs if sync enabled.
Upside camera blanks screen and waits for switch release,does not crash.
Pointing at mirror, a normally-orientated camera crashes nearly every time except when I cover face with a glove !

It is definitely face detection.

Maybe waiting for switch release interrupts face detection at a critical phase ?

Voy2
« Last Edit: 23 / April / 2017, 13:36:25 by Voy2 »

Re: CHDK for PowerShot G1 X?
« Reply #81 on: 23 / April / 2017, 13:27:58 »
The romlog is always the same except for date. Crash only occurs if sync enabled.
Thanks for checking that.

Quote
Upside camera blanks screen and waits for switch release,does not crash.
Pointing at mirror, crashes nearly every time except when I cover face with a glove !
So the most obvious conclusion is that an upside down camera does not recognize faces? 

Quote
It is definitely face detection.
If you point the cameras such that there are no faces in the field of view do they ever crash when shooting?

Quote
Maybe waiting for switch release interrupts face detection at a critical phase ?
Waiting for the switch to release is done in a tight loop - the task hogs 100% of the CPU time while this happens. The Canon firmware is not expecting that to happen - you may have discovered a weakness (bug) in the Canon face detection routines.

Adding a "yield" to the sync hard coded loop might cause the problem to go away,  at the expense of "sync" precision.

All this also leaves one wondering why the face detection is crashing if you have in fact disabled it in the Canon menus?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDK for PowerShot G1 X?
« Reply #82 on: 23 / April / 2017, 14:01:20 »
The reason for the assert is a failed TryPostMessageQueue call, made by the MotionVector task. The message queue in question is owned by the ChaseFrame task. The task priorities of the ChaseFrame task and CaptSeqTask are both 23 (see their CreateTask call).
The sync code is blocking CaptSeq.

Here's a quote from a1ex that might apply in this case:
"If we have two DryOS tasks with equal priorities, they will never interrupt each other, unless one task does some sort of yielding (...)"

Re: CHDK for PowerShot G1 X?
« Reply #83 on: 23 / April / 2017, 14:32:47 »
 
Quote
So the most obvious conclusion is that an upside down camera does not recognize faces? 

I guess it expects mouth to be below eyes  :)
With inverted camera I estimate crashes 5 to 10% of time, with normally-orientated camera about 90% of time !!
 
Quote
If you point the cameras such that there are no faces in the field of view do they ever crash when shooting?

Very rare, one or two percent of the time, maybe it detects something 'face like' ?
 
Quote
Adding a "yield" to the sync hard coded loop might cause the problem to go away,  at the expense of "sync" precision.

Well, it would prove the theory but not really a solution.
You would think the camera does most of its shooting calculations during half-press and by the time full press is reached there is not much left to do other than capture the image.
Maybe switch-release detection should be done at the last possible moment ?

Quote
All this also leaves one wondering why the face detection is crashing if you have in fact disabled it in the Canon menus?

Well, I guess the implication is that it is always running but there are no follow-up actions unless user has enabled detection.

Voy2


Re: CHDK for PowerShot G1 X?
« Reply #84 on: 23 / April / 2017, 14:41:03 »
Quote
Adding a "yield" to the sync hard coded loop might cause the problem to go away,  at the expense of "sync" precision.
Well, it would prove the theory but not really a solution.
If the camera wants to do things and crashes if it is blocked, I'm not sure there is a better solution unless we can find a way to disable face detection.

Quote
Maybe switch-release detection should be done at the last possible moment ?
There has been a lot of work done to get the switch-release detection as close as possible to when the shutter is actually released.  I'm not sure there is much use in trying to improve that.  And it probably won't help - once the switch detection is activated, it has to basically hog the whole camera to ensure it's released on all cameras at almost exactly the same time.

One possability, based on srsa_4c's most recent post, would be to drop the priority of the CaptSeqTask by one, to let the face tracking interrupt if necessary.  This would likely impact sync quality but much less than crashing affects sync quality  ::)  There could also be other nasty side effects.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14080
Re: CHDK for PowerShot G1 X?
« Reply #85 on: 23 / April / 2017, 16:13:18 »
One possability, based on srsa_4c's most recent post, would be to drop the priority of the CaptSeqTask by one, to let the face tracking interrupt if necessary.  This would likely impact sync quality but much less than crashing affects sync quality  ::)  There could also be other nasty side effects.
I would guess the Canon firmware has some mechanism to stop these tasks during actual shooting.

The remote hook appears to be in an unusual place to me in this port (directly in capt_seq, rather than later in the called functions), so perhaps that's related.
Don't forget what the H stands for.

Re: CHDK for PowerShot G1 X?
« Reply #86 on: 23 / April / 2017, 18:09:19 »
Well,well, a search for "chdk chaseframe" finds some interesting hits :-

https://chdk.setepontos.com/index.php?topic=6341.msg92946#msg92946

 
Quote
The remote hook appears to be in an unusual place to me in this port (directly in capt_seq, rather than later in the called functions), so perhaps that's related.

It would seem so :-

https://chdk.setepontos.com/index.php?topic=7887.msg114616#msg114616

I wonder how many other cameras have this problem ?

I will ask some friends to test.

Voy2

Re: CHDK for PowerShot G1 X?
« Reply #87 on: 23 / April / 2017, 18:31:41 »
Well,well, a search for "chdk chaseframe" finds some interesting hits :-
Nice job and congratulations on being persistent.  I'm a little chagrined to see my nick in both of those threads.  After a while, it all kind of blurs together and then an old problem comes back a different way.

Quote
I wonder how many other cameras have this problem ? I will ask some friends to test.
Every port has the position of the raw sync hook inserted by the individual who does the port.  As there is no real DIY level guidance about what each hook means or where to place it,  each port tends to copy the one with the closest release dates to it and hope for the best. Sometimes it's well tested - sometimes not.   
Ported :   A1200    SD940   G10    Powershot N    G16


Re: CHDK for PowerShot G1 X?
« Reply #88 on: 24 / April / 2017, 08:19:14 »
For the S100 it seems there were two possible solutions :-

https://chdk.setepontos.com/index.php?topic=7887.msg114536#msg114536

https://chdk.setepontos.com/index.php?topic=7887.msg114616#msg114616

I guess the second solution requires a developer who has access to the camera and feels inclined to fix the problem.

The first solution looks easier for a knowledgeable developer.
If anyone can find that 'magic number' I have friends who can probably compile a custom version.

Thanks.

Voy2.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: CHDK for PowerShot G1 X?
« Reply #89 on: 24 / April / 2017, 08:42:40 »
New user here, excited to try ptp with multiple cameras.
I tested two G1x (101a and 100e) with usb switch in sync mode and found it was not very reliable, crashing fairly often.
The romlog file is attached.
I am surprised that no one has reported this problem.

Do you know if there is any way of fixing it ?

Thanks.


I suspect you have the 'AF Frame' mode set to 'Tracking AF' in the Canon shooting menu.
Use 'Flexizone' and see if it prevents any crashes.


Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

 

Related Topics