i get segfaults everytime in Gorm, and GWorkspace (on a reliable interval (always)) dont know how related it is: but i get errors on the terminal coming from NSView when i use applications, heres it is: (comes in Gorm when i tell it to open that new appliciation working window 2005-07-09 16:48:50.000 Gorm[13157] File NSView.m: 863. In [NSClipView -setFrame:] given negative width 2005-07-09 16:48:50.000 Gorm[13157] File NSView.m: 868. In [NSClipView -setFrame:] given negative height im assuming the segfault comes from the AppKit, as multiple apps are effected, even ones that people say are stable, and even simple test programs, altho i havent tried to trace it down further yet (i havent got a clue where to start, as im still learning objective-c/gnustep api) backtraces dont give any info, every time i run a backtrace all i get are numbers and "??" marks, even with "debug" in the USE variables Reproducible: Always Steps to Reproduce: in GWorkspace the segfault comes when i use NSTextFields and select all text i even modified the button app in the mine-tutorial to show a editable NSTextField (this is a simple app, and altho im new and all, i dont think there is anyway i could have make it segfault myself), the same segfault comes when i write in the field, then select the text (it cames after a release the button) as for Gorm: 1) open it 2) menu->Document->new application 3) in the palete, press any widget as to drag it over 4) the segfault comes always the second i press the button (as to drag the widget) Actual Results: segfaults Expected Results: working apps Portage 2.0.51.22-r1 (!/etc/portage-profile, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.10-gentoo-r6369 i686) ================================================================= System uname: 2.6.10-gentoo-r6369 i686 AMD Athlon(tm) XP 2600+ Gentoo Base System version 1.6.12 dev-lang/python: 2.3.5 sys-apps/sandbox: 1.2.10 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib/X11/xkb /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="ccache digest distlocks nostrip notitles sandbox sfperms userpriv" GENTOO_MIRRORS="http://gentoo.binarycompass.org http://chod.cwru.edu/gentoo http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" LC_ALL="en_US.utf8" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/tmp/" PORTDIR="/usr/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowex X Xaw3d a52 aac aalib acpi aim alsa audiofile avi bash-completion bitmap-fonts bzlib cdparanoia cdr cups curl debug dlloader dv dvd dvdread encode erandom esd faac faad fam ffmpeg flac flash fpx freetype gdbm gif gimp gnustep graphviz gstreamer gtk gtk2 hardened icq imagemagick imlib imlib2 jabber jbig joystick jpeg ladcca lcms libcaca libffi libwww live logging lzo mad man mapeditor maps matroska mmx mmx2 mng motif mpeg mplayer music ncurses network nptl nptlonly objc offensive ogg oggvorbis ogm openal opengl oscar pam pcre pdflib perl physfs pic pie plotutils png python readline real rtc sdl sftp silc slang sndfile sounds sox speex spell sse ssl ssp svg szip tcpd tetex theora tiff truetype truetype-fonts type1-fonts unicode usb userlocales v4l2 videos vorbis xanim xml2 xpm xv yahoo yv12 zlib" Unset: ASFLAGS, CTARGET, LANG, LDFLAGS, LINGUAS, PORTDIR_OVERLAY and the test program or NSTextField: #include <Foundation/Foundation.h> #include <AppKit/AppKit.h> @interface MyDelegate : NSObject { NSWindow *myWindow; } - (void) printHello: (id)sender; - (void) createMenu; - (void) createWindow; - (void) applicationWillFinishLaunching: (NSNotification *)not; - (void) applicationDidFinishLaunching: (NSNotification *)not; @end @implementation MyDelegate : NSObject - (void) dealloc { RELEASE (myWindow); } - (void) printHello: (id)sender { printf ("Hello!\n"); } - (void) createMenu { NSMenu *menu; menu = AUTORELEASE ([NSMenu new]); [menu addItemWithTitle: @"Quit" action: @selector (terminate:) keyEquivalent: @"q"]; [NSApp setMainMenu: menu]; } - (void) createWindow { NSRect rect; unsigned int styleMask = NSTitledWindowMask | NSMiniaturizableWindowMask; NSTextField *myButton; NSSize buttonSize; myButton = AUTORELEASE ([NSTextField new]); [myButton setEditable: YES]; buttonSize = [myButton frame].size; rect = NSMakeRect (100, 100, 100, 50); myWindow = [NSWindow alloc]; myWindow = [myWindow initWithContentRect: rect styleMask: styleMask backing: NSBackingStoreBuffered defer: NO]; [myWindow setTitle: @"This is a test window"]; [myWindow setContentView: myButton]; } - (void) applicationWillFinishLaunching: (NSNotification *)not { [self createMenu]; [self createWindow]; } - (void) applicationDidFinishLaunching: (NSNotification *)not; { [myWindow makeKeyAndOrderFront: nil]; } @end int main (int argc, const char **argv) { [NSApplication sharedApplication]; [NSApp setDelegate: [MyDelegate new]]; return NSApplicationMain (argc, argv); }
I believe that I've seen this problem before. Could you rebuild gnustep-base with USE="ffcall -gcc-libffi", and try the applications again? If you weren't using libffi (and thus using ffcall) already, please say so. Feedback would be greatly appreciated.
Also, could you post the contents of `cat /proc/cpuinfo` out of curiousity. Thanks.
-- CPU Info -- processor : 0 vendor_id : AuthenticAMD cpu family : 6 model : 10 model name : AMD Athlon(tm) XP 2600+ stepping : 0 cpu MHz : 1916.714 cache size : 512 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse pni syscall mmxext 3dnowext 3dnow bogomips : 3809.28 -- -- nope, i used the ffcall thing, but it still segfaults just like usual
Ahh...I may not have seen this before, actually. To clarify, did you switch to ffcall or did you use it to begin with? If you had used it to begin with, can you try it with libffi? If you USE="-ffcall -gcc-libffi" emerge gnustep-base ... it should emerge dev-libs/libffi (if you your gcc provides this, i.e. you built 3.3.5* series with gcj, you can in fact use gcc-libffi use flag). Please let me know which you started with (I had assumed you had started with libffi), and also if libffi ends up working for you.
i started with the defailt (libffi), i tryed ffcall, gcc-libffi, and libffi, with no diffrence.
Okay, I've seeing if anyone upstream knows anything about this (as it still seems similar an error I personally had); I have one last round of suggestions. Summary: make sure we emerge gnustep with ffcall and not libffi; run latest soon-to-be-stablized versions of gnustep core packages (which have fixes that fixed the similar issue I was having). Steps: - # emerge -pv unmerge `qpkg -I gnustep -nc` dev-libs/libffi dev-libs/ffcall --+ above assumes you have qpkg from "gentoolkit" installed --+ there aren't mant other packages that depends on the external version of libffi -- if you are running them, you'd know (e.g. sablevm); in that case, don't unmerge libffi - # ACCEPT_KEYWORDS="~x86" USE="ffcall -gcc-libffi" emerge -pv gnustep-env --+ ffcall should be merged --+ libffi should not be merged --+ Important packages that are currently ~x86: ffcall-1.10 and gnustep-base-1.10.3-r1 - merge the programs that were failing for you - let me know :-) You likely didn't merge -r1 of gnustep-base, which actually enables use of ffcall via the use flag -- I believe this may be it, if it is the problem i've seen before. Thanks for the help!
thanks!, apparently ffcall was never emerged, even tho i had it set in use flags, but those commanands you gave made it install, along with everything else in gnustep, so im not seeing any more segfaults, and gorm is working fine. thanks again, now i can start using gorm/projectcenter
No, thank you for testing. :-) I'm going to stabilze gnustep-base-1.10.3-r1 soon, so any updates you do should be transparent. Note that if you emerge sync before I do this, it may want to downgrade gnustep-base, so don't let it. :-) Also, for further reference, generaly, let devs close the bugs, as most keep their open bugs as a sort of TODO list. Thanks again.