help-gnunet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gnunet] Bug Fix #275 (gnunet-insert-mp3 can not extract keywords)


From: Laurent Aries-Poinssot
Subject: [Help-gnunet] Bug Fix #275 (gnunet-insert-mp3 can not extract keywords)
Date: Sun, 05 May 2002 00:27:28 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011126 Netscape6/6.2.1


But sometimes after I got a "Segmentation fault" on gnunet-gtk client.

I haven't been able to reproduce that yet. You should get a core-dump in that
case. Just run "gdb `which gnunet-gtk` core*" and type in "ba" to get a stack
trace. That should give us an idea where to start looking.
I did not found any core dump, but I am not sure in witch current directory I was.
Are you sure that there is not something special to do to produce the core dump ?
(I am definitively not a unix guru :-(


Usually, a core-dump is a great help if it segfaults. Otherwise, activate
debug statements (debugging.h) and we can eventually see something.

If found the bug which caused gnunet-insert-mp3 not able to find the correct keywords :
The static function "getkeywords" (in insertmp3.c) have a parameter "info" which is called by value and not by reference.
Because this function stores in the array "keywords"  pointers inside "info", we try to keep pointers in the stack of an old function.
The fix is just to declare info as a "mp3info* " instead of "mp3info"  and call this function with the adress of the array "info"
......
/* Passed mp3info, returns up to 4 keywords based on id3tag */
static int getkeywords(mp3info* info, char * keywords[]) {
  int numkeys=0;
  if (strlen(info -> id3.title))
    keywords[numkeys++] = info -> id3.title;
  if (strlen(info -> id3.artist))
    keywords[numkeys++] = info -> id3.artist;
  if (strlen(info -> id3.album))
    keywords[numkeys++] = info -> id3.album;
  if (strlen(info -> id3.year))
    keywords[numkeys++] = info -> id3.year;
  return numkeys;
}

......

  if (0 != get_mp3_info(&info)) {

..........



It is the first time I try to participate in a free software development, and I do not really understand how fixes can be integrated into the current developpment.
In this case I am pretty sure that it is a correct fix. But how can other people be sure ? And, in the future, if I work on something less evident ... ?
Anyway, in this case it would be possible for me to checkin my fix myself without having someone else to spend time to reenter it again in CVS

Also, I am curious who is responsible to verify that the fix is working, and change the status of bug #275 in the Mantis database.

/laurent


reply via email to

[Prev in Thread] Current Thread [Next in Thread]