PLEASE NOTE: the upgrades to this server,, have not yet been completed.
Hopefully the changes will be completed on THURSDAY 8th December.
Web-based programs, such as csmarks, cssubmit, and the help fora, will be unavailable at some time on Thursday 8th.
  It's UWAweek 49


This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

Displaying selected article
Showing 1 of 919 articles.
Currently 6 other people reading this forum.

 UWA week 36 (2nd semester, mid-semester break) ↓
SVG not supported

Login to reply

11:55pm Thu 8th Sep, ANONYMOUS

Hi everyone, Having an issue getting over the segmentation fault hurdle, I have spent days trying different approaches and still cannot figure out where its coming from. To quote Chris' response to another post they "nearly always occur when accessing memory that your process doesn't own, typically by accessing an array outside of its declared dimensions". The problem is my approach to breaking a string into words seems to work for the 1st line of the 1st file read before the fault occurs. I'm using code containing fgets() from the lectures, does that mean the issue is in fgets()? Idk where to even begin if it is... Any guidance in the right direction would be greatly appreciated. my output from separating 'words' within a line where the fault occurs; 0 3 * * * daily-backup Segmentation fault compared to output from my process to read file by line below which works; 0 3 * * * daily-backup 15 4 * * sun weekly-backup 0 10 22 7 mon deep-thought 59 16 16 8 * submit-project 0 2 1 * * send-monthly-newsletter weekly-backup 6 daily-backup 2 send-monthly-newsletter 10 submit-project 1 deep-thought 600 if you've read this far, thanks :)

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  1:17AM Sep 14 2022
Privacy policy