Apache Cordova
  1. Apache Cordova
  2. CB-336

Mediafile.getFormatData hits error call back

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0, 1.6.1
    • Fix Version/s: 1.7.0
    • Component/s: WP7 (defunct)
    • Labels:
      None
    • Environment:

      Windows Phone

      Description

      This method is expected to return MediaFileData object on successful call back. But currently this method goes into the error call back and the method fails.

        Activity

        Babu Muralidharan created issue -
        Jesse MacFadyen made changes -
        Field Original Value New Value
        Assignee Jesse MacFadyen [ purplecabbage ] Sergey Grebnov [ sgrebnov ]
        Jesse MacFadyen made changes -
        Fix Version/s 1.7.0 [ 12319549 ]
        Fix Version/s 1.6.0 [ 12319548 ]
        Filip Maj made changes -
        Assignee Sergey Grebnov [ sgrebnov ] Filip Maj [ filmaj ]
        Hide
        Filip Maj added a comment -

        Verified that this issue exists on 1.6.1 on a Samsung Focus.

        The error callback is called every time with an InvalidCastException.

        Investigating!

        Show
        Filip Maj added a comment - Verified that this issue exists on 1.6.1 on a Samsung Focus. The error callback is called every time with an InvalidCastException. Investigating!
        Filip Maj made changes -
        Affects Version/s 1.6.1 [ 12320757 ]
        Hide
        Filip Maj added a comment -

        Looks like when the MediaFormatOptions get deserialized from a JSON string inside Capture.cs' getFormatData method, something goes wrong and we get an InvalidCastException.

        Show
        Filip Maj added a comment - Looks like when the MediaFormatOptions get deserialized from a JSON string inside Capture.cs' getFormatData method, something goes wrong and we get an InvalidCastException .
        Hide
        Filip Maj added a comment -

        I've narrowed this down (at least when using the Capture API to capture images) to an exception being thrown when trying to OpenFile the image inside the ExtractImageFromLocalStorage method (which gets called from getMetaData). The exception being thrown is "Invalid cross-thread access".

        Yay threading issues!

        Show
        Filip Maj added a comment - I've narrowed this down (at least when using the Capture API to capture images) to an exception being thrown when trying to OpenFile the image inside the ExtractImageFromLocalStorage method (which gets called from getMetaData ). The exception being thrown is "Invalid cross-thread access". Yay threading issues!
        Hide
        Filip Maj added a comment -

        Fixed in 51d15c.

        Show
        Filip Maj added a comment - Fixed in 51d15c .
        Filip Maj made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Jesse MacFadyen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Filip Maj
            Reporter:
            Babu Muralidharan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development