Hi, I'd like to read my own data files to use it with root. By doing this, I got the following problem. When I use the interpreter line by line to run my program, root [0]#include <fstream.h> root [1]char inpuffer[256]; root [2]ifstream eingabe; root [3]eingabe.open("test.dat",ios::in); root [4]while(eingabe >> inpuffer) printf("%s\n",inpuffer); xachse 0 1 yachse 0.5 0.6 root [5]eingabe.close(); there are no problems at all, but if I start this progam by typing root [6].x dat.C int dat() { #include <fstream.h> char inpuffer[256]; ifstream eingabe; eingabe.open("test.dat",ios::in); if ( !eingabe ) { printf("can not open File\n"); exit(-1); } while(eingabe >> inpuffer) printf("%s\n",inpuffer); eingabe.close(); return 1; } root is going to crash with this nice remark Warning: File "fstream.h" already loaded Fatal in <operator delete>: unreasonable size (1073748556) aborting ( 0) 0xc1e065b0 StackTrace__11TUnixSystemFv + 0x28 [/opt/hppd/root/lib/libUnix.sl] ( 1) 0xc2a330e4 DefaultErrorHandler__FiUcPCcT3 + 0x15c [/opt/hppd/root/lib/libBase.sl] ( 2) 0xc2a3326c ErrorHandler + 0x104 [/opt/hppd/root/lib/libBase.sl] ( 3) 0xc2a334a4 Fatal__FPCcT1e + 0x3c [/opt/hppd/root/lib/libBase.sl] ( 4) 0xc2af67d8 __dl__FPv + 0x118 [/opt/hppd/root/lib/libBase.sl] ( 5) 0xc18de5d8 __dt__8ifstreamFv + 0xa8 [/usr/lib/libC.ansi.1] ( 6) 0xc2956fc0 G__ifstream_wAifstream_7_0__FP8G__valuePcP8G__parami + 0x118 [/opt/hppd/root/lib/libCint.sl] ( 7) 0xc296811c G__call_cppfunc + 0x244 [/opt/hppd/root/lib/libCint.sl] ( 8) 0xc294759c G__interpret_func + 0x140c [/opt/hppd/root/lib/libCint.sl] ( 9) 0xc292a534 G__getfunction + 0x3d4 [/opt/hppd/root/lib/libCint.sl] (10) 0xc29a6944 G__class_2nd_decl + 0x20c [/opt/hppd/root/lib/libCint.sl] (11) 0xc29a81e8 G__letvariable + 0x1008 [/opt/hppd/root/lib/libCint.sl] (12) 0xc291c868 G__define_var + 0x1d18 [/opt/hppd/root/lib/libCint.sl] (13) 0xc29a22a4 G__defined_type + 0x46c [/opt/hppd/root/lib/libCint.sl] (14) 0xc297fd54 G__exec_statement + 0x1c8c [/opt/hppd/root/lib/libCint.sl] (15) 0xc2947f3c G__interpret_func + 0x1dac [/opt/hppd/root/lib/libCint.sl] (16) 0xc292a8ec G__getfunction + 0x78c [/opt/hppd/root/lib/libCint.sl] (17) 0xc2925974 G__getitem + 0x634 [/opt/hppd/root/lib/libCint.sl] (18) 0xc2923f0c G__getexpr + 0x3e4 [/opt/hppd/root/lib/libCint.sl] (19) 0xc29239f0 G__calc + 0x258 [/opt/hppd/root/lib/libCint.sl] (20) 0xc2984284 G__process_cmd + 0x18c4 [/opt/hppd/root/lib/libCint.sl] (21) 0xc2442cec ProcessLine__5TCintFPCc + 0xac [/opt/hppd/root/lib/libMeta.sl] (22) 0xc2442e18 ProcessLineSynch__5TCintFPCc + 0x78 [/opt/hppd/root/lib/libMeta.sl] (23) 0xc2a21154 ProcessFile__12TApplicationFPCc + 0x644 [/opt/hppd/root/lib/libBase.sl] (24) 0xc2a209bc ProcessLine__12TApplicationFPCc + 0x2e4 [/opt/hppd/root/lib/libBase.sl] (25) 0xc1e16d04 HandleTermInput__5TRintFv + 0x12c [/opt/hppd/root/lib/libRint.sl] (26) 0xc1e15e74 Notify__17TTermInputHandlerFv + 0x34 [/opt/hppd/root/lib/libRint.sl] (27) 0xc1e171c0 ReadNotify__17TTermInputHandlerFv + 0x28 [/opt/hppd/root/lib/libRint.sl] (28) 0xc1e0496c DispatchOneEvent__11TUnixSystemFv + 0x184 [/opt/hppd/root/lib/libUnix.sl] (29) 0xc2afd9c8 InnerLoop__7TSystemFv + 0x38 [/opt/hppd/root/lib/libBase.sl] (30) 0xc2afd8f4 Run__7TSystemFv + 0x74 [/opt/hppd/root/lib/libBase.sl] (31) 0xc2a21210 Run__12TApplicationFUc + 0x38 [/opt/hppd/root/lib/libBase.sl] (32) 0xc1e168d8 Run__5TRintFUc + 0x268 [/opt/hppd/root/lib/libRint.sl] (33) 0x00004860 main + 0x78 [/opt/hppd/root/bin/root] (34) 0xc0061d0c _start + 0x8c [/usr/lib/libc.1] (35) 0x00004184 $START$ + 0x134 [/opt/hppd/root/bin/root] ABORT instruction (core dumped) Thanks in advance for your advice, Marc Mueller
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:20 MET