Skip to main content
Participant
July 3, 2012
Question

Error #3502: The extension returned an invalid value.

  • July 3, 2012
  • 1 reply
  • 1022 views

Hi,

I'm creating an iOS app with my own Native Extension. Everything was working fine with the AIR 3.1 SDK. Today I tried to update to the 3.3 SDK and I *sometimes* have this following error coming from the extension :

Exception fault: Error: Error #3502: The extension returned an invalid value.

          at flash.external::ExtensionContext/_call()

          at flash.external::ExtensionContext/call()

It doesn't happen everytime in the same session, the function is sometimes working perfectly well, so I don't know what could be the problem...

I didn't change anything in the code of the extension. I tried to repackage the ANE file with the new SDK and I still have this error.

Thank you for your help!

This topic has been closed for replies.

1 reply

July 3, 2012

This error comes up when an invalid FREObject is returned from your native function. Can you please check, if something is being returned from your native function every time, and that it is of the correct datatype.

There could be an issue with pointers, where for some inputs, you are returning junk values. You can debug using NSLogs.

Also, using the FRE return codes is a good coding practice for determining valid outputs. eg. you could check if the object was converted to FREobject successfully. (FRE_OK was returned when converting the returned object from a C datatype to FREObject datatype)

Also, make sure that the FREObject returned to the AS part of your extension is of the correct datatype. eg. it should not be typecasting an array into an int, etc.

Hope this helps,

Neha