Segmentation violation

I am using 5.17 on a RHEL4 machine. I get a segmentation violation whenever I try to open a root file containing histograms. This only occurs when I run the code on a linux machine – I tried the exact same code and file on a windows machine and it worked fine. I condensed
the program down into as simple an example as possible:

#include <iostream>
#include "TROOT.h"
#include "TApplication.h"
#include "TCanvas.h"
#include "TH1.h"
#include "TFile.h"


using namespace std;

int main(int argc, char **argv)
{

	TCanvas* mycanvas = new TCanvas();
	
	TFile* rhfile;
	rhfile = new TFile("/data/runhistograms.root","READ");
	
	TH1F* nhist;
	rhfile->GetObject("noise10155",nhist);
	
	nhist->Print();

	rhfile->Close();
	return 0;
} 

I can start root in interactive mode, open a browser, and view the histograms, so the file itself is fine. It is only when I compile and run the code that the following is returned:
*** Break *** segmentation violation
Using host libthread_db library “/lib/tls/libthread_db.so.1”.
Attaching to program: /proc/10133/exe, process 10133
[Thread debugging using libthread_db enabled]
[New Thread -1208756544 (LWP 10133)]
0x007fc7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x04fc3ff3 in __waitpid_nocancel () from /lib/tls/libc.so.6
#2 0x04f6e469 in do_system () from /lib/tls/libc.so.6
#3 0x03ece84d in system () from /lib/tls/libpthread.so.0
#4 0x002bf133 in TUnixSystem::Exec () from /usr/local/lib/libCore.so
#5 0x002c48c5 in TUnixSystem::StackTrace () from /usr/local/lib/libCore.so
#6 0x002c1525 in TUnixSystem::DispatchSignals ()
from /usr/local/lib/libCore.so
#7 0x002c162c in SigHandler () from /usr/local/lib/libCore.so
#8 0x002c0805 in sighandler () from /usr/local/lib/libCore.so
#9
#10 0x0029ee9b in TClass::GetStreamerInfo () from /usr/local/lib/libCore.so
#11 0x00e30560 in TStreamerInfo::Build () from /usr/local/lib/libRIO.so
#12 0x00dfe85c in TBufferFile::ReadClassBuffer () from /usr/local/lib/libRIO.so
#13 0x0039ed2b in TNamed::Streamer () from /usr/local/lib/libCore.so
#14 0x00e331f1 in TStreamerInfo::Streamer () from /usr/local/lib/libRIO.so
#15 0x0029fed0 in TClass::Streamer () from /usr/local/lib/libCore.so
#16 0x00dfc8c2 in TBufferFile::ReadObjectAny () from /usr/local/lib/libRIO.so
#17 0x00285512 in operator>> () from /usr/local/lib/libCore.so
#18 0x002898d4 in TList::Streamer () from /usr/local/lib/libCore.so
#19 0x00e27a0e in TKey::ReadObj () from /usr/local/lib/libRIO.so
#20 0x00e1156b in TFile::GetStreamerInfoList () from /usr/local/lib/libRIO.so
#21 0x00e14d3e in TFile::ReadStreamerInfo () from /usr/local/lib/libRIO.so
#22 0x00e0ea86 in TFile::Init () from /usr/local/lib/libRIO.so
#23 0x00e15d22 in TFile::TFile () from /usr/local/lib/libRIO.so
#24 0x0804984d in main (argc=1, argv=0xbff42d84)
at /homes/noachr/openfile/src/openfile.cpp:17

Line 17 is:
rhfile = new TFile(“runhistograms.root”,“READ”);

I have attached the rootfile in question. Any help would be appreciated.
runhistograms.root (347 KB)

I cannot reproduce this problem. It is likely that you are missing a library (eg libRIO) when linking yourself your executable module.
We strongly recommend to use

g++ -o myapp.exe myapp.cxx `root-config --cflags --libs`
or at least see the list of standard libs with

root-config --libs
Rene