SDP-RTP readNextPacket(packet) CRASH

214 views
Skip to first unread message

marceljaner

unread,
Apr 20, 2009, 3:43:12 PM4/20/09
to xuggler-users
Dear All,

I porting my code to Xuggle 2.0, and I've got crashing when I read
next packet.

I open like this:

IContainerFormat contInpFormat = IContainerFormat.make();
contInpFormat.setInputFormat("sdp");
icontainer.open(filename, IContainer.Type.READ, contInpFormat,
true, false) ;

Otherwise, if do "container.open(filename, IContainer.Type.READ,
null)" it crash at this point.

The "filename" is a SDP (rtp h264) well done, with UNIX line endings.

And when It disposes to readNextPacket it crash.

Does anybody get this behavior? Any idea to solve it?

thanks, Marcel.

Art Clarke

unread,
Apr 20, 2009, 3:48:18 PM4/20/09
to xuggle...@googlegroups.com
Can you post the crash log/output and the sdp file?

- Art
--
http://www.xuggle.com/
xu‧ggle (zŭ' gl) v. To freely encode, decode, and experience audio and video.

Use Xuggle to get the power of FFMPEG in Java.

marceljaner

unread,
Apr 20, 2009, 3:52:57 PM4/20/09
to xuggler-users

SDP file (ffmpeg's xuggle generated):

v=0
o=- 0 0 IN IP4 127.0.0.1
t=0 0
s=No Name
a=tool:libavformat 52.32.0
c=IN IP4 127.0.0.1
m=video 50004 RTP/AVP 96
b=AS:256
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1

crash log:
#
# An unexpected error has been detected by Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6494d430,
pid=19640, tid=14888
#
# Java VM: Java HotSpot(TM) Client VM (11.0-b15 mixed mode, sharing
windows-x86)
# Problematic frame:
# C [avformat-52.dll+0xd430]
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

--------------- T H R E A D ---------------

Current thread (0x00317800): JavaThread "main" [_thread_in_native,
id=14888, stack(0x00860000,0x008b0000)]

siginfo: ExceptionCode=0xc0000005, reading address 0x00000000

...

Stack: [0x00860000,0x008b0000], sp=0x008aad4c, free space=299k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code,
C=native code)
C [avformat-52.dll+0xd430]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j com.xuggle.xuggler.XugglerJNI.IContainer_readNextPacket(JLcom/
xuggle/xuggler/IContainer;JLcom/xuggle/xuggler/IPacket;)I+0
j com.xuggle.xuggler.IContainer.readNextPacket(Lcom/xuggle/xuggler/
IPacket;)I+10
j javaxuggledemo.DecodeAndPlayVideo2.main([Ljava/lang/String;)V+334
v ~StubRoutines::call_stub

...

Heap
def new generation total 960K, used 533K [0x229d0000, 0x22ad0000,
0x22eb0000)
eden space 896K, 52% used [0x229d0000, 0x22a455d8, 0x22ab0000)
from space 64K, 100% used [0x22ac0000, 0x22ad0000, 0x22ad0000)
to space 64K, 0% used [0x22ab0000, 0x22ab0000, 0x22ac0000)
tenured generation total 4096K, used 299K [0x22eb0000, 0x232b0000,
0x269d0000)
the space 4096K, 7% used [0x22eb0000, 0x22efac98, 0x22efae00,
0x232b0000)
compacting perm gen total 12288K, used 757K [0x269d0000, 0x275d0000,
0x2a9d0000)
the space 12288K, 6% used [0x269d0000, 0x26a8d708, 0x26a8d800,
0x275d0000)
ro space 8192K, 67% used [0x2a9d0000, 0x2af32f00, 0x2af33000,
0x2b1d0000)
rw space 12288K, 53% used [0x2b1d0000, 0x2b840180, 0x2b840200,
0x2bdd0000)

Dynamic libraries:
0x00400000 - 0x00424000 C:\Archivos de programa\Java\jdk1.6.0_10\bin
\java.exe
0x7c910000 - 0x7c9c8000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c903000 C:\WINDOWS\system32\kernel32.dll
0x77da0000 - 0x77e4c000 C:\WINDOWS\system32\ADVAPI32.dll
0x77e50000 - 0x77ee2000 C:\WINDOWS\system32\RPCRT4.dll
0x77fc0000 - 0x77fd1000 C:\WINDOWS\system32\Secur32.dll
0x7c340000 - 0x7c396000 C:\Archivos de programa\Java\jdk1.6.0_10\jre
\bin\msvcr71.dll
0x6d8b0000 - 0x6db06000 C:\Archivos de programa\Java\jdk1.6.0_10\jre
\bin\client\jvm.dll
0x7e390000 - 0x7e421000 C:\WINDOWS\system32\USER32.dll
0x77ef0000 - 0x77f39000 C:\WINDOWS\system32\GDI32.dll
0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll
0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.DLL
0x00980000 - 0x0098a000 C:\WINDOWS\system32\myokent.dll
0x6bc00000 - 0x6bc09000 C:\WINDOWS\system32\mapledxp.dll
0x6d330000 - 0x6d338000 C:\Archivos de programa\Java\jdk1.6.0_10\jre
\bin\hpi.dll
0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL
0x6d860000 - 0x6d86c000 C:\Archivos de programa\Java\jdk1.6.0_10\jre
\bin\verify.dll
0x6d3d0000 - 0x6d3ef000 C:\Archivos de programa\Java\jdk1.6.0_10\jre
\bin\java.dll
0x6d8a0000 - 0x6d8af000 C:\Archivos de programa\Java\jdk1.6.0_10\jre
\bin\zip.dll
0x69cc0000 - 0x6a0c1000 C:\Archivos de programa\Xuggle\bin\libxuggle-
xuggler-2.dll
0x63880000 - 0x63ac1000 C:\Archivos de programa\Xuggle\bin\libxuggle-
ferry-2.dll
0x77be0000 - 0x77c38000 C:\WINDOWS\system32\msvcrt.dll
0x6ad40000 - 0x6ba4a000 C:\Archivos de programa\Xuggle\bin
\avcodec-52.dll
0x03030000 - 0x03063000 C:\Archivos de programa\Xuggle\bin
\avutil-50.dll
0x6eb80000 - 0x6ecbf000 C:\Archivos de programa\Xuggle\bin
\libmp3lame-0.dll
0x69580000 - 0x695bd000 C:\Archivos de programa\Xuggle\bin
\libspeex-1.dll
0x6f780000 - 0x6f819000 C:\Archivos de programa\Xuggle\bin
\libx264-66.dll
0x03070000 - 0x030e7000 C:\Archivos de programa\Xuggle\bin
\avdevice-52.dll
0x64940000 - 0x64bfe000 C:\Archivos de programa\Xuggle\bin
\avformat-52.dll
0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.DLL
0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll
0x73b00000 - 0x73b13000 C:\WINDOWS\system32\AVICAP32.DLL
0x77bd0000 - 0x77bd8000 C:\WINDOWS\system32\VERSION.dll
0x75ed0000 - 0x75ef1000 C:\WINDOWS\system32\MSVFW32.dll
0x7e6a0000 - 0x7eec1000 C:\WINDOWS\system32\SHELL32.dll
0x77f40000 - 0x77fb6000 C:\WINDOWS\system32\SHLWAPI.dll
0x773a0000 - 0x774a3000 C:\WINDOWS\WinSxS
\x86_Microsoft.Windows.Common-
Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\COMCTL32.dll
0x6d780000 - 0x6d822000 C:\Archivos de programa\Xuggle\bin
\swscale-0.dll
0x719d0000 - 0x71a10000 C:\WINDOWS\system32\mswsock.dll
0x66740000 - 0x66799000 C:\WINDOWS\system32\hnetcfg.dll
0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll
0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll
0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll
0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll
0x16080000 - 0x160a5000 C:\Archivos de programa\Bonjour\mdnsNSP.dll
0x76d20000 - 0x76d39000 C:\WINDOWS\system32\Iphlpapi.dll
0x6d0b0000 - 0x6d1e8000 C:\Archivos de programa\Java\jdk1.6.0_10\jre
\bin\awt.dll
0x72f80000 - 0x72fa6000 C:\WINDOWS\system32\WINSPOOL.DRV
0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll
0x5b150000 - 0x5b188000 C:\WINDOWS\system32\uxtheme.dll
0x6d2d0000 - 0x6d324000 C:\Archivos de programa\Java\jdk1.6.0_10\jre
\bin\fontmanager.dll
0x746b0000 - 0x746fc000 C:\WINDOWS\system32\MSCTF.dll
0x10000000 - 0x1017a000 C:\WINDOWS\system32\nview.dll
0x770f0000 - 0x7717b000 C:\WINDOWS\system32\OLEAUT32.dll
0x77660000 - 0x77681000 C:\WINDOWS\system32\NTMARTA.DLL
0x71b90000 - 0x71ba3000 C:\WINDOWS\system32\SAMLIB.dll
0x03540000 - 0x03592000 C:\WINDOWS\system32\NVWRSES.DLL
0x75160000 - 0x7518e000 C:\WINDOWS\system32\msctfime.ime
0x4fd10000 - 0x4feb6000 C:\WINDOWS\system32\d3d9.dll
0x6dea0000 - 0x6dea6000 C:\WINDOWS\system32\d3d8thk.dll
0x03640000 - 0x03655000 C:\WINDOWS\system32\nvwddi.dll


On Apr 20, 9:48 pm, Art Clarke <acla...@xuggle.com> wrote:
> Can you post the crash log/output and the sdp file?
>
> - Art
>
>
>
> On Mon, Apr 20, 2009 at 12:43 PM, marceljaner <marceljanerf...@gmail.com> wrote:
>
> > Dear All,
>
> > I porting my code to Xuggle 2.0, and I've got crashing when I read
> > next packet.
>
> > I open like this:
>
> >   IContainerFormat contInpFormat = IContainerFormat.make();
> >   contInpFormat.setInputFormat("sdp");
> >   icontainer.open(filename, IContainer.Type.READ, contInpFormat,
> > true, false) ;
>
> > Otherwise, if do "container.open(filename, IContainer.Type.READ,
> > null)" it crash at this point.
>
> > The "filename" is a SDP (rtp h264) well done, with UNIX line endings.
>
> > And when It disposes to readNextPacket it crash.
>
> > Does anybody get this behavior? Any idea to solve it?
>
> > thanks, Marcel.
>
> --http://www.xuggle.com/

Art Clarke

unread,
Apr 20, 2009, 4:17:15 PM4/20/09
to xuggle...@googlegroups.com
can you attach the sdp file instead of putting it inline; I'd like to
make sure I see the EXACT line endings you have.
--

marceljaner

unread,
Apr 21, 2009, 3:25:54 AM4/21/09
to xuggler-users

SDP + src + crash log file:
http://www.2shared.com/file/5433867/7179e435/javaxuggledemo.html

sender:
ffmpeg -re -i C:\java\videos\antig.mpg -an -v codec libx264 -b 256k -f
rtp rtp://127.0.0.1:50004

thanks.


On Apr 20, 10:17 pm, Art Clarke <acla...@xuggle.com> wrote:
> can you attach thesdpfile instead of putting it inline; I'd like to
> make sure I see the EXACT line endings you have.
>
>
>
> On Mon, Apr 20, 2009 at 12:52 PM, marceljaner <marceljanerf...@gmail.com> wrote:
>
> >SDPfile (ffmpeg's xuggle generated):
>
> > v=0
> > o=- 0 0 IN IP4 127.0.0.1
> > t=0 0
> > s=No Name
> > a=tool:libavformat 52.32.0
> > c=IN IP4 127.0.0.1
> > m=video 50004RTP/AVP 96
> >> > The "filename" is aSDP(rtph264) well done, with UNIX line endings.

Art Clarke

unread,
Apr 21, 2009, 12:17:27 PM4/21/09
to xuggle...@googlegroups.com
hanks Marcel, I'm able to reproduce the problem with those files on
our machines. No ETA yet on a fix or workaround, but we give priority
to bugs like this that crash the Java virtual machine.

- Art
--

Art Clarke

unread,
Apr 21, 2009, 12:58:51 PM4/21/09
to xuggle...@googlegroups.com
And not much of a consolation, but this is an ffmpeg problem parsing
your SDP file. To reproduce in pure FFMPEG (without Xuggler getting
in the way) set up a ffmpeg session to read your SDP file as so:

ffmpeg -i your-sdp-file.sdp -acodec libmp3lame out.flv

This will core-dump for you as well.

I can't work around this problem given where it's occuring in FFMPEG,
so you may also want to follow up with the ffmpeg-users list to see if
someone there knows what's wrong with your SDP file (and if they do,
report back here so I can figure out if Xuggler can work around it).

