Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Segmentation fault

 [1/15] from: varnoux:atmel at: 6-Nov-2003 17:03


Hi List, I run into a seg fault when I do the following : display_list: copy [[][][][][]] summary_file: read/lines %big_file job_selected: "My string" i: 0 foreach line summary_file [ probe i: (i + 1) tmp: parse probe line "" print "Test" if job_selected = tmp/2 [ append display_list/1 tmp/1 append display_list/2 tmp/3 append display_list/4 tmp/4 append display_list/3 tmp/5 append display_list/5 tmp/6 ] ] %big_file is an ASCII file with approx. 14000 lines, and another such loop already deals with that variable (summary_file). It works for the first loop, but not the second one... The segmentation fault occurs between just after the counter display (without doing the probe of "line"). Any idea anyone ? Vincent

 [2/15] from: rotenca:telvia:it at: 6-Nov-2003 17:41


Hi Arnoux
> display_list: copy [[][][][][]]
try copy/deep [[][][][][]] --- Ciao Romano

 [3/15] from: varnoux:atmel at: 7-Nov-2003 10:02


Thanks for your reply, but it doesn't solve the problem. Actually: 1) When I try to run it on an older computer, it crashes quicker. 2) In a previous version, I had only one loop doing the work and it was working OK. Couldn't be due to a memory full pb ? Can't I run a garbage collector ? Vincent Romano Paolo Tenca wrote:
>Hi Arnoux >> display_list: copy [[][][][][]]
<<quoted lines omitted: 5>>
>Ciao >Romano
-- Vincent Arnoux Lithography Development Engineer Tel: (+33)4 42 53 65 99

 [4/15] from: rotenca:telvia:it at: 7-Nov-2003 12:07


Hi Arnoux
> Thanks for your reply, but it doesn't solve the problem. > Actually: > 1) When I try to run it on an older computer, it crashes quicker. > 2) In a previous version, I had only one loop doing the work and it was > working OK. > > Thanks for your reply, but it doesn't solve the problem.
Your problem is not in the code you have shown. It works. If you want more help you should try to isolate the problem and show a crashing example. To simulate the file, you could do something like: summary_file: insert/dup copy [] copy "a mystring c" 14000 --- Ciao Romano

 [5/15] from: g:santilli:tiscalinet:it at: 7-Nov-2003 12:38


Hi Romano, On Friday, November 7, 2003, 12:07:25 PM, you wrote: RPT> Your problem is not in the code you have shown. It works. Maybe that depends on the version of REBOL; since he's talking about a Segmentation fault I assume he's getting that on Linux. Maybe there's a bug in the Linux version? Arnoux, what version of REBOL are you using? Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/

 [6/15] from: varnoux:atmel at: 7-Nov-2003 13:39


I am running REBOL/View 1.2.8.4.2 on Linux, but the problem is the same on REBOL/View 1.2.8.3.1 on Windows. I will make a crashing example to show you. Vincent PS: You can call me Vincent... Gabriele Santilli wrote:

 [7/15] from: rotenca:telvia:it at: 7-Nov-2003 14:41


Hi Vincent, to simulate the file should be better: summary_file: copy [] repeat n 14000 [ insert tail summary_file join "a mystring c" n ] now the string are not the same --- Ciao Romano

 [8/15] from: varnoux:atmel at: 7-Nov-2003 16:58


Sometimes, there are some things you know you'll never understand... Actually, one line was not exact in my code quoting. It was not : summary_file: read/lines %big_file but summary_file: read/lines ftp://log:[pass--mac]/big_file By trying to make an example of crashing code, I loaded the big file locally and the bug disappeared. Now my script is: write %tmp read ftp://log:[pass--mac]/big_file summary_file: read/lines %tmp And the rest is _exactly_ like before. No crash anymore... Thanks to all who helped me ;o) Vincent Arnoux Vincent wrote:
>Hi List, >I run into a seg fault when I do the following :
<<quoted lines omitted: 21>>
>Any idea anyone ? >Vincent
-- Vincent Arnoux Lithography Development Engineer Tel: (+33)4 42 53 65 99

 [9/15] from: greggirwin:mindspring at: 7-Nov-2003 10:34


Hi Vincent, AV> By trying to make an example of crashing code, I loaded the big AV> file locally and the bug disappeared. That's good to know! Send it to feedback if you haven't already. --Gregg

 [10/15] from: rotenca:telvia:it at: 7-Nov-2003 19:27


Hi Vincent, Good to know. The problem should be in the ftp code. But you must use copy/deep if you think to re use the code. 2 additional notes: insert tail is a lot more fast than append. pick tmp 3 is a little more fast than tmp/3 --- Ciao Romano

 [11/15] from: varnoux:atmel at: 13-Nov-2003 17:47


Hi, Sorry for the late reply, I was off. Thank you for your help, I will follow your advice and send this to the feedback. Vincent Romano Paolo Tenca wrote:

 [12/15] from: warp:reboot:ch at: 6-Feb-2004 16:04


How do I prevent "segmentation fault" ? or what is likely to cause it ? The script is a webserver and that comes after some days of running. running Core/2.5.6 on OS X 10.3.2 any help greatly appreciated! Thanks and have a nice day. Will Arp [warp--reboot--ch]

 [13/15] from: gchiu:compkarori at: 6-Feb-2004 21:25


Will Arp wrote.. apparently on 6-Feb-2004/16:04:36+1:00
>How do I prevent "segmentation fault" ? >or what is likely to cause it ? > >The script is a webserver and that comes >after some days of running. > >running Core/2.5.6 on OS X 10.3.2
Carl said this in message 37518 Check to be sure you are running the 2.5.6 Core (or SDK or Command built on 2.5.6). There was a memory bug in the exit code that once caused this to happen from time to time. (The return point in the launch code got garbage collected.) Since you are running 2.5.6, perhaps the problem still exists? -- Graham Chiu http://www.compkarori.com/cerebrus

 [14/15] from: warp:reboot:ch at: 6-Feb-2004 22:34


Graham, I did see that message in your mailing-list archive, thanks 8) now I'm firing nessus against the webserver and randomly get: ** Script Error: Out of range or past end ** Where: to-word ** Near: to word! :value and I don't have that line anywhere in the code so must be some mezzanine and can't locate it. sometimes rebol is really hard to debug 8/ Thanks to all of you working on view 1.3! ...and hopefully we'll get an OS X version soon. Have a great weekend, Will Arp [warp--reboot--ch]

 [15/15] from: gchiu:compkarori at: 7-Feb-2004 0:11


Will Arp wrote.. apparently on 6-Feb-2004/22:34:10+1:00
>Graham, >I did see that message in your mailing-list archive, >thanks 8)
Will, Good to know that I'm not the only one using it! :)
>now I'm firing nessus against the webserver >and randomly get: > >** Script Error: Out of range or past end >** Where: to-word >** Near: to word! :value
Which webserver is this one? Is it Cal's latest ? Have you tried putting in some error trapping in? -- Graham Chiu http://www.compkarori.com/cerebrus

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted