Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

multisync changes ( r9579) #1516

Closed
wzdev-ci opened this issue Jan 30, 2010 · 19 comments
Closed

multisync changes ( r9579) #1516

wzdev-ci opened this issue Jan 30, 2010 · 19 comments

Comments

@wzdev-ci
Copy link
Contributor

resolution_fixed type_bug | by Buginator


error   |04:43:52: [map_Height] map_Height: x value is too big (138,0) in 92x92
error   |04:43:52: [map_Height] Assert in Warzone: map.c:1177 (x < world_coord(mapWidth)+(1<<7)), last script event: 'N/A'
warzone2100: map.c:1177: map_Height: Assertion `x < world_coord(mapWidth)+(1<<7)' failed.

Program received signal SIGABRT, Aborted.
0xb7fe1424 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fe1424 in __kernel_vsyscall ()
#1  0xb7ab48e0 in *__GI_raise (sig=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0xb7ab7e15 in *__GI_abort () at abort.c:88
#3  0xb7aadace in *__GI___assert_fail (
    assertion=0x82c51b8 "x < world_coord(mapWidth)+(1<<7)", 
    file=0x82c4a44 "map.c", line=1177, function=0x82c50d8 "map_Height")
    at assert.c:78
#4  0x08167079 in map_Height (x=17708, y=0) at map.c:1177
#5  0x0819c94f in offscreenUpdate (psDroid=0xac97420, dam=155, x=17708, y=0, 
    fx=0, fy=0, dir=0, order=DORDER_GUARD) at multisync.c:696
#6  0x0819c1e5 in recvDroidCheck () at multisync.c:513
#7  0x08196c58 in recvMessage () at multiplay.c:634
#8  0x081961e2 in multiPlayerLoop () at multiplay.c:298
#9  0x0815fc59 in gameLoop () at loop.c:272
#10 0x08162ba0 in runGameLoop () at main.c:769
#11 0x08163006 in mainLoop () at main.c:963
#12 0x0816376d in main (argc=1, argv=0xbffff554) at main.c:1193
(gdb) bt full
#0  0xb7fe1424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb7ab48e0 in *__GI_raise (sig=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
        resultvar = <value optimized out>
        pid = -1212362764
        selftid = 7427
#2  0xb7ab7e15 in *__GI_abort () at abort.c:88
        act # {__sigaction_handler {
            sa_handler = 0xb7afb1ad <*__GI___libc_realloc+221>, 
            sa_sigaction # 0xb7afb1ad <*__GI___libc_realloc+221>}, sa_mask {
            __val = {104, 96, 3221220576, 91, 166018728, 166018720, 104, 
              3081744603, 3082604532, 91, 166018728, 3221220780, 3081675723, 
              166018728, 91, 3221220848, 166018728, 0, 90, 4222451712, 
              166018728, 166018728, 166018728, 166018728, 166018818, 
              166018828, 166018728, 166018828, 0, 0, 0, 0], sa_flags = 0, 
          sa_restorer = 0xb7bcdc20 <root>}
        sigs # {__val {32, 0 <repeats 31 times>]
#3  0xb7aadace in *__GI___assert_fail (
    assertion=0x82c51b8 "x < world_coord(mapWidth)+(1<<7)", 
    file=0x82c4a44 "map.c", line=1177, function=0x82c50d8 "map_Height")
    at assert.c:78
        buf = 0x9e53ea8 "\360㼷\360㼷100: map.c:1177: map_Height: Assertion `x---Type <return> to continue, or q <return> to quit---
 < world_coord(mapWidth)+(1<<7)' failed.\n"
        errstr = "Unexpected error.\n"
#4  0x08167079 in map_Height (x=17708, y=0) at map.c:1177
        retVal = 2752
        tileX = 3008
        tileY = 2560
        tileYOffset = 1
        tileX2 = 0
        tileY2Offset = 2560
        dx = 20
        dy = 6
        ox = 14
        oy = 19
        h0 = -2
        hx = 2
        hy = 138
        hxy = 0
        wTL = 0
        wTR = 0
        wBL = 0
        wBR = 0
        bWaterTile = 0
        __FUNCTION__ = "map_Height"
