I followed the instructions and it compiled, seems to work. Why do I not run make install?[/quote]
Because you do not need it.
If I do make install I have “Everything already installed”. If you use some special paths in your configure, may be, you can use make install if you want.
Thanks for the help. I don’t really have a reason to run Mavericks in the first place. Is there any way to differentiate between the developer Mavericks and the official release?
root [2] system ("ls -la /Users/ngu/jroot/abc/icons/arrow_down.xpm")
-rw-r--r-- 1 ngu staff 185 Oct 24 05:48 /Users/ngu/jroot/abc/icons/arrow_down.xpm
(const int)0
root [3] TBrowser aa
Icon Path:/Users/ngu/icons:/Users/ngu/jroot/abc/icons:.:/Users/ngu/icons:/Users/ngu/jroot/abc/icons:.
Path: /Users/ngu/icons:/Users/ngu/jroot/abc/icons:.:/Users/ngu/icons:/Users/ngu/jroot/abc/icons:.
picnam: /Users/ngu/jroot/abc/icons/arrow_down.xpm
Error in <TGVScrollBar::TGVScrollBar>: arrow_*.xpm not found[/quote]
Hmm, ok, I'm sorry I have to ask you to do these things, but I think this long-standing problem with arrow_down.xpm and similar xpms must be resolved ONCE AND FOREVER, it's not good/right that nobody cares :slight_smile:
So, can you, please, have a look - TGPicture.cxx, the same function, we know now, that the file found, so,
the remaining part is:
[code]TImage *img = TImage::Open(picnam);
if (!img) {
pic = new TGPicture(pname);
pic->fAttributes.fColormap = fClient->GetDefaultColormap();
pic->fAttributes.fCloseness = 40000; // Allow for "similar" colors
pic->fAttributes.fMask = kPASize | kPAColormap | kPACloseness;
fPicList->Add(pic);
delete [] picnam;
return 0;
}
pic = new TGPicture(pname, img->GetPixmap(), img->GetMask());
delete [] picnam;
delete img;
fPicList->Add(pic);
return pic;[/code]
Can you, please, add print statements as before to understand, where does this method return 0?
So, is it TImage::Open(picname) who returns this disgusting null? :slight_smile:
So, actually, it creates an image an returns non-null pointer?
Weird, this seems to be simply impossible, since the code that produces the error message looks like this (gui/gui/src/TGScrollBar.cxx):
[code]fHeadPic = fClient->GetPicture(“arrow_up.xpm”);//your 5a/5b output is about this
fTailPic = fClient->GetPicture(“arrow_down.xpm”);//another 5a/5b
if (!fHeadPic || !fTailPic) {
Error(“TGVScrollBar”, “arrow_*.xpm not found”);
return;
}[/code]
While ROOT uses overloaded operator new/delete for TObject derived classes, I guess it never returns 0.
Interesting !!!
I print the pointers if they are null, and it turns out the second one is null.
0x7f9f7ba84c80 0x0
Error in TGVScrollBar::TGVScrollBar: arrow_*.xpm not found
I tried by changing the place or even loading the same xpm: always one pointer is null.
Looks like an initialization problem?
[quote=“unelg”]Interesting !!!
I print the pointers if they are null, and it turns out the second one is null.
0x7f9f7ba84c80 0x0
Error in TGVScrollBar::TGVScrollBar: arrow_*.xpm not found
I tried by changing the place or even loading the same xpm: always one pointer is null.
Looks like an initialization problem?[/quote]
Hmmmm, can you, please, print a pointer value immediately after this last ‘new TGPicture’? (you have print5a/print5b but unfortunately you are printing the name and not the pointer, but it’s good to print both the name and the resulting pointer).
Also, even if it’s not 0 it does not mean that later (when we call GetPicture again) picture pool does not do something wrong returning 0
There is also:
if (pic && !pic->IsScaled()) {
if (pic->fPic == kNone)
return 0;
pic->AddReference();
return pic;
}
Can you, please, add a print here also:
if (pic && !pic->IsScaled()) {
if (pname == "arrow_down.xpm")std::cout<<"not scaled???\n";
if (pic->fPic == kNone)
return 0;
pic->AddReference();
return pic;
}
If it’s the “arrow down” who’s null later in TGVSrcollBar.
Ok, I’m sorry, from the beginning I was quite sure it’s too much to ask you to compile ROOT in the debug mode and run root in a debugger with breakpoints, but now I see it would be much better solution instead of all these prints
[quote=“unelg”]did it. Who is asking the down.xpm for the first time? and WHY?
[/quote]
Well, it’s not really important, probably, somebody else - take a list-box for example or any control, which has an “expand” functionality - they all have a button with a triangle, which is exactly “arrow_down.xpm”.
Ok, now, let me check the code to see what is this ‘scaled’ and when it’s ‘true’/‘false’ and why.
I’ll probably ask something else a bit later
[quote=“unelg”]getting xpms
picnam3a: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam3b: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam5a: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam5b: /Users/ngu/jroot/abc/icons/arrow_up.xpm 0x7fe2bbb3c580
pic: arrow_up.xpm
got up xpm
not scaled???
???
got down xpm
0x7fe2bbb3c580 0x0[/quote]
Ok, I’ll investigate further and let you know tomorrow/or this weekend I have a feeling, we’ll end with libxpm/libasimage-related problems )
My guess (the last thing you can check today) even though pointer for arrow_up.xpm is NOT NULL, pic->fPic is kNone though. May be, you can check this? When printing 5b, also, print (after a pointer) pic->fPic?
BTW it can be interesting to see your ‘configure’ log And also to know if you have MacPorts installed and some other libraries like libxpm/libafterimage (I’m only guessing, not sure if libafterimage is needed here)