C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 22nd, 2003, 10:52 PM
meowface meowface is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Melbourne Australia
Posts: 5 meowface User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Bus Error- What The?

I posted earlier a thread called "compiles and runs in debug but then it crashes" - the problem is outlined there.... anyway, i compiled my program on my university's computer and gcc told me there is a "bus error" when it crashed...
What is a bus error?, Am i passing too much information to and from my functions?

Reply With Quote
  #2  
Old July 24th, 2003, 08:27 AM
carthik carthik is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: India
Posts: 5 carthik User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi

The "Bus Error" will occur when a program tries to access a non-aligned pointer. For instance, on many machine architectures, access to 'long' (4 byte) numbers must be done using a memory address that divides by 4. Trying to access such an entity using an address that does not abide by this rule will cause this error.

It means there is a memory mis-handling in your program. Check your program whether you are allocating and freeing memory perfectly.

I have not seen your program, But I am sure there is an error in your program and there is nothing to do with the compiler. Whichever compiler you are using if your program has any Illegal memory access this kind of ( Bus error/Memory fault) errors used to come.

Let me know if you need any other info.

Regards
Karthik

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Bus Error- What The?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT