Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2007
    Posts
    4

    Autoplay crashes when project is on a non writable support (CD or locked USB key)

    Hi,
    My project plays a DIVX movie. It could run on a computer without the adequate codec. I rely on the Video.Load(..) method to give me an error if the divx codec is not installed. If Video.Load(...) gives me an error (usually 1001), I propose a page to the user to install the codec (embedded in my application).
    This works perfectly if I export my project in a folder on my HDD or on a USB key. But Video.Load(....) forces Autoplay runtime to crash violently with a "Unhandled Win32 exception" if my project is burned on a CD or if I lock my USB key for writting !!!!
    I've noticed that when Video.Load(...) starts on a PC without the Divx codec a file called 'adv1.err' is created on the root of the project (with nothing in it). I can imagine that if you do that on a non writable support it could create big troubles and I'm pretty sure it is the cause of the crash. But why would you do that?
    Please tell how to avoid that? Is it a project setting or a bug?
    I'm using Autoplay V6.0.5.0 on Windows XP.
    I'm in the process of evaluating softwares for CD autoplay for my company.

    Here is my code for the OnShow event of my single page (nothing else in my project so far):

    Debug.ShowWindow(true);
    Debug.SetTraceMode(true);
    Dialog.Message("Test", "File exists?");
    if (File.DoesExist("\\Autoplay\\Videos\\myvideo.avi") ) then
    Dialog.Message("Load", "Load myvideo.. ");
    Video.Load("Video1", "\\AutoPlay\\Videos\\myvideo.avi", false, false);
    else
    Video.Load("Video1", "\\AutoPlay\\Videos\\missing.mpg", false, false);
    end
    error_code = Application.GetLastError();
    if (error_code ~= 0) then
    Dialog.Message("Error", "Load Error: "..error_code);
    -- propose here to install codec --
    else
    Video.Play("Video1");
    error_code = Application.GetLastError();
    if (error_code ~= 0) then
    --Dialog.Message("Error", "Play Error: "..error_code);
    end
    end

  2. #2
    Join Date
    May 2006
    Posts
    5,380
    i think, in this case you would be better off checking for the codecs presence on the users system,

    if the missing codec is causing the app to crash violently then you need to beef up your error checking, just use "File.DoesExist" to check for the codecs presence

    EDIT: Also you can slim your code down a bit by using
    Code:
    if (File.DoesExist("\\PATH\\TO\\CODEC") ) then
    	Video.Load("Video1", "\\AutoPlay\\Videos\\myvideo.avi", true, false);
    else
    	-- propose here to install codec --
    end
    Last edited by RizlaUK; 10-10-2007 at 02:42 PM.
    Open your eyes to Narcissism, Don't let her destroy your life!!

  3. #3
    Join Date
    Oct 2007
    Posts
    4
    Thanks but two things.
    First, detecting if a codec is installed on a Windows system is not as obvious as checking if a file is on the system. You need to read the registry and it depends of the Windows version (XP, Vista...). Unless you have a recipe that I'd love to know.
    Second, and most important, why this line of code:
    Video.Load("Video1", "\\AutoPlay\\Videos\\myvideo.avi", true, false);
    works perfectly when running on a HDD and crash Autoplay.exe when run on a CD. If this is not a bug, I'd like to know what's a bug.

  4. #4
    Join Date
    May 2006
    Posts
    5,380
    ok, you can get the CLSID of the codec as you already have it installed on your system and check the users reg for the same CLSID, im not so hot on codec stuff so "hopefuly" someone will jump in here

    i agree that it dosent seem right that it works on hdd but not on cd rom, at first glance i would say its a bug, but theres nearly always a simple solution round the matter....its just finding it

    maybe post it as a bug and see what the IR guys say
    Open your eyes to Narcissism, Don't let her destroy your life!!

  5. #5
    Join Date
    Sep 2006
    Location
    Alberta
    Posts
    99
    I don't think its a bug as much as divx codec is not a default format maybe?

    From the help file:
    The video object is compatible with the following video formats:

    .asf, .asx, .wax, .wmv, .wvx, .wmp, .wmx, .avi, .mpg, .mpeg, .m1v, .mpa, .mpe, .mpv2

  6. #6
    Join Date
    Oct 2007
    Posts
    4
    I'll do it. Thank you.

  7. #7
    Join Date
    Oct 2007
    Posts
    4
    The world of video format is a jungle. To make it short, avi is file format (or file wrapper) not a video format. You can put MPEG4 (divx,xvid...), H264, MPEG2(dvd) video in a avi file. It is just a file structure understood by Windows Media Player. And yes, my movie is a MPEG4 divx encoded wrapped in an avi file format.

Similar Threads

  1. What's new in AMS 5.0?
    By Ted in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 09-22-2003, 03:56 PM
  2. HOWTO: Open a Version 3.0 Project in Version 4.0
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-30-2002, 02:09 PM
  3. HOWTO: Build and Burn Your AutoPlay Application
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-28-2002, 03:43 PM
  4. HOWTO: Create a Project Template
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-28-2002, 01:49 PM
  5. FAQ: AutoPlay Menu Studio 3.0 Frequently Asked Questions
    By Support in forum AutoPlay Menu Studio 3.0
    Replies: 0
    Last Post: 10-10-2002, 01:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts