[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-multimedia
Subject: [PATCH] crashtest
From: Martin Vogt <mvogt () rhrk ! uni-kl ! de>
Date: 2000-08-29 17:04:32
[Download RAW message or body]
Hi,
this patch adds 2 new testcases to mpeglibartsplay.
These testcases show two bugs.
i) it crashes arts/mpeglib-mp3decoder after usually 1500 cycles
ii) artsd has a memory leak.
This patch is not a bug fix, but can help to find bugs.
I like to include it in CVS
Martin
["b.diff" (text/plain)]
? b.diff
Index: decoderBaseObject_impl.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/mpeglib_artsplug/decoderBaseObject_impl.cpp,v
retrieving revision 1.10
diff -r1.10 decoderBaseObject_impl.cpp
28a29
> cout << "outputStream created"<<endl;
Index: mpeglibartsplay.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/mpeglib_artsplug/mpeglibartsplay.cpp,v
retrieving revision 1.4
diff -r1.4 mpeglibartsplay.cpp
49a50,51
> cout << "-4 : create/destroy test (on stack)"<<endl;
> cout << "-5 : create/destroy test (on heap)"<<endl;
101a104
>
116a120,183
> /**
> loop
>
> createPlayObject
> play
> halt
> endloop
> */
>
> void doTest4() {
> int cnt=0;
> PlayObject play3;
>
> while (cnt < 10000) {
> if ((cnt % 2) == 0) {
> play3=server->createPlayObject(filename2);
> } else {
> play3=server->createPlayObject(filename1);
> }
> play3.play();
> usleep(1000);
> Arts::poTime l_t_zero(0,0,0,"samples");
> play3.seek(l_t_zero);
>
> play3.halt();
> // make here a comment and then you get a segfault
> play3 = Arts::PlayObject::null();
> cnt++;
> cout << "test4 cnt:"<<cnt<<endl;
> }
> play3=server->createPlayObject(filename2);
> play3.play();
> sleep(20);
>
> }
>
> void doTest5() {
> int cnt=0;
> PlayObject* play3;
> while (cnt < 10000) {
> play3=new PlayObject();
>
> if ((cnt % 2) == 0) {
> *play3=server->createPlayObject(filename2);
> } else {
> *play3=server->createPlayObject(filename1);
> }
> play3->play();
> usleep(1000);
> Arts::poTime l_t_zero(0,0,0,"samples");
> play3->seek(l_t_zero);
>
> play3->halt();
> // make here a comment and then you get a segfault
> delete play3;
> cnt++;
> cout << "test5 : cnt:"<<cnt<<endl;
> }
> play3=new PlayObject();
> *play3=server->createPlayObject(filename1);
> play3->play();
> delete play3;
> }
>
208,210c275,286
< case 4:
< case 5:
< break;
---
> case 4: {
> doTest4();
> destroyPlayObject();
> destroyServer();
> exit(0);
> }
> case 5:{
> doTest5();
> destroyPlayObject();
> destroyServer();
> exit(0);
> }
_______________________________________________
Kde-multimedia mailing list
Kde-multimedia@master.kde.org
http://master.kde.org/mailman/listinfo/kde-multimedia
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic