30 Oct, 2014, koqlb wrote in the 1st comment:
Votes: 0
Okay, so I've been racking my brain like crazy trying to figure out what the heck in gedit
has been crashing my MUD. Everytime I typed "l" to pull up
"gedit_list"
It crashed my MUD…. For anyone having the same problem with the snippet
After about 8 hours of yanking my hair out (and there's not much to pull!),
I've narrowed it down. Numerous sections of the code has a "\t" which stands
for tab in the list. I tried removing them from "gedit_list" and STILL was crashing…

So, I typed "grep clan" *.c and found all the files that had clan in them….
olc.c, olc_save.c, and guild.c. You can't "grep" for '\t' as it pulls up EVERY letter
t that there is… So by doing this, just search for 'clan' without the quotes.
Notice all of the '\t' flags that are in there. Delete those, and replace with about four
spaces (or 5 if you prefer), and then save the files.
Remove ALL your *.o and do a clean re-compile.
Then start up the MUD as normal. By the way, if you are running gdb
at the time and just try reloading the rom file, and re-running it,
it'll fubar the port. You HAVE to quit gdb, or kill your MUD already running,
and then restart the MUD fresh.

Hope this helps, as I'm finally relieved!
–Justin, a.k.a. Koqlb
koqlb@subversive.themudhost.net
….
31 Oct, 2014, Lyanic wrote in the 2nd comment:
Votes: 0
Were you not able to get a core dump and stack trace via gdb, though?
31 Oct, 2014, koqlb wrote in the 3rd comment:
Votes: 0
Nope. It kept telling me that there was an error in vprintf only when removing the \t in olc_act.c. THEN it gave me the core dump.
Otherwise, it just hung.
31 Oct, 2014, koqlb wrote in the 4th comment:
Votes: 0
It told me that vprintf.c file was not found and blah blah blah '\t' blah blah. So I figured there were more tab hashes in there, and when i searched for clan
lo and behold there were about 6 more.
31 Oct, 2014, Davion wrote in the 5th comment:
Votes: 0
Post the gdb output and offending lines.
31 Oct, 2014, koqlb wrote in the 6th comment:
Votes: 0
I can't. I fixed it this morning. :P
31 Oct, 2014, alteraeon wrote in the 7th comment:
Votes: 0
What you're describing (replacing tabs with spaces in print statements) almost certainly did not fix your problem. At best, you've just hidden the issues so they'll happen later or differently in the future. You can expect to see similar crashes in the future until you fix the actual root cause.
31 Oct, 2014, koqlb wrote in the 8th comment:
Votes: 0
I wasn't even able to file it because '\t' could not be found in the my host system's vprintf.c file. Therefore, by removing the "\t" and replacing them with spaces DID work, because it allowed the code to run, and I can use "gedit list" correctly now. The problem is that my host's system file for vprintf.c probably doesn't have an identifier to convert tabs into the proper spaces. Either way, I've been debugging the crap out of it, and it works great.
31 Oct, 2014, koqlb wrote in the 9th comment:
Votes: 0
It's not that it's replacing tabs. It's that the actual characters in the code looked like this:
for (i=1; i <= MAX_CLAN; i++)
{
if (clan_table[i].name != NULL && clan_table[i].name[0] != '\0')
{
sprintf(buf,"[%2d] %s\t Flags:\t[%s]\n\r",
i,
clan_table[i].name,
flag_string( guild_flags, clan_table[i].flags ) );
add_buf(buffer, buf);
}
}


All I did was remove the \t and actually placed 5 spaces. Worked fine. In all the other .c files that included this (the clan system is the only thing that had this)
I did the same. It worked.
01 Nov, 2014, Lyanic wrote in the 10th comment:
Votes: 0
That's a hackish fix. But whatever.
01 Nov, 2014, koqlb wrote in the 11th comment:
Votes: 0
I can't change the files on my host's server…. I'm not the root user.
01 Nov, 2014, Kaz wrote in the 12th comment:
Votes: 0
Tabs wasn't your problem. The <= and/or index starting at 1 in your loop was more likely the problem.
01 Nov, 2014, alteraeon wrote in the 13th comment:
Votes: 0
Koqlb, what you're talking about, replacing the '\t' with spaces, is also known as "replacing tab characters with spaces". Yes, your system's vprintf supports it. No, you probably couldn't find it in the vprintf file at your skill level.

As pointed out above, your code might now be running, but this in no way fixes the problem. Your best option at this point would be to put the tab characters back to get it to crash again, then figure out what's actually wrong. Being able to duplicate an issue reliably goes a long way toward fixing it.

Alternately, you could just ignore me and the other people on this board. It's not like any of us know anything, after all we're only professional C programmers.
01 Nov, 2014, koqlb wrote in the 14th comment:
Votes: 0
It's not my skill level, it's because I don't have access to the file on themudhost.net… but the funny thing is that it wasn't even that file, it was in act_info.c where the problem was. I'm not going to ignore the problem, I'll get to the bottom of it. Thanks.
02 Nov, 2014, Ssolvarain wrote in the 15th comment:
Votes: 0
alteraeon said:
It's not like any of us know anything, after all we're only professional C programmers.


I'm a professional builder, and people ignore me all the time. Get over it.
02 Nov, 2014, Lyanic wrote in the 16th comment:
Votes: 0
Ssolvarain said:
alteraeon said:
It's not like any of us know anything, after all we're only professional C programmers.


I'm a professional builder, and people ignore me all the time. Get over it.

Builder < Programmer. Learn your place, n00b. :-p

Seriously, though, the keyword was 'professional'. You're not a professional builder, because that's not a skill that translates outside of MU*s. Many of us actually are professional programmers. It's something we do for a living outside of MU*s. There's no need getting defensive over that.
03 Nov, 2014, Ssolvarain wrote in the 17th comment:
Votes: 0
Just fucking with you, calm down.
04 Nov, 2014, Lyanic wrote in the 18th comment:
Votes: 0
I'm quite calm. I thought the first part of my response was very obviously tongue-in-cheek.
04 Nov, 2014, Ssolvarain wrote in the 19th comment:
Votes: 0
REALLY?!
0.0/19