Forums > Jitter

[bugreport] crash when adding audio track to video file with jit.qt.movie editing commands

February 19, 2008 | 3:29 pm

Hi all,

Description:
I’m experiencing an occasional (but reproducable) crash when I copy or insert a track of a movie from disk into an existing movie with the editing commands. The patch below demonstrates this.

Expected behaviour:
The patch should continue adding A and V together for ever..

Steps to reproduce:
Are in the patch. Example files are here: http://www.smadsteck.nl/Sources.zip (1 MB)

Max 4.6.3, Jitter 1.6.3, Mac OS 10.4.11, Mac Pro Quad 2.66

If someone could confirm I’d be very thankful.

Mattijs

Patch:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 246 187 289 196617 example files: http://www.smadsteck.nl/Sources.zip;
#P newex 110 150 48 196617 loadbang;
#P newex 62 261 44 196617 del 200;
#P comment 79 232 32 196617 done;
#P button 62 236 15 0;
#P button 62 114 15 0;
#P message 110 171 132 196617 "Macintosh HD:/Sources/";
#N vpatcher -683 431 -75 918;
#P origin 0 13;
#P window setfont "Sans Serif" 9.;
#P newex 352 266 77 196617 print addmovie;
#P message 204 203 84 196617 cut track 2 0 80;
#P newex 190 181 106 196617 prepend savemovieas;
#P newex 176 103 36 196617 zl reg;
#P newex 18 114 68 196617 prepend read;
#P newex 18 94 36 196617 zl reg;
#P newex 176 143 50 196617 t dispose;
#P newex 190 162 36 196617 zl reg;
#P newex 379 354 44 196617 zl nth 2;
#P newex 379 373 32 196617 sel 1;
#P newex 336 62 129 196617 sprintf symout %sAV.mov;
#P newex 218 242 69 196617 prepend copy;
#P newex 218 222 117 196617 append track 1 track -1;
#P newex 202 62 122 196617 sprintf symout %sV.mov;
#P newex 71 62 120 196617 sprintf symout %sA.aiff;
#N comlet (bang) add audio;
#P inlet 18 33 15 0;
#N comlet (bang) done;
#P outlet 379 393 15 0;
#P newex 176 123 66 196617 t b b b l l;
#N comlet (path) file folder;
#P inlet 71 33 15 0;
#P newex 372 330 32 196617 sel 1;
#P newex 325 309 57 196617 unpack s 0;
#P newex 325 288 118 196617 route read savemovieas;
#P newex 176 267 159 196617 jit.qt.movie @autostart 0 @vol 0;
#P connect 7 0 17 0;
#P connect 17 0 18 0;
#P connect 8 0 17 1;
#P fasten 4 0 8 0 76 56 76 56;
#P connect 3 0 19 0;
#P connect 19 0 5 0;
#P connect 5 0 16 0;
#P connect 21 0 0 0;
#P connect 20 0 0 0;
#P connect 18 0 0 0;
#P connect 16 0 0 0;
#P fasten 11 0 0 0 223 263 181 263;
#P connect 5 1 15 0;
#P connect 15 0 20 0;
#P fasten 4 0 9 0 76 56 207 56;
#P connect 9 0 19 1;
#P connect 5 2 21 0;
#P connect 12 0 15 1;
#P connect 5 3 10 0;
#P connect 10 0 11 0;
#P connect 0 1 1 0;
#P connect 1 0 2 0;
#P fasten 4 0 12 0 76 56 341 56;
#P connect 0 1 22 0;
#P connect 2 1 3 0;
#P connect 1 1 14 0;
#P connect 14 0 13 0;
#P connect 13 0 6 0;
#P pop;
#P newobj 62 200 58 196617 p addAudio;
#B color 5;
#P window linecount 2;
#P comment 60 41 381 196617 This patch adds an audio file (A.aiff) to a video file (V.mov) and saves the result in the same folder (AV.mov). It works perfectly , except for an occasional crash.;
#P window linecount 1;
#P comment 246 171 289 196617 this path contains an audio file (A.aiff) and a video file (V.mov);
#P comment 81 114 319 196617 1) press to start adding. Within about thirty times , max will crash.;
#P connect 4 0 3 1;
#P connect 9 0 4 0;
#P connect 6 0 8 0;
#P connect 3 0 6 0;
#P connect 5 0 3 0;
#P fasten 8 0 5 0 67 284 30 284 30 105 67 105;
#P window clipboard copycount 11;