Sorry,

- Art

marceljaner

unread,
Apr 21, 2009, 1:42:44 PM4/21/09
to xuggler-users
yes it is a ffmpeg problem regarding sdp/rtp. But now I discovered
that I can use a IStreamCoder without IContainer, so I will try to
work directly with IStreamCoders and UDP Datagram to set a video
channel between two different processes. I don't like ffmpeg/rtp/sdp
management and red5 neither. So lets see If I'll get success sending
codified frames trough UDP.

thanks.


On Apr 21, 6:58 pm, Art Clarke <acla...@xuggle.com> wrote:
> And not much of a consolation, but this is an ffmpeg problem parsing
> your SDP file.  To reproduce in pure FFMPEG (without Xuggler getting
> in the way) set up a ffmpeg session to read your SDP file as so:
>
> ffmpeg -i your-sdp-file.sdp -acodec libmp3lame out.flv
>
> This will core-dump for you as well.
>
> I can't work around this problem given where it's occuring in FFMPEG,
> so you may also want to follow up with the ffmpeg-users list to see if
> someone there knows what's wrong with your SDP file (and if they do,
> report back here so I can figure out if Xuggler can work around it).
>
> Sorry,
>
> - Art
>
> On Tue, Apr 21, 2009 at 9:17 AM, Art Clarke <acla...@xuggle.com> wrote:
> > hanks Marcel, I'm able to reproduce the problem with those files on
> > our machines.  No ETA yet on a fix or workaround, but we give priority
> > to bugs like this that crash the Java virtual machine.
>
> > - Art
>
> ...
>
> read more »

Art Clarke

unread,
Apr 21, 2009, 1:49:30 PM4/21/09
to xuggle...@googlegroups.com
It still would be good to send the failure example to the ffmpeg-users
list so that ffmpeg can improve, but good luck with your other
approach.

- Art

marceljaner

unread,
Apr 21, 2009, 2:05:32 PM4/21/09
to xuggler-users
It is already sended.
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages