After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 781802 - Ubuntu import autopkgtest fails with 0.26.1
Ubuntu import autopkgtest fails with 0.26.1
Status: RESOLVED NOTGNOME
Product: shotwell
Classification: Other
Component: import
unspecified
Other Linux
: Normal major
: ---
Assigned To: Shotwell Maintainers
Shotwell Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-04-26 21:11 UTC by Jeremy Bicha
Modified: 2017-10-13 09:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
powershot.umockdev (9.97 KB, text/plain)
2017-04-26 21:12 UTC, Jeremy Bicha
  Details
powershot-import.ioctl (556.34 KB, text/plain)
2017-04-26 21:13 UTC, Jeremy Bicha
  Details
Dirty patch keeping ImportPage's "camera" object alive. (4.82 KB, patch)
2017-06-11 07:49 UTC, Jens Georg
rejected Details | Review
Dirty patch keeping ImportPage's "camera" object alive. (4.83 KB, patch)
2017-06-11 08:37 UTC, Jens Georg
none Details | Review
Updated version of the testruner (3.73 KB, text/x-python)
2017-06-11 08:46 UTC, Jens Georg
  Details
Updated version of the testruner (3.56 KB, text/x-python)
2017-06-11 09:04 UTC, Jens Georg
  Details
umockdev import recording (364.91 KB, text/plain)
2017-06-11 09:04 UTC, Jens Georg
  Details
fujix10.umockdev (8.96 KB, text/plain)
2017-06-11 09:05 UTC, Jens Georg
  Details

Description Jeremy Bicha 2017-04-26 21:11:49 UTC
Good news: I uploaded shotwell 0.26.1 to Ubuntu 17.10 Alpha "Artful".
Bad news: Ubuntu's autopkgtest fails with the new version but passes with the old Ubuntu version 0.22.0+git20160108.r1.f2fb1f7-0ubuntu3. I even rebuilt the old version on current Ubuntu 17.10 and the tests still passed with the old version.

Build log (click amd64):
https://launchpad.net/ubuntu/+source/shotwell/0.26.1-0ubuntu1

Autopkgtest test log:
https://autopkgtest.ubuntu.com/packages/s/shotwell

Test Case
=========
Install umockdev
Download the two files I will try to attach to this bug.
From a clean user account and from the same directory that contains those files, run
umockdev-run -d powershot.umockdev -i dev/bus/usb/001/011= powershot-import.ioctl -- shotwell

Click Ok on the Welcome Dialog.
Click the Camera.
Then click Import All.

What Should Happen
-------------------
A dialog should have the title "Import Complete" and message
"2 photos successfully imported"

What Happens
------------
A dialog shows with the title "Import Complete" and message
"2 files failed to import due to a camera error:
IMG_0001.JPG
IMG_0002.JPG"


Content of Save Details:
------------------------
Import Results Report (Shotwell 0.26.1 @ 2017-04-26T20:37:50.570527Z)

Attempted to import 2 files. Of these, 0 files were successfully imported.

Photos/Videos Not Imported Due to Camera Errors:

IMG_0001.JPG
	error message: [-107] Error retrieving file object for /DCIM/100CANON/IMG_0001.JPG: Unknown error

IMG_0002.JPG
	error message: [-107] Error retrieving file object for /DCIM/100CANON/IMG_0002.JPG: Unknown error
Comment 1 Jeremy Bicha 2017-04-26 21:12:37 UTC
Created attachment 350508 [details]
powershot.umockdev
Comment 2 Jeremy Bicha 2017-04-26 21:13:04 UTC
Created attachment 350509 [details]
powershot-import.ioctl
Comment 3 Jens Georg 2017-04-27 10:24:32 UTC
I tested this with shotwell master@d03303ec059f086efb7773a04e0ada773dca0334 and 0.26.1 on Ubuntu 16.04 - works fine.
Comment 4 Jens Georg 2017-05-04 10:29:32 UTC
So, to recap: We figured out that this is caused by applying the iOS 8 work-around, the sequence of talking to the device has changed, thus most likely rendering the recording of umockdev incompatible.

Since iOS marketshare is claimed to be < 2% by now, I wonder if that's still necessary?
Comment 5 Jens Georg 2017-05-04 11:02:09 UTC
Unless that issue is also persistent in later versions, of course
Comment 6 Jeremy Bicha 2017-05-22 15:43:35 UTC
I talked briefly with Martin Pitt who suggested that the umockdev data be recorded again with the iOS patch applied. Are you interested in doing that? I don't have a camera except for my phone and my laptop's webcam.
Comment 7 Jens Georg 2017-05-24 04:37:03 UTC
I can update it for a FUJI X10.
Comment 8 Jens Georg 2017-06-11 07:32:52 UTC
For some reason, with the patched shotwell, I fail to record the camera. The ioctl file stays more or less empty.
Comment 9 Jens Georg 2017-06-11 07:49:10 UTC
Created attachment 353557 [details] [review]
Dirty patch keeping ImportPage's "camera" object alive.

FIXME: need commit message.
(Please also double check the author and subject.)

https://bugzilla.gnome.org/show_bug.cgi?id=742295
Comment 10 Jens Georg 2017-06-11 08:31:24 UTC
Comment on attachment 353557 [details] [review]
Dirty patch keeping ImportPage's "camera" object alive.

(In reply to Jens Georg from comment #8)
> For some reason, with the patched shotwell, I fail to record the camera. The
> ioctl file stays more or less empty.

Issue seems that we have some reference count issues and ImportPage is never destroyed, the camera never closed and umockdev doesn't write anything. The patch I attached previously is useless, because it closes the Camera too early
Comment 11 Jens Georg 2017-06-11 08:37:52 UTC
Created attachment 353559 [details] [review]
Dirty patch keeping ImportPage's "camera" object alive.

FIXME: need commit message.
(Please also double check the author and subject.)

https://bugzilla.gnome.org/show_bug.cgi?id=742295
Comment 12 Jens Georg 2017-06-11 08:46:00 UTC
Created attachment 353561 [details]
Updated version of the testruner
Comment 13 Jens Georg 2017-06-11 09:04:01 UTC
Created attachment 353562 [details]
Updated version of the testruner
Comment 14 Jens Georg 2017-06-11 09:04:51 UTC
Created attachment 353563 [details]
umockdev import recording
Comment 15 Jens Georg 2017-06-11 09:05:23 UTC
Created attachment 353564 [details]
fujix10.umockdev
Comment 16 Jens Georg 2017-06-11 09:06:28 UTC
So, to summarize, you need:
 - The updated patch attached here
 - The two new umockdev files for the Fuji X10
 - The updated testrunner

I have not checked the autopkgtest because my environment is a bit broken ATM, can you please check on your side?
Comment 17 Jeremy Bicha 2017-07-23 16:42:26 UTC
Hi, those files didn't work. Do you want to try again?
Comment 18 Sebastien Bacher 2017-07-28 07:19:33 UTC
The Ubuntu update is still blocked by that, is there any else that can be done to help fixing that issue?
Comment 19 Jens Georg 2017-07-28 08:14:11 UTC
(In reply to Sebastien Bacher from comment #18)
> The Ubuntu update is still blocked by that, is there any else that can be
> done to help fixing that issue?

Someone with a PTP camera should do a new umockdev recording to use in the autopkgtest.

Unfortunately I do not seem to be able to generate files from my Fuji X10 that work. umockdev always exists with an assert.
Comment 20 Jeremy Bicha 2017-09-23 12:01:53 UTC
Shotwell 0.26.3 is in Ubuntu 17.10 Beta now. (I disabled the autopkgtest.)

https://launchpad.net/ubuntu/+source/shotwell

Since this isn't really an upstream Shotwell issue, you can close this bug if you want.
Comment 21 Jens Georg 2017-09-23 12:12:47 UTC
Seen that. I will do one more try with my "new" camera later, if that also fails, I will close it.
Comment 22 Jens Georg 2017-09-23 15:01:04 UTC
Nope no luck with the Dynax7d as well.
Comment 23 Martin Pitt 2017-10-13 06:22:22 UTC
@Jens: Do you mean some crash like `submit_node == NULL`? I get the same with current libgphoto2, apparently the general URB structure can now be more flexible than a few years ago when I developed this.

@Jeremy: This needs to be fixed/adjusted in umockdev before we can update the .ioctl file. This isn't trivial, so let's just keep that test disabled for now.
Comment 24 Jens Georg 2017-10-13 08:47:05 UTC
@Martin: It was an assert of some sort when replaying, I don't know the exact fail. I will be at all systems go, so I can show it to you "live"
Comment 25 Jens Georg 2017-10-13 08:48:13 UTC
Ah. All hail Matrix :D
@phako:matrix.org
14:35pitti: ever seen usbdevfs_reapurb_execute: Assertion `submit_node == NULL' failed in umockdev?
Comment 26 Martin Pitt 2017-10-13 09:18:24 UTC
@Jens: Yep, that's the one I meant.