Crash report:

First I got the following:

Thread 0 Crashed:
0 com.apple.QuickTime 0x9445aad3 InternalDisposeTrack_priv + 24
1 com.apple.QuickTime 0x9445024f DisposeMovieEditState_priv + 124
2 com.apple.QuickTime 0x944501cd DisposeMovieEditState + 22
3 com.cycling74.JitterAPI 0x262def0a jit_qt_movie_inserttrack + 70
4 com.cycling74.JitterAPI 0x262e1121 jit_qt_movie_insert + 830

But now I get this in the console:

Invalid memory access of location 0000008f eip=9445aad3
Feb 19 16:13:20 SmadS-Xeon-2 /Applications/MaxMSP 4.6/MaxMSP copy.app/Contents/MacOS/MaxMSP: An unexpected Java error has been detected by HotSpot Virtual Machine.
Feb 19 16:13:20 SmadS-Xeon-2 /Applications/MaxMSP 4.6/MaxMSP copy.app/Contents/MacOS/MaxMSP: If this error is reproducible, please report it with the following information:
Feb 19 16:13:20 SmadS-Xeon-2 /Applications/MaxMSP 4.6/MaxMSP copy.app/Contents/MacOS/MaxMSP: 1. Provide the steps to reproduce, a test case, and any relevant information
Feb 19 16:13:20 SmadS-Xeon-2 /Applications/MaxMSP 4.6/MaxMSP copy.app/Contents/MacOS/MaxMSP: 2. The corresponding JavaNativeCrash_pid.crash.log (Java state)
Feb 19 16:13:20 SmadS-Xeon-2 /Applications/MaxMSP 4.6/MaxMSP copy.app/Contents/MacOS/MaxMSP: 3. The corresponding .crash.log (native state; generated by CrashReporter)
Feb 19 16:13:20 SmadS-Xeon-2 /Applications/MaxMSP 4.6/MaxMSP copy.app/Contents/MacOS/MaxMSP: 4. This data:
Feb 19 16:13:20 SmadS-Xeon-2 /Applications/MaxMSP 4.6/MaxMSP copy.app/Contents/MacOS/MaxMSP: Java VM: Java HotSpot(TM) Client VM (1.5.0_13-121 mixed mode)
Feb 19 16:13:20 SmadS-Xeon-2 /Applications/MaxMSP 4.6/MaxMSP copy.app/Contents/MacOS/MaxMSP: Bus Error (0xa) at pc=0x9445aad3
Feb 19 16:13:20 SmadS-Xeon-2 /Applications/MaxMSP 4.6/MaxMSP copy.app/Contents/MacOS/MaxMSP: Process ID: 534, Current Thread: 34562048
Feb 19 16:13:20 SmadS-Xeon-2 /Applications/MaxMSP 4.6/MaxMSP copy.app/Contents/MacOS/MaxMSP: File report at: http://bugreport.apple.com/
Feb 19 16:13:20 SmadS-Xeon-2 /Applications/MaxMSP 4.6/MaxMSP copy.app/Contents/MacOS/MaxMSP: An error report file has been written to:
Feb 19 16:13:20 SmadS-Xeon-2 /Applications/MaxMSP 4.6/MaxMSP copy.app/Contents/MacOS/MaxMSP: /Users/mattijskneppers/Library/Logs/Java/JavaNativeCrash_pid534.crash.log
Feb 19 16:13:21 SmadS-Xeon-2 crashdump[537]: MaxMSP crashed
Feb 19 16:13:22 SmadS-Xeon-2 crashdump[537]: crash report written to: /Users/mattijskneppers/Library/Logs/CrashReporter/MaxMSP.crash.log

And the log starts with:

