(solaris) hang in theme.ui playlist editor

1999-10-11 Thread Tom Spindler

This is after opening a playlist. It whirs quite a bit, and then hangs
here in this gigantic backtrace:

Thread 4 (LWP4):
#0  0xff1179b0 in ___lwp_mutex_lock () from /usr/lib/libc.so.1
#1  0xff03c674 in _mutex_lwp_lock () from /usr/lib/libthread.so.1
#2  0xff03c370 in _cmutex_lock () from /usr/lib/libthread.so.1
#3  0xfe3befb4 in gdk_threads_enter () at gdk.c:1415
#4  0xfe5c2544 in MusicBrowserUI::LoadPlaylist (this=0x16ca38,
path=0x16cb90 "/usr/local/src/fa15/biteme.m3u")
at ui/musicbrowser/unix/musicbrowser.cpp:312
#5  0xfe5bfeac in open_list () at ui/musicbrowser/unix/gtkmusicbrowser.cpp:765
#6  0xfe4b4f28 in gtk_item_factory_callback_marshal (widget=0x0,
func_data=0x191d00) at gtkitemfactory.c:258
#7  0xfe4cb200 in gtk_marshal_NONE__NONE (object=0x18fce8,
func=0xfe4b4f00 gtk_item_factory_callback_marshal, func_data=0x191d00,
args=0xfde7ee20) at gtkmarshal.c:312
#8  0xfe50cb30 in gtk_handlers_run (handlers=0x183b10, signal=0xfde7ed68,
object=0x18fce8, params=0xfde7ee20, after=0) at gtksignal.c:1909
#9  0xfe50ba0c in gtk_signal_real_emit (object=0x18fce8, signal_id=71,
params=0xfde7ee20) at gtksignal.c:1469
#10 0xfe508aac in gtk_signal_emit (object=0x18fce8, signal_id=71)
at gtksignal.c:552
#11 0xfe553630 in gtk_widget_activate (widget=0x1) at gtkwidget.c:2869
#12 0xfe4d61c8 in gtk_menu_shell_activate_item (menu_shell=0x191970,
menu_item=0x18fce8, force_deactivate=1) at gtkmenushell.c:839
#13 0xfe4d4cc8 in gtk_menu_shell_button_release (widget=0x191970,
event=0x184a78) at gtkmenushell.c:485
#14 0xfe4caf90 in gtk_marshal_BOOL__POINTER (object=0x191970,
func=0xfe4d4a30 gtk_menu_shell_button_release, func_data=0x0,
args=0xfde7f460) at gtkmarshal.c:28
#15 0xfe50ba54 in gtk_signal_real_emit (object=0x191970, signal_id=21,
params=0xfde7f460) at gtksignal.c:1484
#16 0xfe508aac in gtk_signal_emit (object=0x191970, signal_id=21)
at gtksignal.c:552
#17 0xfe553390 in gtk_widget_event (widget=0x191970, event=0x184a78)
at gtkwidget.c:2843
#18 0xfe4caf1c in gtk_propagate_event (widget=0x191970, event=0x184a78)
at gtkmain.c:1313
#19 0xfe4c9d54 in gtk_main_do_event (event=0x184a78) at gtkmain.c:770
#20 0xfe3ccd7c in gdk_event_dispatch (source_data=0x184a78,
current_time=0xfde7fa30, user_data=0x0) at gdkevents.c:2129
#21 0xfe326fe8 in g_main_dispatch (current_time=0xfde7fa30) at gmain.c:656
#22 0xfe327800 in g_main_iterate (block=-30096544, dispatch=1) at gmain.c:874
#23 0xfe327a10 in g_main_run (loop=0x174b78) at gmain.c:932
#24 0xfe4c9444 in gtk_main () at gtkmain.c:476
#25 0xfe5c1804 in MusicBrowserUI::GTKEventService (this=0x16ca38)
at ui/musicbrowser/unix/musicbrowser.cpp:99
#26 0xfe5c16c4 in MusicBrowserUI::gtkServiceFunction (p=0x16ca38)
at ui/musicbrowser/unix/musicbrowser.cpp:75
#27 0x48e94 in solarisThread::InternalThreadFunction (this=0x0)
at base/unix/solaris/src/solaristhread.cpp:78
#28 0x48e6c in solarisThread::internalThreadFunction (arg=0x9bdf0)
at base/unix/solaris/src/solaristhread.cpp:64

Thread 1 (LWP1):
#0  0xff117a74 in _lwp_sema_wait () from /usr/lib/libc.so.1
#1  0xff03b04c in _park () from /usr/lib/libthread.so.1
#2  0xff03ad40 in _swtch () from /usr/lib/libthread.so.1
#3  0xff039654 in cond_timedwait () from /usr/lib/libthread.so.1
#4  0xff049838 in sleep () from /usr/lib/libthread.so.1
#5  0xfe251554 in GTKWindow::Run (this=0x17c220, oPos=@0x400)
at ui/theme/unix/src/GTKWindow.cpp:156
#6  0xfe224e1c in Theme::Run (this=0x17c17c, oWindowPos=@0x17c200)
at ui/theme/src/Theme.cpp:339
#7  0xfe2438c8 in FreeAmpTheme::WorkerThread (this=0x17c178)
at ui/theme/src/FreeAmpTheme.cpp:106
#8  0xfe2439ac in WorkerThreadStart (arg=0x17c178)
at ui/theme/src/FreeAmpTheme.cpp:119
#9  0x48e94 in solarisThread::InternalThreadFunction (this=0x0)
at base/unix/solaris/src/solaristhread.cpp:78
#10 0x48e6c in solarisThread::internalThreadFunction (arg=0x17e6d0)
at base/unix/solaris/src/solaristhread.cpp:64
#0  0xff117a74 in _lwp_sema_wait () from /usr/lib/libc.so.1

