PDA

View Full Version : Could this be a bug?


jonny
14th October 2003, 10:44
AviSynth seems to freeze if i read informations from a file (via vfw) in a win32 app that doesn't create a window (it works with no problem in console apps and true windows apps).
It doesn't happen always, only for some particular sources.
I've included 2 test-app+source+mpeg-source, to replicate the problem: ok.exe works, not_ok.exe freeze (you can notice this with the task manager).

http://jonny.leffe.dnsalias.com/doom9/mpg_test.rar (~3MB)

Really dunno if i'm missing something, i hope someone can solve this puzzle.

Nic
14th October 2003, 10:58
Very strange one...actually freezes when releasing the AVIFile, but only occurs if you ask for AVIFileInfo first, would have to have AVISynth in debug mode to look into it more, and I don't here.

-Nic

jonny
14th October 2003, 11:03
Exactly Nic (i was in hurry and i've not specified this, but i'm obtaining the same thing)

Nic
14th October 2003, 11:10
Hi jonny,

Ok, weirdness all round, seems like a memory corruption or compiler error.

Try adding a __asm emms; after the AVIFileOpen and before AVIFileInfo and it seems to work ?! Also try adding int s = sizeof(AVIFILEINFO) in the same place at that makes it work too ?! seems like anything almost put after AVIFileOpen will help it through.

v.strange,

-Nic

ps
Ok, now taken those lines away and it's working even though it's the original code....confused now :confused:

jonny
14th October 2003, 11:32
Can't check until i go home in the evening, but it's quite strange.
:S

jonny
14th October 2003, 14:26
I'm putting emms or other things but still freeze :(, is your .exe in the same path of test.avs/test.mpg (sorry for the stupid question but it's the only explanation i can found)?

Another strange stuff, with VCSTUDIO, running it with Go doesn't freeze, but debugging with F10 still freeze.

Nic
14th October 2003, 14:56
There's lots of weird oddities (and you are right to ask, I actually have the avs/mpg in d:\ and changed the path accordingly)

I found f10 didn't work, but f11 did!? Im guessing the heap/stack is getting corrupt somewhere, don't udnerstand why using a WinMain would make any difference though.

I'm at work, so can't look into it properly, so I could be way off, but it seems that way.

-Nic

jonny
14th October 2003, 15:34
I dunno if this is directly related to WinMain, i can tell you that Enc freeze exactly in the same istruction, but here things are more complicated since all the C code gets automatically compiled in a dll by a Perl module (and i'm using parts of the Perl lib inside).

This example is the only way i've found in order to replicate the problem in pure C/CPP (perhaps finding what is wrong here could solve my original problem).

Some time ago i've fired up a simple MFC app (iirc i was obtaining the freeze only when stripping out the windows creation/show part).
I'll tell you more when i get home.

jonny
14th October 2003, 20:35
Ok, this time the MFC version:

http://jonny.leffe.dnsalias.com/doom9/mpg_test_2.rar

Commenting ShowWindow/UpdateWindow the freeze happen.
Hope this help!

jonny
19th October 2003, 15:59
Stupid me... :D
With AviSynth 170903 all works!!!
(ony a suggestion, why not putting the latest cvs binary on sourceforge?)