Thread 0 Crashed:
0 libstdc++.6.dylib 0x90b0d2d9 std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&) + 401
1 com.apple.QuickTime 0x94630cb9 std::_Rb_tree, std::_Select1st >, AudioContextCompareProxy, std::allocator > >::erase(std::_Rb_tree_iterator >, std::_Rb_tree_iterator >) + 61
2 com.apple.QuickTime 0x94630d97 std::_Rb_tree, std::_Select1st >, AudioContextCompareProxy, std::allocator > >::erase(AudioContextProxy* const&) + 103
3 com.apple.QuickTime 0x9445a953 AudioContextManager::UnregisterContext(void*) + 381
4 …ickTimeComponents.component 0x99cf1db5 AudioContextChannel::Release(long*) + 89
5 …ickTimeComponents.component 0x99ced5c2 AudioContextBase::ComponentEntryDispatch(ComponentParameters*, AudioContextBase*) + 134
6 …ple.CoreServices.CarbonCore 0x90cd0734 CallComponentDispatch + 34
7 com.apple.QuickTime 0x943864df AudioContextRelease + 43
8 com.apple.QuickTime 0x943869f0 myDeallocate + 27
9 com.apple.CoreFoundation 0x9080e127 _CFRelease + 253
10 com.apple.QuickTime 0×94386927 QTAudioContextRelease + 43
11 com.apple.QuickTime 0x9438705d PrivateSetMovieAudioContext_priv + 1476
12 com.apple.QuickTime 0x944503db DisposeMovie_priv + 343
13 com.cycling74.JitterAPI 0x262d6a38 jit_qt_movie_dispose + 411
14 com.cycling74.JitterAPI 0x262e8dfd jit_qt_movie_method_typed + 90
15 com.cycling74.JitterAPI 0x262e8e61 jit_qt_movie_proxy_method + 93
16 com.cycling74.JitterAPI 0x262a726f max_jit_usurp_qfn + 192
17 com.cycling74.JitterAPI 0x262aa3d4 max_jit_usurp_method + 156
18 com.cycling74.MaxMSP46 0×00030755 typedmess_fun + 1487 (message.c:631)
19 com.cycling74.MaxMSP46 0x000e8585 outlet_anything + 355 (inletoutlet.c:967)



jln
February 19, 2008 | 3:51 pm


February 19, 2008 | 4:12 pm


February 19, 2008 | 8:00 pm

Just a reminder:
Do not EVER crosspost messages to both the forums and Cycling ’74
support, especially when they were already logged and confirmed several
months ago.

Thanks,
Andrew B.


February 19, 2008 | 9:37 pm

Ah, I thought I’d share this problem with other users first to make sure it was a valid bug before bothering Cycling ’74. I’m still not certain as to the preferred method of bug reporting. I’d say if other users can confirm erroneous behavior or even add some information to the report, that’s only a good thing, no?

But as it seems I personally reported this bug a few months before. Heh, not a smart move, admitted. But I honestly forgot. I’ll be more careful next time.

Mattijs


February 20, 2008 | 11:30 am

Just in case I forget and report this bug again, here is a little reminder for myself: by removing the dispose message and creating a new track instead of reading the first one, the crashes appear much less frequent (only once in 100 times). I hope I’ll search the archives..

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 109 244 231 196617 but if you change the delay to 200 , it gets worse;
#P comment 246 175 289 196617 example files: http://www.smadsteck.nl/Sources.zip;
#P newex 110 137 48 196617 loadbang;
#P newex 62 243 44 196617 del 500;
#P comment 79 225 32 196617 done;
#P button 62 225 15 0;
#P button 62 114 15 0;
#P message 110 157 132 196617 "Macintosh HD:/Sources/";
#N vpatcher 132 384 935 877;
#P origin 0 13;
#P window setfont "Sans Serif" 9.;
#P newex 46 98 53 196617 t b b b b;
#P newex 350 194 36 196617 zl reg;
#P newex 350 232 75 196617 prepend insert;
#P newex 350 213 172 196617 append track 1 0 500 track 1 0 500;
#P newex 166 194 36 196617 zl reg;
#P newex 531 278 18 196617 t l;
#P message 573 256 124 196617 newmovie 360 288 1000;
#P message 545 220 66 196617 trackvol 1 1;
#P newex 531 181 53 196617 t b b b b;
#P message 559 238 193 196617 addtrack sound , tracktimescale 1 44100;
#P message 531 202 76 196617 addtrack video;
#P newex 222 327 77 196617 print addmovie;
#P newex 46 232 106 196617 prepend savemovieas;
#P newex 46 213 36 196617 zl reg;
#P newex 249 377 44 196617 zl nth 2;
#P newex 249 396 41 196617 sel 1 0;
#P newex 143 73 129 196617 sprintf symout %sAV.mov;
#P newex 166 232 75 196617 prepend insert;
#P newex 166 213 172 196617 append track 1 0 500 track 2 0 500;
#P newex 278 73 122 196617 sprintf symout %sV.mov;
#P newex 406 73 120 196617 sprintf symout %sA.aiff;
#N comlet (bang) add audio;
#P inlet 46 44 15 0;
#N comlet (bang) done;
#P outlet 249 416 15 0;
#N comlet (path) file folder;
#P inlet 143 44 15 0;
#P newex 195 349 118 196617 route read savemovieas;
#P newex 46 328 159 196617 jit.qt.movie @autostart 0 @vol 0;
#P connect 4 0 25 0;
#P connect 25 0 12 0;
#P connect 12 0 13 0;
#P connect 20 0 0 0;
#P connect 13 0 0 0;
#P connect 23 0 0 0;
#P connect 8 0 0 0;
#P connect 9 0 12 1;
#P fasten 2 0 9 0 148 67 148 67;
#P connect 25 1 21 0;
#P connect 21 0 7 0;
#P connect 7 0 8 0;
#P connect 6 0 21 1;
#P connect 0 1 1 0;
#P connect 0 1 14 0;
#P connect 1 1 11 0;
#P connect 11 0 10 0;
#P connect 10 0 3 0;
#P connect 10 1 3 0;
#P fasten 2 0 6 0 148 67 283 67;
#P connect 25 2 24 0;
#P connect 24 0 22 0;
#P connect 22 0 23 0;
#P connect 5 0 24 1;
#P fasten 2 0 5 0 148 67 411 67;
#P connect 25 3 17 0;
#P connect 17 0 15 0;
#P connect 19 0 20 0;
#P connect 16 0 20 0;
#P connect 18 0 20 0;
#P connect 15 0 20 0;
#P connect 17 1 18 0;
#P connect 17 2 16 0;
#P connect 17 3 19 0;
#P pop 1;
#P newobj 62 175 58 196617 p addAudio;
#B color 5;
#P window linecount 2;
#P comment 60 41 381 196617 This patch adds an audio file (A.aiff) to a video file (V.mov) and saves the result in the same folder (AV.mov). It works perfectly , except for an occasional crash.;
#P window linecount 1;
#P comment 246 159 289 196617 this path contains an audio file (A.aiff) and a video file (V.mov);
#P comment 81 114 374 196617 1) press to start adding. Now it’s only once in about 100 times that max crashes.;
#P connect 4 0 3 1;
#P connect 9 0 4 0;
#P connect 6 0 8 0;
#P connect 3 0 6 0;
#P connect 5 0 3 0;
#P fasten 8 0 5 0 67 266 30 266 30 105 67 105;
#P window clipboard copycount 12;

Quote: Mattijs wrote on Tue, 19 February 2008 22:37
—————————————————-
> Ah, I thought I’d share this problem with other users first to make sure it was a valid bug before bothering Cycling ’74. I’m still not certain as to the preferred method of bug reporting. I’d say if other users can confirm erroneous behavior or even add some information to the report, that’s only a good thing, no?
>
> But as it seems I personally reported this bug a few months before. Heh, not a smart move, admitted. But I honestly forgot. I’ll be more careful next time.
>
> Mattijs
—————————————————-


Viewing 6 posts - 1 through 6 (of 6 total)