Luis Carvalho writes: > I know the title isn't very descriptive of my problem but i couldn't > find a better one. I'm currently working on a MUD (surprise!) and all > was working well. Suddenly, the game started to crash like hell. > Well, nothing new about that, you say. The problem is that it crashes > inside malloc. The crash is sometimes with BUS error, others with SEGFAULT. > And the worst is that it is more or less random. Sometimes it doesn't crash, > other times, it crashes. I can't find anything wrong with the code. > I forgot to mention that when malloc crashes it has been called from > either fprintf ou realloc, or things of the sort. > I've even tried changing machine, from a DGUX to a SUN OS, and it still > crashes, only more rarely. > > As anyone ever experienced this, and if so how did you solve it? I could > really use some help. I would do two things: 1) examine the system logs to try to identify a pattern of events that lead up to a crash, and 2) try different sequences of events in an attempt to identify a series of behaviors that causes a crash. The whole point is to narrow down your field of focus in searching for the bug by identifying areas of the code that are exercised shortly before a problem occurs. If both of those attempts yield no progress I would then start to comment out sections of the program in another attempt to narrow the focus. (I'm assuming that you've already tried looking at the crash location by running the program under gdb and doing a "where" when it crashes. If not that should be your first step.) Good luck. \_\_\_ _/ \_\_\_ axis data: specializing in online system setup & design \_ \_ _/ \_ \_ Edward Almasy almasy@axis.com \_\_\_ _/ \_\_\_ President: Axis Data Proprietor: NineJackNine \_ _/ _/ \_ 608-256-5732 (voice) 608-256-5697 (data) \_\_\_ _/_/_/ \_\_\_ 9jack9: on the bleeding edges of culture and technology
This archive was generated by hypermail 2b30 : 12/07/00 PST