project-navigation
Personal tools

Author Topic: [Fixed] r28676 unable to run in debugger  (Read 4379 times)

Offline mark.hawrylak

  • Rookie
  • ***
  • Posts: 18
    • View Profile
[Fixed] r28676 unable to run in debugger
« on: February 20, 2010, 01:40:14 am »
I cannot start the game in debugger, this issue is only occuring when I am running the game in the code blocks debugger
running code blocks version 5731.
I have also tested and am experiencing the same issue when I remove my C:\Documents and Settings\mark\Application Data\UFOAI folder

Building to ensure sources are up-to-date
Build succeeded
Selecting target:
windows_debug
Adding source dir: C:\development\ufoai\build\projects\
Adding source dir: C:\development\ufoai\
Changing directory to: ../../
Adding file: ..\..\ufo.exe
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.0
Program received signal SIGSEGV, Segmentation fault.
At C:\development\ufoai\src\common\cvar.c:320
#0  0x004f8822 in Cvar_Delete (var_name=0x12bed051 "tmp") at C:\development\ufoai\src\common\cvar.c:320
        changeListener2 = 0x251f12
        changeListener = 0xfeeefeee
        hash = 40
        var = 0x2a1d1f1c
        previousVar = 0x0
#1  0x00495515 in MN_ExecuteInjectedAction (action=0x34dd7e8, context=0x22fac0) at C:\development\ufoai\src\client\menu\m_actions.c:508
        cvarname = 0x12bed051 "tmp"
#2  0x00495699 in MN_ExecuteInjectedActions (firstAction=0x34dd4a8, context=0x22fac0) at C:\development\ufoai\src\client\menu\m_actions.c:563
        callnumber = 1
        action = 0x34dd7e8
#3  0x004956df in MN_ExecuteConFuncActions (source=0x31ee3c4, firstAction=0x34dd4a8) at C:\development\ufoai\src\client\menu\m_actions.c:576
        context = {
          source = 0x31ee3c4,
          useCmdParam = qtrue,
          params = 0x0,
          paramNumber = 24580932
        }
#4  0x004b6d53 in MN_ConfuncCommand_f () at C:\development\ufoai\src\client\menu\node\m_node_special.c:80
        node = 0x31ee3c4
#5  0x004edcf8 in Cmd_ExecuteString (text=0x22fb5c "numonteam 1") at C:\development\ufoai\src\common\cmd.c:971
        cmd = 0x19f40d04
        a = 0x2e322f49
        str = 0x2a0f5dd4 "numonteam"
        hash = 20
#6  0x0049b53d in MN_ExecuteConfunc (fmt=0x5e8d6c "numonteam 1") at C:\development\ufoai\src\client\menu\m_main.c:263
        ap = 0x22fd74 ""
        confunc = "numonteam 1\000\000\000\000\000\005\000\000\000\204û\"\000\244\320\302wV\345\302w\000 W\020\270û\"\000T\321\302w\005\000\000\000q\321\302w\000\000\000\000 ý\305w\022\037%\000\000\000\000\000\220û\"\000p \301w\370û\"\000\224\\\303w\310 \301w\377\377\377\377q\321\302w.\245\303w\330\255\347\031\320û\"\000g\271\303w\025\000\000\000\bü\"\000\000\v\304w ý\305w\326\n\304w\000\000\000\000\000\000\000\000\022\037%\000\000\000\000\000\340û\"\000\000&\200|\340\377\"\000\224\\\303w\300E\301w\377\377\377\377\326\n\304w\345\253O\000 ý\305wpü\"\000\070ü\"\000<", '\000' <repeats 11 times>...
#7  0x0041784d in CL_Reset (self=0x5e7698, msg=0x19e7ca2c) at C:\development\ufoai\src\client\battlescape\events\event\player\e_event_reset.c:40
No locals.
#8  0x00414506 in CL_ParseEvent (msg=0x19e7ca2c) at C:\development\ufoai\src\client\battlescape\events\e_parse.c:205
        now = qtrue
        eventData = 0x5e7698
        eType = 1
#9  0x0041065f in CL_ParseServerMessage (cmd=9, msg=0x19e7ca2c) at C:\development\ufoai\src\client\battlescape\cl_parse.c:281
        s = 0x19e7ca2c "\003"
        i = 150994949
#10 0x004896c1 in CL_ReadPackets () at C:\development\ufoai\src\client\cl_main.c:425
        cmd = 9
        msg = 0x19e7ca2c
#11 0x0048b013 in CL_Frame (now=107249, data=0x0) at C:\development\ufoai\src\client\cl_main.c:1079
        lastFrame = 107249
        delta = 15017
#12 0x004f7455 in tick_timer (now=107249, data=0x1f7a0a64) at C:\development\ufoai\src\common\common.c:1003
        timer = 0x1f7a0a64
        old_interval = 20
        lateness = 3674
#13 0x004f78c3 in Qcommon_Frame () at C:\development\ufoai\src\common\common.c:1154
        time_to_next = 0
        event = 0x1f90ff5c
#14 0x0051bfa1 in WinMain@16 (hInstance=0x400000, hPrevInstance=0x0, lpCmdLine=0x251f12 "", nCmdShow=10) at C:\development\ufoai\src\ports\windows\win_main.c:358
No locals.
#15 0x005b0db8 in main ()
No symbol table info available.
« Last Edit: February 24, 2010, 03:48:21 am by mark.hawrylak »

Offline mark.hawrylak

  • Rookie
  • ***
  • Posts: 18
    • View Profile
Re: r28633 unable to run in debugger
« Reply #1 on: February 20, 2010, 01:48:34 am »
I am downloading the new code blocks download and will report my results here.

Offline mark.hawrylak

  • Rookie
  • ***
  • Posts: 18
    • View Profile
Re: r28633 unable to run in debugger
« Reply #2 on: February 20, 2010, 08:48:32 am »
the issue is resolved after I downloaded codebocks 6088 from the forum
please note that the code blocks from the wiki 
http://mattn.ninex.info/download/codeblocks.zip
on the page http://ufoai.ninex.info/wiki/index.php/Code::Blocks is version 6080 which does not work properly

this version
http://www.destructavator.com/92dl/codeblocks_6088.zip
from the form post http://ufoai.ninex.info/forum/index.php?topic=4282.30 is the correct code blocks to use.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: [fixed] r28633 unable to run in debugger
« Reply #3 on: February 20, 2010, 09:13:28 am »
i've fixed the other files - thanks

Offline mark.hawrylak

  • Rookie
  • ***
  • Posts: 18
    • View Profile
Re: [fixed] r28633 unable to run in debugger
« Reply #4 on: February 22, 2010, 03:01:50 am »
I am still getting the above segfault with codeblocks 6088 version.
I have another reproducable segfault to report, but I cannot report it while I cannot enter a map in debugger.
I can at least start the game, the issue occurs while entering a skirmish map.

Offline dodon

  • Rookie
  • ***
  • Posts: 48
    • View Profile
Re: [open] r28676 unable to run in debugger
« Reply #5 on: February 22, 2010, 08:32:19 am »
Program received signal SIGSEGV, Segmentation fault.
At C:\development\ufoai\src\common\cvar.c:320
#0  0x004f8822 in Cvar_Delete (var_name=0x12bed051 "tmp") at C:\development\ufoai\src\common\cvar.c:320
        changeListener2 = 0x251f12
        changeListener = 0xfeeefeee
        hash = 40
        var = 0x2a1d1f1c
        previousVar = 0x0

I got the same error message.

I havn't touched C-Code for a long long time, but i think there is a reason for this message.

If you look a the code (cvar.c line 317 - 323)
Quote
         Mem_Free(var);
         changeListener = var->changeListener;
         while (changeListener) {
            cvarChangeListener_t *changeListener2 = changeListener->next;
            Mem_Free(changeListener);
            changeListener = changeListener2;
         }
First var is freed and then it is accessed.
As a solution I moved Mem_Free(var); after the while block.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: [open] r28676 unable to run in debugger
« Reply #6 on: February 22, 2010, 05:23:51 pm »
thanks - stupid bug - fixed in r28678

Offline mark.hawrylak

  • Rookie
  • ***
  • Posts: 18
    • View Profile
Re: [open] r28676 unable to run in debugger
« Reply #7 on: February 24, 2010, 03:47:59 am »
yep that fixed it   thanks guys