[bugreport] path reference is not updated by jit.qt.movie

Feb 4, 2008 at 11:17am

[bugreport] path reference is not updated by jit.qt.movie

Hi,

Description:

When I load a movie into jit.qt.movie, delete the movie and read a new movie with the same name from the same location, jit.qt.movie remembers the reference to the previous movie. In other words:
1) load movie.mov into jit.qt.movie,
2) delete movie.mov (move it to trash),
3) create a new movie.mov in the same location
4) load this new movie.mov into jit.qt.movie… it still loads the deleted movie.mov!

Expected behaviour:

When it receives a read message, jit.qt.movie should rebuild the reference to the provided path.

Steps to reproduce are inside this patch:

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 204 129 271 196617 3) read movie1.mov: still shows movie1 , not movie2!;
#P comment 204 113 345 196617 2) move movie1.mov to trash , rename movie2.mov to movie1.mov;
#P newex 31 96 60 196617 loadmess 1;
#P message 109 96 88 196617 read movie1.mov;
#P user jit.pwindow 108 188 82 62 0 1 0 0 1 0;
#P newex 31 116 57 196617 qmetro 40;
#P newex 109 157 97 196617 jit.qt.movie @vol 0;
#P comment 204 97 100 196617 1) read movie1.mov;
#P comment 31 53 446 196617 This example assumes you have two different movies to test with , movie1.mov and movie2.mov;
#P connect 6 0 3 0;
#P connect 3 0 2 0;
#P connect 5 0 2 0;
#P connect 2 0 4 0;
#P window clipboard copycount 9;

Mac OS 10.4.11, Max 4.6.3, Jitter 1.6.3

I would be happy if someone could confirm. And.. does someone know a way around this?

Mattijs

#35645
Feb 4, 2008 at 6:30pm

> I would be happy if someone could confirm. And.. does someone know a way around this?
>
> Mattijs
—————————————————-

yes i confirm, i have the same thing happening on my machine .
using the “dispose” message before reloading the movie seems work.

#121692
Feb 5, 2008 at 9:22am

Quote: (karrrlo) wrote on Mon, 04 February 2008 19:30
—————————————————-

>
> yes i confirm, i have the same thing happening on my machine .
> using the “dispose” message before reloading the movie seems work.

karrrlo!! You’re a hero, dispose works!

I’ve got four words for you. I. love. this. forum. Yeahhhhhhh! :)

Mattijs

#121693
Feb 5, 2008 at 10:16am

Oh and btw, to cycling 74, as far as I am concerned it wouldn’t be a bad idea to automatically dispose the movie before reading a new one..

Mattijs

#121694
Feb 5, 2008 at 10:30am

Quote: Mattijs wrote on Tue, 05 February 2008 10:22
—————————————————-
> Quote: (karrrlo) wrote on Mon, 04 February 2008 19:30
> —————————————————-
>
> >
> > yes i confirm, i have the same thing happening on my machine .
> > using the “dispose” message before reloading the movie seems work.
>
> karrrlo!! You’re a hero, dispose works!

no no Obama is a hero (hint hint) :)
>
> I’ve got four words for you. I. love. this. forum. Yeahhhhhhh!
:)

yes you are right , i am getting married with it , honeymoon in a giant max patch :)

> Oh and btw, to cycling 74, as far as I am concerned it wouldn’t be a bad idea to automatically dispose the movie before reading a new one..

you are right about always using “dispose”, i will adopt it myself

#121695
Feb 5, 2008 at 1:53pm

Quote: (karrrlo) wrote on Tue, 05 February 2008 11:30
—————————————————-
> >
> > I’ve got four words for you. I. love. this. forum. Yeahhhhhhh!
> :)
>
> yes you are right , i am getting married with it , honeymoon in a giant max patch :)

You know about this legendary (ahum) performance?

http://www.youtube.com/watch?v=Nc4MzqBFxZE

Mattijs

#121696
Feb 5, 2008 at 3:27pm

> You know about this legendary (ahum) performance?
>
> http://www.youtube.com/watch?v=Nc4MzqBFxZE
>
> Mattijs
>
—————————————————-

oh yeah
i am glad the uplifting euphoria this forum fills us could be close to that rather then this other legendary (…) video :

#121697
Apr 3, 2008 at 11:54am

What if the read fails? There’s no way to deal with this internally without screwing something up for someone. Dispose early, dispose often.

jb

Quote: Mattijs wrote on Tue, 05 February 2008 11:16
—————————————————-
> Oh and btw, to cycling 74, as far as I am concerned it wouldn’t be a bad idea to automatically dispose the movie before reading a new one..
>
> Mattijs
—————————————————-

#121698
Apr 3, 2008 at 12:13pm

Quote: Jeremy Bernstein wrote on Thu, 03 April 2008 13:54
—————————————————-
> What if the read fails? There’s no way to deal with this internally without screwing something up for someone. Dispose early, dispose often.
>
> jb
>

Yep, my patch is a happy disposer now and everything works fine.

Btw maybe it’s an idea to add this to the help file somehow.

Although.. as far as I know, other applications don’t seem to have this issue. I don’t know how they managed to do that but I can imagine the same thing might be applicable for Max?

Mattijs

#121699
Apr 3, 2008 at 1:51pm

Quote: Mattijs wrote on Thu, 03 April 2008 14:13
—————————————————-
> Quote: Jeremy Bernstein wrote on Thu, 03 April 2008 13:54
> —————————————————-
> > What if the read fails? There’s no way to deal with this internally without screwing something up for someone. Dispose early, dispose often.
>
> Although.. as far as I know, other applications don’t seem to have this issue. I don’t know how they managed to do that but I can imagine the same thing might be applicable for Max?
—————————————————-

Hard to tell. Most apps open a new window when you read a document. In our case, we replace the open file if and only if the read is successful. We can only tell that the read is successful by reading, before we close the open file. This may be an issue with Max’s path cache, but for the time being, there’s kind of nothing to be/that will be done about it.

jb

#121700

You must be logged in to reply to this topic.