(the last line is wacky because I attached with gdb after the fact.
At least, I hope that's the reason.)



GetPrefString(kSaveMusicDirPref...) fails.

1999-10-08 Thread Tom Spindler

Specifically, at line 149:
   m_context-prefs-GetPrefString(kSaveMusicDirPref, tempDir, length);

It goes into happy hash land and fails miserably, and returns null;
then, because it's null it fails on the MKDIR, the metadatabase
stuff goes in the toilet, and then the lovely error 

base/src/database.cpp:47: failed assertion `m_dbase'

pops up.

(This is sol 2.7, gcc 2.95.1.)



sigh.

1999-10-08 Thread Tom Spindler

Well, it looks like there are some rather nasty lurking bugs in
gcc-2.95.1; bugs that popped up when things were compiled with -O2 went
away when compiled with -O; I'm beginning to suspect that the alias
analysis code is a bit stricter than a lot of programmers out there.

Anyway, I was getting crashes in code Theme.cpp in ParseColor, when
I inserted the extra lines (@845)

char *foo = oColorstring.c_str();
printf("colors: %s; ocolor: %lx", foo, oColor);

And then the crashing stopped; unfortunately, the printf never showed
itself, and the crash has occured deeper in the code in GTK/glib land:

(gdb) bt
#0  0xff2fdd74 in XGetWindowAttributes () from /usr/openwin/lib/libX11.so.4
#1  0xfe3dcae8 in gdk_window_foreign_new (anid=0) at gdkwindow.c:508
#2  0xfe2ce478 in GTKBitmap::GTKBitmap (this=0x171198, oName=@0x99a9c)
at ui/theme/unix/src/GTKBitmap.cpp:59
#3  0xfe2a2294 in Theme::BeginElement (this=0x16d2c4, oElement=@0xffbe34f0, 
oAttrMap=@0xffbe33f0) at ui/theme/src/Theme.cpp:296
#4  0x4ff94 in Parse::DoParse (this=0x16d2c4) at lib/xml/src/Parse.cpp:225
#5  0x4efcc in Parse::ParseFile (this=0x16d2c4, oFile=@0xffbe38d0)
at lib/xml/src/Parse.cpp:61
#6  0xfe2a0748 in Theme::LoadTheme (this=0x16d2c4, oFile=@0xffbe3b08)
at ui/theme/src/Theme.cpp:155
#7  0xfe2c0254 in FreeAmpTheme::LoadFreeAmpTheme (this=0x16d2c0)
at ui/theme/src/FreeAmpTheme.cpp:151
#8  0xfe2bfb10 in FreeAmpTheme::FreeAmpTheme (this=0x16d2c0, context=0x966f0)
at ui/theme/src/FreeAmpTheme.cpp:83
#9  0xfe2bf72c in Initialize (context=0x966f0)
at ui/theme/src/FreeAmpTheme.cpp:59
#10 0x3243c in Player::Run (this=0x98708) at base/src/player.cpp:645
#11 0x49508 in main (argc=709, argv=0xffbe3f44)
at base/unix/src/bootstrap.cpp:132

the last bit of code that's in freeamp proper is frame #3,

#3  0xfe2a2294 in Theme::BeginElement (this=0x16d2c4, oElement=@0xffbe34f0, 
oAttrMap=@0xffbe33f0) at ui/theme/src/Theme.cpp:296
296pBitmap = new GTKBitmap(oAttrMap["Name"]);

Which isn't inspiring confidence in me.

At this point, I'm thinking of trying the egcs-current source, and
seeing if those mollify any bugs; it looks like the bleeding-edge
template stuff is causing gcc (or me, for that matter) to not be a
Happy Boy. (The fact that linkage problems mysteriously go away
with -fsquangle do not fill me with joy, either.)

Does any of this crap show up in linux, particularly the x86 flavors?



Re: theme.ui architecture

1999-10-07 Thread Tom Spindler

 I must say I am a little lost. Where is that theme.ui everybody's
 talking about ? I took the latest freeamp from CVS but I can't find anything
 about a theme UI in it. Any idea ?

it's on the release-1-5 branch.

And it and gcc-2.95.1 do not seem to want to play nicely. I'm working on
it, though... stupid templates.



Re: theme.ui architecture

1999-10-07 Thread Tom Spindler

  it's on the release-1-5 branch.
  
  And it and gcc-2.95.1 do not seem to want to play nicely. I'm working on
  it, though... stupid templates.
 
 Compiles with 2 minor warnings in FreeAmpTheme.cpp with gcc-2.95.2pre2 here...  

Oh, it _compiles_... it just fails when you try to run the sucker:

ld.so.1: ./freeamp: fatal: relocation error: file ./plugins/theme.ui: symbol cop
y__t18string_char_traits1ZcPcPCcUi: referenced symbol not found

However, compiling with -fsquangle seems to get around this.

It's definitely a bug in gcc 2.95.1, though.

Incidentally, adding -fsquangle makes everything compile _and_ run,
but it fails with "base/src/database.cpp:47: failed assertion `m_dbase'"




more 1-5 build woes with gcc-2.95.1

1999-09-30 Thread Tom Spindler

c++ -I. -I. -I./config -DUNIX_LIBDIR=\"/usr/local/lib\" -Dsolaris -Ilib/gdbm 
-Ibase/include -Iconfig -Iio/include -Iui/include -Ilmc/include -Ibase/unix/include 
-Ibase/unix/solaris/include -Iui/freeamp/unix/include -Iui/freeamp/unix/res 
-Iio/soundcard/unix/solaris/include -Iui/lcd/include -Iui/irman/include 
-Ilmc/xingmp3/include -Iplm/portable/pmp300/sba -Ilib/xml/include -Wall 
-Wno-return-type -g -O2  -I/usr/openwin/include -fpermissive -DSOLDEBUGMUTEX 
-D_REENTRANT -c base/src/downloadmanager.cpp -o base/src/downloadmanager.o
/usr/local/pkg/gcc-2.95.1-full/lib/gcc-lib/sparc-sun-solaris2.7/2.95.1/../../../../include/g++-3/stl_deque.h:
 In method `struct _Deque_iteratorDownloadItem *,DownloadItem *,DownloadItem **,0 
dequeDownloadItem *,allocatorDownloadItem *,0::erase(_Deque_iteratorDownloadItem 
*,DownloadItem *,DownloadItem **,0)':
base/src/downloadmanager.cpp:307:   instantiated from here
/usr/local/pkg/gcc-2.95.1-full/lib/gcc-lib/sparc-sun-solaris2.7/2.95.1/../../../../include/g++-3/stl_deque.h:818:
 warning: comparison between signed and unsigned
base/src/downloadmanager.cpp: In method `enum Error 
DownloadManager::Download(DownloadItem *)':
base/src/downloadmanager.cpp:597: warning: int format, different type arg (arg 4)
base/src/downloadmanager.cpp:605: warning: int format, different type arg (arg 4)
base/src/downloadmanager.cpp:746: warning: comparison between signed and unsigned
base/src/downloadmanager.cpp:855: warning: comparison between signed and unsigned
base/src/downloadmanager.cpp:567: warning: `char * file' might be used uninitialized 
in this function
base/src/downloadmanager.cpp: In method `void 
DownloadManager::SaveResumableDownloadItems()':
base/src/downloadmanager.cpp:1155: request for member `size' in 
`num.ostrstream::str()', which is of non-aggregate type `char *'
base/src/downloadmanager.cpp:1156: no matching function for call to `ostrstream::str 
(const char[1])'
/usr/local/pkg/gcc-2.95.1-full/lib/gcc-lib/sparc-sun-solaris2.7/2.95.1/../../../../include/g++-3/strstream.h:97:
 candidates are: char * ostrstream::str()
base/src/downloadmanager.cpp:1158: request for member `size' in 
`num.ostrstream::str()', which is of non-aggregate type `char *'
base/src/downloadmanager.cpp:1159: no matching function for call to `ostrstream::str 
(const char[1])'
/usr/local/pkg/gcc-2.95.1-full/lib/gcc-lib/sparc-sun-solaris2.7/2.95.1/../../../../include/g++-3/strstream.h:97:
 candidates are: char * ostrstream::str()
base/src/downloadmanager.cpp:1169: request for member `size' in 
`num.ostrstream::str()', which is of non-aggregate type `char *'
base/src/downloadmanager.cpp:1170: no matching function for call to `ostrstream::str 
(const char[1])'
/usr/local/pkg/gcc-2.95.1-full/lib/gcc-lib/sparc-sun-solaris2.7/2.95.1/../../../../include/g++-3/strstream.h:97:
 candidates are: char * ostrstream::str()
base/src/downloadmanager.cpp:1172: request for member `size' in 
`num.ostrstream::str()', which is of non-aggregate type `char *'
base/src/downloadmanager.cpp:1173: no matching function for call to `ostrstream::str 
(const char[1])'
/usr/local/pkg/gcc-2.95.1-full/lib/gcc-lib/sparc-sun-solaris2.7/2.95.1/../../../../include/g++-3/strstream.h:97:
 candidates are: char * ostrstream::str()
base/src/downloadmanager.cpp:1175: request for member `size' in 
`num.ostrstream::str()', which is of non-aggregate type `char *'
base/src/downloadmanager.cpp:1176: no matching function for call to `ostrstream::str 
(const char[1])'
/usr/local/pkg/gcc-2.95.1-full/lib/gcc-lib/sparc-sun-solaris2.7/2.95.1/../../../../include/g++-3/strstream.h:97:
 candidates are: char * ostrstream::str()
base/src/downloadmanager.cpp:1178: request for member `size' in 
`num.ostrstream::str()', which is of non-aggregate type `char *'
base/src/downloadmanager.cpp:1179: no matching function for call to `ostrstream::str 
(const char[1])'
/usr/local/pkg/gcc-2.95.1-full/lib/gcc-lib/sparc-sun-solaris2.7/2.95.1/../../../../include/g++-3/strstream.h:97:
 candidates are: char * ostrstream::str()
base/src/downloadmanager.cpp:1199: request for member `c_str' in 
`ost.ostrstream::str()', which is of non-aggregate type `char *'
base/src/downloadmanager.cpp: In method `void 
DownloadManager::LoadResumableDownloadItems()':
base/src/downloadmanager.cpp:1223: warning: suggest parentheses around assignment used 
as truth value
make: *** [base/src/downloadmanager.o] Error 1



worrisome error in 1-5 downloadmanager.cpp

1999-09-23 Thread Tom Spindler

base/src/downloadmanager.cpp:799: warning: name lookup of `end' changed for new ANSI 
`for' scoping
base/src/downloadmanager.cpp:796: warning:   using obsolete binding at `end'

and cvs.freeamp.org needs to start running ntp. :)



