logotype/LeapMotionAS3

Update for AIR 3.9

Closed this issue · 10 comments

When quitting an application (using AIR 3.9), the extension context is disposed twice.

Error: Error #3501: The extension context has already been disposed.

Fixed.

Still have this issue

Hi

Which AIR version?

BR,
Victor

Sent from my iPhone

On 22 Feb, 2014, at 2:49 am, supryin notifications@github.com wrote:

Still have an issue


Reply to this email directly or view it on GitHub.

3.9:

Error: Error #3501: The extension context has already been disposed.
at flash.external::ExtensionContext/_call()
at flash.external::ExtensionContext/call()
at
com.leapmotion.leap.native::LeapNative/handleOnFrame()[/Users/logotype/Documents/Work/Repositories/LeapMotionAS3/src/com/leapmotion/leap/native/LeapNative.as:260]
at
com.leapmotion.leap.native::LeapNative/contextStatusModeEventHandler()[/Users/logotype/Documents/Work/Repositories/LeapMotionAS3/src/com/leapmotion/leap/native/LeapNative.as:165]

thanks!

On Fri, Feb 21, 2014 at 8:05 PM, Victor Norgren notifications@github.comwrote:

Hi

Which AIR version?

BR,
Victor

Sent from my iPhone

On 22 Feb, 2014, at 2:49 am, supryin notifications@github.com wrote:

Still have an issue


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/30#issuecomment-35762123
.

also, may be you have any idea why I am getting this error when trying to use asc 2.0 ane?
I am usingair 4.0 in Flash builder

SyntaxError: Error #1132: Invalid JSON parse input.
at JSON$/parseCore()
at JSON$/parse()
at com.leapmotion.leap.socket::LeapSocket/onSocketDataHandler()[/Users/logotype/Documents/Work/Repositories/LeapMotionAS3/src/com/leapmotion/leap/socket/LeapSocket.as:273]

regarding context dispose, are you sure you are using the latest library? because there is only one single dispose call in the entire codebase (and it's within a try/catch statement) so I can't see how that error could be thrown.

for the invalid JSON parse input error, will check. somehow it received a partial data frame. however, this is very performance critical code so i wouldn't want to add checks.

  1. how often does it happen?
  2. does it happen in the middle of gestures/when pointing, or simply when its idle?
  3. which version of the Leap app are you running?

Thanks!

regarding context dispose, are you sure you are using the latest library?
because there is only one single dispose call in the entire codebase (and
it's within a try/catch statement) so I can't see how that error could be
thrown.

Just to be sure I downloaded the latest build from the websocket brunch...
The error happens almost every time when I am pressing on the standard
windows close button - so at the exit of the app...

The problem is, review team rejected my app cause they get a crash anytime
they are trying to exit my app. Crash report is not very informative and I
am a bit in the dark about this.
Cause this is the only bug I see, I think it might be the reason...
I am on the tight timeline - any help is very appreciated

for the invalid JSON parse input error, will check. somehow it received a
partial data frame. however, this is very performance critical code so i
wouldn't want to add checks.

  1. how often does it happen?
  2. does it happen in the middle of gestures/when pointing, or simply when
    its idle?
  3. which version of the Leap app are you running?

I tried the LeapMotionAS3-ASC2.ane (also latest from the dev brunch) to get
the rid of the issue above , added -inline and -swf-version=22
compiler arguments and it happens every time I am starting the app -
already by the splash screen.
I am running Leap 1.1.3+9188

Thanks a lot!

Thanks!


Reply to this email directly or view it on GitHubhttps://github.com//issues/30#issuecomment-35824723
.

Hey!
I fixed the context dispose issue. It was my fault! Sorry!
onLeapFrame function was called after the context was disposed...

But the JSON thing is still interesting :)

@supryin you could add some debug code around JSON.parse (add a try/catch statement) and print the JSON (either via a debugger or via Scout), so we more easily can figure out the issue. Edit the following file:

https://github.com/logotype/LeapMotionAS3/blob/master/src/com/leapmotion/leap/socket/LeapSocket.as#L267-L268

Then run "./build-both-anes.sh" from the build directory to compile. You can then use the ANE or SWC from the bin directory.

I'll try. Thanks!
Actually , does it make really sense to try to use the
LeapMotionAS3-ASC2.ane instead of LeapMotionAS3.ane?

On Sunday, February 23, 2014, Victor Norgren notifications@github.com
wrote:

@supryin https://github.com/supryin you could add some debug code
around JSON.parse (add a try/catch statement) and print the JSON (either
via a debugger or via Scout), so we more easily can figure out the issue.
Edit the following file:

https://github.com/logotype/LeapMotionAS3/blob/master/src/com/leapmotion/leap/socket/LeapSocket.as#L267-L268

Then run "./build-both-anes.sh" from the build directory to compile. You
can then use the ANE or SWC from the bin directory.


Reply to this email directly or view it on GitHubhttps://github.com//issues/30#issuecomment-35831647
.


http://revertisapp.com

http://day-on-earth.com

Ewgeniy Oganian, Dipl.-Math.
Managing Partner
Preziosastr. 11
81927 München

Tel. +49 160 75 27 363