Raised This Month: $ Target: $400
 0% 

Compiling plugins causes a Segfault!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Neo-Vortex
Senior Member
Join Date: Jun 2004
Location: Australia
Old 09-30-2005 , 18:37   Compiling plugins causes a Segfault!
Reply With Quote #1

Running on FreeBSD 5.4, everything works fine except compiling plugins...

I have managed to do this before without any issues last time i tried (0.20 i believe), however when i try it now, i get a seg fault:

eg:
# cd cstrike/addons/amxmodx/scripting
# ./amxxpc admin.sma
Welcome to the AMX Mod X 1.60-300 Compiler.
Copyright (c) 1997-2005 ITB CompuPhase, AMX Mod X Team

Segmentation fault (core dumped)
#

In fact, the file dosen't even have to exist, blah.sma (does not exist) will do the exact same thing... - tried brandelf'ing it and the .so files...

While poking around the source to see if i could make a debug version, i noticed there is both amxxpc and amxxsc... difference?
Neo-Vortex is offline
Neo-Vortex
Senior Member
Join Date: Jun 2004
Location: Australia
Old 10-01-2005 , 02:33  
Reply With Quote #2

Ok, i've managed to get a debug version compiled (i compiled it under linux as well as compiled under freebsd natively, both gave the exact same results) and the .so files

GDB Output of core file - backtrace:
Quote:
(gdb) bt
#0 0x28142164 in strncpy () from /lib/libc.so.5
#1 0x2818bbfe in setconfig (root=0xbfbfec60 "./amxxpc") at sc1.c:1230
#2 0x28189a0b in pc_compile (argc=2, argv=0xbfbfeb70) at sc1.c:439
#3 0x281b029d in Compile32 (argc=2, argv=0xbfbfeb70) at libpawnc.c:58
#4 0x0804ce7b in main (argc=2, argv=0xbfbfeb70) at amxxpc.cpp:83
(gdb) bt full
#0 0x28142164 in strncpy () from /lib/libc.so.5
No symbol table info available.
#1 0x2818bbfe in setconfig (root=0xbfbfec60 "./amxxpc") at sc1.c:1230
path = '\0' <repeats 484 times>, "¶\030\020(\fÛ\026(\216\v\020(\000p\a\b", '\0' <repeats 16 times>, "à\000\000\000\005\000\000\000\fÛ\026(\030\00 0\000\000\000\000\000\000¨Þ¿¿_\016\020(\030", '\0' <repeats 11 times>, "\022\016\020(\000\000\000\000\000\000\000\00 0\000`\a\b\fÛ\026(\000`\a\b\000\000\000\000èÞ ¿¿%\f\020(\030", '\0' <repeats 11 times>, "\216\v\020(@\000\000\000r\216\006(\030\000\0 00\000\000`\a\b\006\000\000\000\220\005\000\0 00\004\000\000\000\fÛ\026(\n\000\000\000\000\ 000\000\000\030ß¿¿_\016\020(\n\000\000\000¡\2 15\006(\177´\v(\022\016\020(\000\204\b(\001\0 00\000\000\000\000"...
ptr = 0x0
base = 0x6766 <Address 0x6766 out of bounds>
len = 1663987319
#2 0x28189a0b in pc_compile (argc=2, argv=0xbfbfeb70) at sc1.c:439
entry = -1077941392
i = 2
jmpcode = 0
retcode = 1
incfname = "default.inc\000\001\000\000\000\001\000\000\ 000\000\202\b(\fÛ\026(xÙ\026(\0000\a\bhæ¿¿\tZ \006(\000\202\b(\b\030\000\000xÙ\026(xÙ\026(\ 001\000\000\000\006\002\000\000\000\202\b(ÔV\ 017(\032ñ\025(\001\000\000\000\0000\a\b\001\0 00\000\000\000À\b(\001\000\000\000\fÛ\026(\23 0æ¿¿[ò\025(xÙ\026(\0000\a\b\001\000\000\000\nò\025 (\000\034\000\000xÙ\026(xÙ\026(\fÛ\026(\001\0 00\000\000\0000\a\bÈæ¿¿]é\025(xÙ\026(\0000\a\b\001\000\000\000òè\025( \000\v\000\000\000\000\000\000xÙ\026(\fÛ\026( Hé¿¿\001\000\000\000"...
reportname = '\0' <repeats 696 times>, "r\216\006(¾µ\v(¶Ù\033(\000\000\000\000ö\215\ 006(\000\000\000\000dÆ\033(\000\000\000\001Ø\ 025\b(ð\220\b(\000\000\000\000\024å¿¿\020\221 \b(\024å¿¿\207\215\006(|å¿¿r\216\006(¾µ\v(\22 0?\006(4å¿\001ö\215\006(\024i\v(@5\006(¤å¿\00 1Ø\025\b(\000\000\000\000 \031\b(¤å¿¿\021\215\006(Üs\006(¤å¿¿ \215\006(@5\006(L\224\v(\000\200\b(\000\201\b (\000\202\b(\000\203\b(\000\204\b(äå¿\001Ø\02 5\b(\001\000\000\000\004\203\v(ôå¿¿\022\213\0 06(\000\202\b(\024i\v(\020\002"...
codepage = '\0' <repeats 12 times>
binf = (FILE *) 0x0
inpfmark = (void *) 0x0
lcl_packstr = 0
lcl_needsemicolon = 0
lcl_tabsize = 0
hdrsize = 0
__func__ = "pc_compile"
#3 0x281b029d in Compile32 (argc=2, argv=0xbfbfeb70) at libpawnc.c:58
No locals.
#4 0x0804ce7b in main (argc=2, argv=0xbfbfeb70) at amxxpc.cpp:83
lib = 0x28088300
lib64 = 0x8062520
sc64 = 0x2808c000
pl64 = {stp = 672522348, cellsize = 20 '\024', size = 671508192, cmpsize = 672521970, data = 0x2 <Address 0x2 out of bounds>,
cmp = 0xbfbfeb14 "4ë¿¿u\214\004\b`\020\006\bp%\006\b\002"}
sc32 = 0x281b027c <Compile32>
file = 0xbfbfeb14 "4ë¿¿u\214\004\b`\020\006\bp%\006\b\002"
newfile = 0x28069cd5 "\215v"
fp = (FILE *) 0xbfbfeae4
bh64 = {cellsize = 0 '\0', imagesize = 671521355, disksize = 671618520, memsize = 1, offs = 134513904}
pl32 = {stp = 134620528, cellsize = 0 '\0', size = 0, cmpsize = 672522390, data = 0xbfbfeb20 "p%\006\b\002",
cmp = 0xbfbfeb34 "pë¿¿|ë¿¿ê\213\004\b(µ\005\bdë¿¿"}
bh32 = {cellsize = 4 '\004', imagesize = 671645696, disksize = -1077941564, memsize = 1, offs = 671679550}
(gdb)
Any ideas?

Edit:
strncpy(path,SELFPATH,sizeof path);
is the line that causes the crash
Neo-Vortex is offline
Tigerfyr
Junior Member
Join Date: Oct 2005
Old 10-28-2005 , 10:43  
Reply With Quote #3

Got the same result... I can run ./amxxpc without any paremeter, and then it'll ask for some: -? or --help. When trying the ./amxxpc --help, it displays all the different options. The problem appears when trying to compile a .sma file.
Tigerfyr is offline
Podunk
Senior Member
Join Date: Nov 2005
Location: Florida
Old 11-13-2005 , 19:55  
Reply With Quote #4

I'm also having the same exact problem
Podunk is offline
Send a message via MSN to Podunk
Reply



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode