Skip to main content
Known Participant
August 11, 2011
Question

Adobe Air Crash when try to load video

  • August 11, 2011
  • 2 replies
  • 1714 views

Hi,

Recently, I am trying to do an very simple application using Adobe Air that plays video when certain key pressed on keyboard. However, the adobe air crash frequently when it try to load the video. The problem seems to be Adobe Air/ Flash player bug, because when I tried to do the debug, the debug launcher crash. I have tried with both f4v and mp4 format, but the situation is still the same.

I am using up to date Flash builder 4.5 and Adobe Air 2.7.1. Tested on both WinXP and Win7 Home Premium 32bit. Hopes to get your respond as soon as possible. If the problem cannot be solved soon, maybe I have to search for alternative solution to do the project. Thanks.

Here is my working code:

Display Window:

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                            xmlns:s="library://ns.adobe.com/flex/spark"
                            xmlns:mx="library://ns.adobe.com/flex/mx" width="640" height="360" showStatusBar="false" applicationComplete="initConn()">
     <fx:Script>
          <![CDATA[
               import flash.utils.setTimeout;
               
               import mx.events.FlexEvent;
               private var SWFconn:LocalConnection;
               private var delay:Number = 300;
               private var intervalId:uint;
               protected var nWin:videoscreen = new videoscreen();
               private var playing:Number = 0;
               
               protected function initConn():void{
                    stage.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown);
                    SWFconn = new LocalConnection();
                    
                    nWin.width = 500;
                    nWin.height = 400;
                    nWin.open();
               }
               public function handleKeyDown(event:KeyboardEvent) :void
               {
                    
                    if(event.keyCode==13){
                         stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
                         nWin.fullscreen();
                    }else if(event.keyCode==27){
                         stage.displayState = StageDisplayState.NORMAL;
                         nWin.normalscreen();
                    }else{
                         if((playing==0)&&(((event.keyCode>=48)&&(event.keyCode<=57))||((event.keyCode>=65)&&(event.keyCode<=67)))){
                              playing=1;
                              SWFconn.send("swfConnection", "reset");
                              clearTimeout(intervalId);
                              
                              SWFconn.send("swfConnection", "select", String.fromCharCode(event.charCode));
                              intervalId = setTimeout(sendLock,delay, String.fromCharCode(event.charCode));
                         }
                    }
                    
                    
               }
               
               private function sendLock(msg:String):void{
                    SWFconn.send("swfConnection", "lock", msg);
                    playing=1;
                    nWin.player.source = msg+".f4v";
                    nWin.player.play();
               }
               
               private function reset():void{
                    SWFconn.send("swfConnection", "reset");
               }
               
               public function playFinished():void{
                    reset();
                    playing =0;
               }
          ]]>
     </fx:Script>
     <fx:Declarations>
          <!-- Place non-visual elements (e.g., services, value objects) here -->
     </fx:Declarations>
     <mx:SWFLoader left="0" right="0" top="0" bottom="0" source="content.swf"/>
</s:WindowedApplication>

Video Window:

<?xml version="1.0" encoding="utf-8"?>
<s:Window xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300" showStatusBar="false">
     <fx:Script>
          <![CDATA[
               import mx.core.FlexGlobals;
               
               import org.osmf.events.TimeEvent;
               
               protected function CallBack(event:TimeEvent):void
               {
                    // TODO Auto-generated method stub
                    player.source="";
                    FlexGlobals.topLevelApplication.playFinished();
               }
               public function fullscreen():void
               {
                    stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
               }
               
               public function normalscreen():void
               {
                    stage.displayState = StageDisplayState.NORMAL;
               }
               
          ]]>
     </fx:Script>
     <fx:Declarations>
          <!-- Place non-visual elements (e.g., services, value objects) here -->
     </fx:Declarations>
     <s:VideoDisplay id="player" left="0" right="0" top="0" bottom="0" complete="CallBack(event)"/>
</s:Window>

This topic has been closed for replies.

2 replies

August 25, 2011

We're experiencing the same problem, Win 7 64 bit, using F4V video (4mbps 1920x1080).  We're using the OSMF video api.

On AIR 2.7.1 (also happens on 3.0 beta - although more stable) when calling videos in a coverflow type interface the AIR app will eventually freeze and crash.

This is happening on a Gateway SX machine with 4GB RAM, both with built-in HDMI card and ATI Sapphire 5450 1GB video card (hdmi).

Any resolution to this issue yet?

chris.campbell
Legend
August 25, 2011

Hi Shawn,

Would you mind entering a new bug on this over at bugbase.adobe.com?  Please include any application, code or media that would help us reproduce the issue.  If you'd like to keep this private, please feel free to email me any attachments and the bug's URL and I'll attach them for internal use only.

Thanks,

Chris

Participant
September 22, 2011

I've encountered the same problem when attempting to play a video from YouTube in a chromeless player. Everything works fine with an earlier version of Adobe AIR 3 runtime, v 3.0.0.3440 but with the RC1 v3.0.0.3880 it keeps crashing.

Yue_HongAuthor
Known Participant
August 11, 2011

Here is the error signature from winXP:

AppName: touchapi.exe     AppVer: 0.0.0.0     ModName: adobe air.dll
ModVer: 2.7.1.19610     Offset: 00076535

chris.campbell
Legend
August 11, 2011

Hi,

Could you send me your working project (with the content.swf)?  You can email me at ccampbel@adobe.com.  I'll take a look asap.

Thanks,

Chris

Yue_HongAuthor
Known Participant
August 14, 2011

Dear Chris,

Thank you for your attention here and I have sent you the working file. Hope you can update me on your testing result. Thanks.