slbreizh
10-10-2007, 03:27 PM
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
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