SGI: Development

5 to 6.5 porting / xlib

i got a program made for irix 5.x and it works fine on 6.5. except one thing: pop up menus. pushing the button works but as soon as the menu is supposed to pop out above the button it crashes.
maybe somebody got the same issue in the past and knows a fix?

any hints would be most welcome :)

_________________
r-a-c.de
Presumably you just have the program binary not the source code? If you start the application from a terminal window does it crash with any explanation from the system, seg fault or whatever?

_________________
Choosing stones, big enough to drag me down...
yes unfortunately the source is not available anymore but it's not stripped so i was able to trace it down to at least some extend. i'll check my records and post what i got tomorrow ...

_________________
r-a-c.de
here we go:
Code:
int  _XFlushInt(<stripped>) ["XlibInt.c":648]
int  _XFlush(<stripped>) ["XlibInt.c":591]
int  XSetWindowBorderWidth(<stripped>) ["BdrWidth.c":42]
Core from signal SIGBUS: Bus error

_________________
r-a-c.de
Ah! With that the problem becomes painfully obvious, line 42 of BdrWidth.c is
Code:
unsigned long lwidth = width;   /* must be CARD32 */
so there's a basic incompatibility between unsigned long on the computer the binary was compiled on and the workstation you're trying to run it on. Yet another reason to be added to the "X Windows Disaster" chapter of the "Unix Hater's Manual:" http://www.art.net/~hopkins/Don/unix-haters/x-windows/disaster.html

_________________
Choosing stones, big enough to drag me down...
thanks that makes sense so not much hope for this one i guess ... :-/

_________________
r-a-c.de
okay i went ahead and removed some affected function calls but it never seems to end. pretty much the whole menu thingy is incompatible. no dice here ...

_________________
r-a-c.de
Uh, what now? How could you remove function calls if you don't have the source code? Or are you hacking it with a binary editor... :shock:

_________________
Choosing stones, big enough to drag me down...
Code:
unsigned long lwidth = width;   /* must be CARD32 */


How so? If the program was compiled 32bit, then the program will either run as 32bit or not run at all.

If the program was compiled with pre- 64 bit headers, and as n32 or o32 binary then it is self-consistent.

_________________
:Indy: :Indigo2IMP: :Octane: :Indy: 4xRS6K 2xHP9K 6xSUN 1xDEC 14xMAC 7xPC 2xPS2
Yet that's the line it's crashing on. I didn't dig through the code to see exactly what they expect of CARD32 though...

_________________
Choosing stones, big enough to drag me down...
well it's where the first crash happens. however as mentioned a lot of x functions seem to crash it so maybe it's something else?
the rest of the window shows up just fine tho. it's the menus in particular.

maybe it's not the irix version but the gfx card. mgras and vpro have the same issues so i assumed it was irix. gonna try on an ir2 ...

_________________
r-a-c.de
It's probably incompatibilities between the version of X that the binary was linked to when it was compiled and the version of X that's on your workstation...

_________________
Choosing stones, big enough to drag me down...
just tried with an ir2 and it runs just fine :P
so it's indeed the gfx card.

_________________
r-a-c.de
Nice to have options! 8-)

_________________
Choosing stones, big enough to drag me down...
vishnu wrote:
Nice to have options! 8-)


yes and no hehe. unfortunately the onyx is just too loud for longer, serious sessions so i guess i'll either put the old app back onto the shelf or run it on the indigo2. however r4400 and extreme gfx might be not as much fun as the r12000 ir2 onyx :P

hmm maybe i should upgrade the indigo to r10000 and impact. some models could do that iirc just not sure anymore on what it depended ...

_________________
r-a-c.de