Re: segmentation problem causes crash
- From: "Scott Smith" <smiffos@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 10 Dec 2007 13:20:02 +0000 (UTC)
Hi Emmanuel,
Probably seems like a long time since you resolved this,
but I am experiencing the same error and I am wondering if
you can recall what you did to fix it ?
Best regards,
Scott
"Emmanuel Witvoet" <emmanuel.witvoet@xxxxxxxxx> wrote in
message <ef4ffe1.2@xxxxxxxxxxxxxxxxxxxxxxx>...
Thanks, I figured it out eventually, but almost wentcrazy!
probably not a
Philip Borghesani wrote:
Something is corrupting MATLAB's memory, this is
any mex fileWindows
issue. First guess is a bad MEX file but I do not see
notes/1100/1106.html> oruse in a
quick check of your code.
Try starting MATLAB with the debug memory manager see
<http://www.mathworks.com/support/tech-
can post along<http://www.mit.edu/~pwb/cssm/matlab-faq.html>
his may point to the code
causing the problem.
Try isolating the problem to reproducible steps you
inwith a
link to a file data file or mail to support.
Phil
"Emmanuel Witvoet" <emmanuel.witvoet@xxxxxxxxx> wrote
messagein an h264
news:ef4ffe1.-1@xxxxxxxxxxxxxxxxxxxxxxxxxx
Hi all,
I wrote a matlab program which detects NALU headers
itencoded video file. It worked fine, and was building
crashedprogressively. Yesterday, for some unknown reason, it
andone
hasn't worked since. The error seems to be once here,
there..offset ,
I
can't figure it out..
Would someone have a clue?
my program is:
function [head GOP GOPdiff]=fileToMatrix1n (filename,
dec2hex(buf(6),dec2hex(buf(3),BytSymb)
FIDnalu = fopen(filename,'r');
FIDtext=fopen('NALUlog.txt', 'wt');
fprintf(FIDtext,'F NRI UnitType Size \n');
offset=16448;
head=fread(FIDnalu,offset);
%buf=[0,0,0,0,0,0,0,0,0];
buf=[0,0,0,0,0,0,0];
GOP=[];
GOPdiff=[];
fseek(FIDnalu, 0, 'eof');
posfinal=ftell(FIDnalu);
posini=fseek(FIDnalu, offset,'bof');
display(ftell(FIDnalu));
buf(1)=fread(FIDnalu,1);
buf(2)=fread(FIDnalu,1);
buf(3)=fread(FIDnalu,1);
buf(4)=fread(FIDnalu,1);
buf(5)=fread(FIDnalu,1);
buf(6)=fread(FIDnalu,1);
buf(7)=fread(FIDnalu,1);
%buf(8)=fread(FIDnalu,1);
%buf(9)=fread(FIDnalu,1);
[dec2hex(buf(1), 2),'_', dec2hex(buf(2), 2),'_',
2),'_', dec2hex(buf(4), 2), dec2hex(buf(5), 2),
('test_h264_192_aac_24.3gp', 02),
dec2hex(buf(7), 2)]dec2hex(buf(3),
GOP=[ftell(FIDnalu)-2]
previous_video=0
new_off=0;
new_off=ftell(FIDnalu)
before_pos=0;
header=[];
for i=1:(posfinal-7-new_off)
before_pos=ftell(FIDnalu);
[dec2hex(buf(1), 2),'_', dec2hex(buf(2), 2),'_',
2),'_', dec2hex(buf(4), 2), '_',dec2hex(buf(5), 2),header)/power(2,5);
'_',dec2hex(buf(6), 2), '_',dec2hex(buf(7), 2)]
if isequal (buf(1:2), [0,0])
%display('found and byte aligned');
%display(ftell(FIDnalu)-4-offset);
%[dec2hex(buf(1), 2),'_', dec2hex(buf(2), 2),'_',
dec2hex(buf(3), 2),'_', dec2hex(buf(4), 2)]
S=hex2dec(cat(2,dec2hex(buf(3)),dec2hex(buf(4))));
if previous_video==1
curPos=ftell(FIDnalu)-3;
curDiff=curPos-GOP(end);
GOPdiff=cat(2,GOPdiff,curDiff);
GOP= cat(2, GOP,curPos);
end
header = buf(5);
F=bitand(power(2,7),header)/power(2,7);
NRI=bitand(power(2,6) + power(2,5),
UnitType= bitand(31,header);
fprintf(FIDtext,'%g %g %g %g
%s %s\n', F,NRI,UnitType,GOPdiff(end), dec2hex(S),
dec2hex(ftell(FIDnalu)));
%fprintf(FIDtext,'%g %g %g \n',
F,NRI,UnitType);
fseek(FIDnalu, S-4,0);
buf(1)=fread(FIDnalu,1);
buf(2)=fread(FIDnalu,1);
buf(3)=fread(FIDnalu,1);
buf(4)=fread(FIDnalu,1);
buf(5)=fread(FIDnalu,1);
buf(6)=fread(FIDnalu,1);
buf(7)=fread(FIDnalu,1);
previous_video=1;
else previous_video=0;
end
i=i+(ftell(FIDnalu)-before_pos);
buf(1)=[];
buf(7)=fread(FIDnalu,1);
end
fclose(FIDnalu);
fclose(FIDtext);
and the error (not always the same printout) can be :)
[a b GOP GOPdiff]=fileToMatrix1n
,-----------
64)---------------------------------------------------------
??? Invalid function name ''
----------------------------------------------------------------------
--
Assertion detected at Fri Mar 09 16:45:14 2007
3)--
--
Assertion failed: count==0, at line 314 of file
".\memmgr\mem32aligned.cpp".
Configuration:
MATLAB Version: 7.3.0.267 (R2006b)
MATLAB License: 297118
Operating System: Microsoft Windows 2000
Window System: Version 5.0 (Build 2195: Service Pack
GenuineIntelProcessor ID: x86 Family 15 Model 1 Stepping 2,
Inc. JavaVirtual Machine: Java 1.5.0 with Sun Microsystems
HotSpot(TM) Client VM mixed mode
Default Charset: windows-1252
Stack Trace:
[0] bridge.dll:_
.
- Prev by Date: Re: A soft oscilloscope
- Next by Date: simulink, bilateral contract
- Previous by thread: beginner: mcc with callback
- Next by thread: simulink, bilateral contract
- Index(es):
Relevant Pages
|
|