Re: buttons.bmp

1999-09-22 Thread Tom Spindler

 H. The buttons.bmp bitmap in the ui/theme/default directory keeps
 getting corrupted in check in. I did
 
 cvs admin -kb buttons.bmp mask.bmp background.bmp
 
 But the files still get screwed up. What other magic incantations do I need
 to carry out for CVS to be happy? We have rcs 5.7 installed on the server...

did you cvs ci -kb the files, too?

(I believe you have to co -kb or up -kb as well so that they don't get
zorched.)



Re: 1.5 on linux?

1999-09-21 Thread Tom Spindler

  If your system can handle `make depend`, you should do so after CVS
 
 Hmm. The problem is that I do this every time:
 cd freeamp/cvs ; cvs -d update ; cd ..
 cp -R cvs/freeamp freeamp ; cd freeamp
 ./configure ; make

Right after ./configure, you still want to do `make clean` before doing
`make`.



Re: Half success

1999-09-21 Thread Tom Spindler

 ./plugins/ncurses.ui: undefined symbol: color_set
 
 I have ncurses4.2, gdk1.0.6 from potato(debian).
 Is it the same at your linux? Do they work on any potato?

Well, I don't have a linux, but I'll answer anyway. :)

It seems that only newer versions of ncurses have color_set; since
yours doesn't, just add