---Type <return> to continue, or q <return> to quit---
        __PRETTY_FUNCTION__ = "map_Height"
#5  0x0819c94f in offscreenUpdate (psDroid=0xac97420, dam=155, x=17708, y=0, 
    fx=0, fy=0, dir=0, order=DORDER_GUARD) at multisync.c:696
        oldx = 2752
        oldy = 3008
        psPropStats = 0xaa24cb8
        xdiff = 0
        ydiff = -1073746168
        distSq = 136678074
        __FUNCTION__ = "offscreenUpdate"
        __PRETTY_FUNCTION__ = "offscreenUpdate"
#6  0x0819c1e5 in recvDroidCheck () at multisync.c:513
        pD = 0xac97420
        psTarget = 0x0
        y = 0
        tx = 49151
        order = DORDER_GUARD
        player = 0 '\000'
        ty = 61408
        target = 0
        fx = 0
        direction = 0
        experience = 3008
---Type <return> to continue, or q <return> to quit---
        ref = 289
        body = 155
        secondaryOrder = 159
        fy = 0
        onscreen = 0
        x = 17708
        count = 6 '\006'
        i = 0
        __FUNCTION__ = "recvDroidCheck"
#7  0x08196c58 in recvMessage () at multiplay.c:634
        type = 9 '\t'
        __FUNCTION__ = "recvMessage"
#8  0x081961e2 in multiPlayerLoop () at multiplay.c:298
        i = 8
        joinCount = 0 '\000'
        __FUNCTION__ = "multiPlayerLoop"
#9  0x0815fc59 in gameLoop () at loop.c:272
        psCurr = 0x0
        psNext = 0x8d76c80
        psCBuilding = 0xbffff2f8
        psNBuilding = 0xb7f24a5e
        psCFeat = 0x8d77118
        psNFeat = 0x20
---Type <return> to continue, or q <return> to quit---
        i = 3221222168
        widgval = 3086489664
        quitting = 0
        intRetVal = INT_NONE
        clearMode = 4
        __FUNCTION__ = "gameLoop"
        __PRETTY_FUNCTION__ = "gameLoop"
#10 0x08162ba0 in runGameLoop () at main.c:769
        __FUNCTION__ = "runGameLoop"
#11 0x08163006 in mainLoop () at main.c:963
        event # {type 4 '\004', active # {type 4 '\004', gain = 0 '\000', 
            state # 0 '\000'}, key {type # 4 '\004', which 0 '\000', 
            state # 0 '\000', keysym {scancode # 120 'x', sym 65535, 
              mod # KMOD_NONE, unicode 0], motion # {type 4 '\004', 
            which # 0 '\000', state 0 '\000', x # 376, y 173, xrel = -1, 
            yrel # 0}, button {type # 4 '\004', which 0 '\000', 
            button # 0 '\000', state 0 '\000', x # 376, y 173}, jaxis = {
            type # 4 '\004', which 0 '\000', axis # 0 '\000', value 376}, 
          jball # {type 4 '\004', which # 0 '\000', ball 0 '\000', 
            xrel # 376, yrel 173}, jhat # {type 4 '\004', 
            which # 0 '\000', hat 0 '\000', value # 0 '\000'}, jbutton {
            type # 4 '\004', which 0 '\000', button = 0 '\000', 
            state # 0 '\000'}, resize {type # 4 '\004', w 11338104, 
---Type <return> to continue, or q <return> to quit---
            h # 65535}, expose {type # 4 '\004'}, quit {type = 4 '\004'}, 
          user # {type 4 '\004', code # 11338104, data1 0xffff, 
            data2 # 0x0}, syswm {type # 4 '\004', msg 0xad0178]
#12 0x0816376d in main (argc=1, argv=0xbffff554) at main.c:1193
        __FUNCTION__ = "main"

=========

Program received signal SIGSEGV, Segmentation fault.
0x081962ab in IdToDroid (id=25, player=180, psDroid=0xbfffef98)
    at multiplay.c:336
336			while( (d != NULL ) && (d->id !=id))d=d->psNext;
(gdb) bt full
#0  0x081962ab in IdToDroid (id=25, player=180, psDroid=0xbfffef98)
    at multiplay.c:336
        i = 3221221248
        d = 0x6d614720
#1  0x0819bf2c in recvDroidCheck () at multisync.c:442
        pD = 0xac97300
        psTarget = 0x0
        tx = 0
        order = 159
        player = 180 '\264'
        ty = 1
        target = 0
        fx = 0
        direction = 3.69859423e-32
        experience = 2.71050543e-20
        ref = 25
        body = 0
        secondaryOrder = 155
        fy = 9.40395593e-38
        onscreen = 0
        count = 6 '\006'
        i = 1
        __FUNCTION__ = "recvDroidCheck"
---Type <return> to continue, or q <return> to quit---
#2  0x08196c74 in recvMessage () at multiplay.c:634
        type = 9 '\t'
        __FUNCTION__ = "recvMessage"
#3  0x081961fe in multiPlayerLoop () at multiplay.c:298
        i = 8
        joinCount = 0 '\000'
        __FUNCTION__ = "multiPlayerLoop"
#4  0x0815fc71 in gameLoop () at loop.c:272
        psCurr = 0x0
        psNext = 0x8d76c80
        psCBuilding = 0xbffff2f8
        psNBuilding = 0xb7f24a5e
        psCFeat = 0x8d77118
        psNFeat = 0x20
        i = 3221222168
        widgval = 3086489664
        quitting = 0
        intRetVal = INT_NONE
        clearMode = 4
        __FUNCTION__ = "gameLoop"
        __PRETTY_FUNCTION__ = "gameLoop"
#5  0x08162bb8 in runGameLoop () at main.c:769
        __FUNCTION__ = "runGameLoop"
---Type <return> to continue, or q <return> to quit---
#6  0x0816301e in mainLoop () at main.c:963
        event # {type 6 '\006', active # {type 6 '\006', gain = 0 '\000', 
            state # 1 '\001'}, key {type # 6 '\006', which 0 '\000', 
            state # 1 '\001', keysym {scancode # 80 'P', sym SDLK_UNKNOWN, 
              mod # KMOD_NONE, unicode 0], motion # {type 6 '\006', 
            which # 0 '\000', state 1 '\001', x # 592, y 84, xrel = 0, 
            yrel # 0}, button {type # 6 '\006', which 0 '\000', 
            button # 1 '\001', state 0 '\000', x # 592, y 84}, jaxis = {
            type # 6 '\006', which 0 '\000', axis # 1 '\001', value 592}, 
          jball # {type 6 '\006', which # 0 '\000', ball 1 '\001', 
            xrel # 592, yrel 84}, jhat # {type 6 '\006', which = 0 '\000', 
            hat # 1 '\001', value 0 '\000'}, jbutton # {type 6 '\006', 
            which # 0 '\000', button 1 '\001', state # 0 '\000'}, resize {
            type # 6 '\006', w 5505616, h # 0}, expose {type = 6 '\006'}, 
          quit # {type 6 '\006'}, user # {type 6 '\006', code = 5505616, 
            data1 # 0x0, data2 0x0}, syswm # {type 6 '\006', 
            msg = 0x540250]
#7  0x08163785 in main (argc=1, argv=0xbffff554) at main.c:1193
        __FUNCTION__ = "main"




Issue migrated from trac:1516 at 2022-04-15 21:00:39 -0700

@wzdev-ci
Copy link
Contributor Author

Buginator edited the issue description

@wzdev-ci
Copy link
Contributor Author

Buginator commented


This is between windows <-> linux.

Couldn't have a game longer than 30 secs.

@wzdev-ci
Copy link
Contributor Author

Zarel commented


In all of that, you could've at least linked to [9579]. <- Just created that link, so I could click on it. ;)

@wzdev-ci
Copy link
Contributor Author

Buginator commented


(In [9586]) Sorry, since working on other issues in multisync.c, was forced to revert [9579] because it was too unstable to play MP games with it.
refs #1516

@wzdev-ci
Copy link
Contributor Author

Buginator commented


(In [9591]) reverse merge [9578]

"Sorry, since working on other issues in multisync.c, was forced to revert [9579] because it was too unstable to play MP games with it.
refs #1516 "

@wzdev-ci
Copy link
Contributor Author

Buginator changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Buginator set resolution to fixed

@wzdev-ci
Copy link
Contributor Author

Buginator commented


Well, as you can see, I was forced to revert this patch to get any work done.

Closing ticket.

@wzdev-ci
Copy link
Contributor Author

Per changed status from closed to reopened

@wzdev-ci
Copy link
Contributor Author

Per changed resolution from fixed to ``

@wzdev-ci
Copy link
Contributor Author

Per changed status from reopened to assigned

@wzdev-ci
Copy link
Contributor Author

Per changed owner from `` to Per

@wzdev-ci
Copy link
Contributor Author

Buginator commented


was testing this again, and this time around, I got this:


error   |12:52:40: [gridRemoveObject] Grid out of sync at (3,1):11 removing Truck(163246)
error   |12:52:40: [gridRemoveObject] Assert in Warzone: mapgrid.c:236 (0), last script event: 'N/A'
warzone2100: mapgrid.c:236: gridRemoveObject: Assertion `0' failed.

Program received signal SIGABRT, Aborted.
0xb7fe1424 in __kernel_vsyscall ()
(gdb) bt full
#0  0xb7fe1424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb7ab48e0 in *__GI_raise (sig=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
        resultvar = <value optimized out>
        pid = -1212362764
        selftid = 8611
#2  0xb7ab7e15 in *__GI_abort () at abort.c:88
        act # {__sigaction_handler {
            sa_handler = 0xb7afb1ad <*__GI___libc_realloc+221>, 
            sa_sigaction # 0xb7afb1ad <*__GI___libc_realloc+221>}, sa_mask {
            __val = {104, 81, 3221220784, 69, 184067232, 184067224, 104, 
              3081744603, 3082604532, 69, 184067232, 3221220988, 3081675723, 
              184067232, 69, 3221221056, 184067232, 0, 68, 4222451712, 
              184067232, 184067232, 184067232, 184067232, 184067300, 
              184067332, 184067232, 184067332, 0, 0, 0, 0], sa_flags = 0, 
          sa_restorer = 0xb7bcdc20 <root>}
        sigs # {__val {32, 0 <repeats 31 times>]
#3  0xb7aadace in *__GI___assert_fail (assertion=0x82c57af "0", 
    file=0x82c56ec "mapgrid.c", line=236, 
    function=0x82c575e "gridRemoveObject") at assert.c:78
        buf = 0xaf8a4a0 ""
        errstr = "Unexpected error.\n"
---Type <return> to continue, or q <return> to quit--- 
#4  0x08169ad3 in gridRemoveObject (psObj=0xafb6730) at mapgrid.c:236
        psCurr = 0xaf61078
        i = 11
        x = 3
        y = 1
        __FUNCTION__ = "gridRemoveObject"
        __PRETTY_FUNCTION__ = "gridRemoveObject"
#5  0x080f5636 in removeDroidBase (psDel=0xafb6730) at droid.c:472
        psCurr = 0x37f0c7f
        psNext = 0xbfffef88
        psGroup = 0x8101da1
        psStruct = 0xafb6730
        __FUNCTION__ = "removeDroidBase"
        __PRETTY_FUNCTION__ = "removeDroidBase"
#6  0x080f58b6 in destroyDroid (psDel=0xafb6730) at droid.c:545
No locals.
#7  0x080f4b12 in droidDamage (psDroid=0xafb6730, damage=22, weaponClass=0, 
    weaponSubClass=0, impactSide=HIT_SIDE_LEFT) at droid.c:212
        relativeDamage = -0.0709677413
        __FUNCTION__ = "droidDamage"
#8  0x081b26e2 in objectDamage (psObj=0xafb6730, damage=22, weaponClass=0, 
    weaponSubClass=0, impactSide=HIT_SIDE_LEFT) at projectile.c:1716
        __FUNCTION__ = "objectDamage"
---Type <return> to continue, or q <return> to quit---
        __PRETTY_FUNCTION__ = "objectDamage"
#9  0x081b10d0 in proj_ImpactFunc (psObj=0xac8a910) at projectile.c:1181
        damage = 22
        psStats = 0xaa51310
        i = 135999314
        iAudioImpactID = 140916240
        relativeDamage = 6.92766208e-34
        position # {x 5339, y # 7, z 3581}
        scatter # {x 0, y # 0, z 0}
        imd = 0x8
        impactSide = HIT_SIDE_LEFT
        __FUNCTION__ = "proj_ImpactFunc"
        __PRETTY_FUNCTION__ = "proj_ImpactFunc"
#10 0x081b1fef in proj_Update (psObj=0xac8a910) at projectile.c:1442
        __FUNCTION__ = "proj_Update"
#11 0x081b2019 in proj_UpdateAll () at projectile.c:1460
        psObj = 0xac8a910
        psPrev = 0x7
#12 0x081601ff in gameLoop () at loop.c:444
        psCurr = 0x0
        psNext = 0x0
        psCBuilding = 0x0
        psNBuilding = 0x0
---Type <return> to continue, or q <return> to quit---
        psCFeat = 0x8d771f8
        psNFeat = 0x20
        i = 8
        widgval = 3086489664
        quitting = 0
        intRetVal = INT_NONE
        clearMode = 4
        __FUNCTION__ = "gameLoop"
        __PRETTY_FUNCTION__ = "gameLoop"
#13 0x08162bc0 in runGameLoop () at main.c:769
        __FUNCTION__ = "runGameLoop"
#14 0x08163026 in mainLoop () at main.c:963
        event # {type 6 '\006', active # {type 6 '\006', gain = 0 '\000', 
            state # 1 '\001'}, key {type # 6 '\006', which 0 '\000', 
            state # 1 '\001', keysym {scancode = 216 '\330', 
              sym # SDLK_UNKNOWN, mod KMOD_NONE, unicode # 0], motion {
            type # 6 '\006', which 0 '\000', state # 1 '\001', x 472, 
            y # 110, xrel 0, yrel # 0}, button {type = 6 '\006', 
            which # 0 '\000', button 1 '\001', state # 0 '\000', x 472, 
            y # 110}, jaxis {type # 6 '\006', which 0 '\000', 
            axis # 1 '\001', value 472}, jball # {type 6 '\006', 
            which # 0 '\000', ball 1 '\001', xrel # 472, yrel 110}, 
          jhat # {type 6 '\006', which # 0 '\000', hat 1 '\001', 
---Type <return> to continue, or q <return> to quit---
            value # 0 '\000'}, jbutton {type # 6 '\006', which 0 '\000', 
            button # 1 '\001', state 0 '\000'}, resize # {type 6 '\006', 
            w # 7209432, h 0}, expose # {type 6 '\006'}, quit = {
            type # 6 '\006'}, user {type # 6 '\006', code 7209432, 
            data1 # 0x0, data2 0x0}, syswm # {type 6 '\006', 
            msg = 0x6e01d8]
#15 0x0816378d in main (argc=3, argv=0xbffff544) at main.c:1193
        __FUNCTION__ = "main"

The assert was on both machines.

I am out of time for tonight, but I will continue to figure out what is wrong...

I attached the patch from the revert, so you can apply to 2.3 without merging

@wzdev-ci
Copy link
Contributor Author

Buginator uploaded file persSync.patch (10.2 KiB)

@wzdev-ci
Copy link
Contributor Author

Buginator commented


Forgot to mention, this is a 8p game, clover map applied to [9603]

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Feb 1, 2010

Per commented


Ah, of course. In 2.3 you still need the gridMoveDroid(psDroid, (SDWORD)oldx,(SDWORD)oldy); call the grid system. Sorry about that. I did my MP testing on trunk only.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Feb 6, 2010

Per changed status from assigned to closed

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Feb 6, 2010

Per changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Feb 6, 2010

Per commented


(In [9681]) 2.3: Fix offscreen multisync for most orders, that was being overwritten immediately after being
received. Closes #1505 and closes #1516

@wzdev-ci wzdev-ci closed this as completed Feb 6, 2010
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant