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

        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!
        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 .

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development