#define color_set(a,b) ;

somewhere near the beginning of ncursesUI.cpp (or .h)



Re: 1.5 on linux?

1999-09-20 Thread Tom Spindler

 I can compile it, but can't run. I get this:
 flocsy@crux:~/work/freeamp/freeamp15$ ./freeamp
 /mp3/Ellenorzott/D/Dragana\ -\ Up\ And\ Down.mp3
 /home/flocsy/work/freeamp/freeamp/plugins/freeampcmd.ui: undefined symbol:
 SetFirst__15PlayListManager

make clean; make.

If your system can handle `make depend`, you should do so after CVS
updates; changes in the header files can cause things to not link
properly.



extreme solaris wackiness

1999-09-20 Thread Tom Spindler

Well, I think I'm getting closer to finding what's causing the
Solaris strangeness; for one, it appears that sometimes the LWP
or Reader gets stuck, and so WasteTime() gets called an awful
lot. A side effect seems to be the creation of several hundred
threads. :)

(gdb) info threads
  640 Thread 511  0xff04b7dc in _restorefsr ()
   from /usr/lib/libthread.so.1
  639 Thread 510  0xff04b7dc in _restorefsr ()
   from /usr/lib/libthread.so.1
and so on.



Re: your mail

1999-09-12 Thread Tom Spindler

 i need an advice, which is the simpler:
 1. rip off the xing player to use it in my car mp3 player or
 2. build a full freeamp ui?
 
 for me it seems that to extract the xing player module is pretty easy and
 can be done by slightly modifying the surrounding lmc object to make it a
 bit more independent from freeamp.
 but i prefer to code a ui, because you already have the majority of the
 classes i will also need.
 can anybody tell me how big deal is to code a full ui?

Have you looked at the lcd UI?
It's designed for a LCD screen, as would be used in a portable or car
mp3 player.

(FWIW, the command-line UI plugin is 200 lines of code.)



a small reminder about the freeamp-lignux.ui = freeamp.ui change...

1999-08-07 Thread Tom Spindler

You'll probably want to edit your ~/.freeamp_prefs file so that it
doesn't mention your OS in the ui section. i.e. UI: freeamp-solaris.ui
= UI: freeamp.ui