Quick dev update

    schema

    Cat God
    Joined
    Feb 17, 2012
    Messages
    1,552
    Reaction score
    2,604
    • Schine
    Hello players,

    we are currently finalizing the new version with lots of bugfixes. There are still a few bugs that need fixing. One of them is the "Fleets losing turrets" bug, which we have almost resolved. Because it's partially fixed, it's getting harder to reproduce, but we won't release before that is fixed.

    Since this is so hard to reproduce we would be thankful for any help on the current pre-build, especially clean server or singleplayer logs of this bug happening. The task is here for more information.

    To test, check out the current pre build from the pre-build branch. There is a new admin command '/fleet_debug_move x y z' which sends the fleet of the selected ship on a patrol between the current sector and the target sector. It will also engage a special debug mode, shutting down the game to preserve logs, should the game notice a change in the docking of those ships. Debug stops either when restarting the game or using '/fleet_debug_stop' on either ship of the fleet.

    We suspect that the bug is still caused when jumping away either when the fleet is still loaded and above to move into an unloaded sector, or slightly after that.

    Thanks for helping and thanks for playing StarMade,
    - schema
     
    Joined
    Sep 10, 2014
    Messages
    226
    Reaction score
    398
    • Supporter
    • Master Builder Bronze
    • Competition Winner - Small Fleets
    I´ve started to send a ship around while building on my stuff. If someone isn´t sure what to do with this news, the pre build seems nice and stable for me on SP so playing/building on it and have some debug commands running in the background isn´t that big of a deal.

    Just make sure that the debug ship won´t bump all the stuff in your build sector :davehurr:.
     
    Joined
    Dec 14, 2014
    Messages
    745
    Reaction score
    158
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 2
    We suspect that the bug is still caused when jumping away either when the fleet is still loaded and above to move into an unloaded sector, or slightly after that.
    - schema
    Why not then make sure the fleet is fully loaded before moving and remove that possibility?
    Since you seem to have a good bit of parallelism going on did you fence the instructions to ensure order of operation? Meaning the ship loads first before script starts?

    If this is a bug like that it may show up more on slower built systems. The reason being is that the ships would take longer to load in.

    For those testing this. It might be advantageous to get a couple people and set them up at several points along the path recording while in cloaked ships. Since it is hard to duplicate let the ships keep going back and forth.
     
    Last edited:

    schema

    Cat God
    Joined
    Feb 17, 2012
    Messages
    1,552
    Reaction score
    2,604
    • Schine
    The operation should actually be synchronized on fleet movement with docked stuff, but is seemingly something causing that to fail depending on the situation. I'm trying to find out what that situation is. The partial fix was a bug in the synchronization itself not reaching all docked entities in the SQL database of a root entity. After fixing that it seems that it's now working when the fleet goes to you.

    The movement in the database is always the root plus all of the docks in one and the same operation in a synchronized state, so theoretically there shouldn't go something wrong when jumping to the fleet, but there is still something. I just don't know where.
     
    • Like
    Reactions: GRHayes
    Joined
    Dec 14, 2014
    Messages
    745
    Reaction score
    158
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 2
    The operation should actually be synchronized on fleet movement with docked stuff, but is seemingly something causing that to fail depending on the situation. I'm trying to find out what that situation is. The partial fix was a bug in the synchronization itself not reaching all docked entities in the SQL database of a root entity. After fixing that it seems that it's now working when the fleet goes to you.

    The movement in the database is always the root plus all of the docks in one and the same operation in a synchronized state, so theoretically there shouldn't go something wrong when jumping to the fleet, but there is still something. I just don't know where.
    Installing it at present. Will let it run over the weekend. I have to also get ready for family coming out.

    Even if we see it visually happen it probably won't tell you much. So it would come down to debug data. Unless that is setup to catch what I am thinking of it won't might miss what I am talking about.

    I don't know how you have this actually coded so I am going to have to guess a bit.
    I also don't know what database specifically you are using haven't look and I don't know if you implemented any thread safe stuff or anything to prevent a race condition with it. If you haven't or it doesn't have any that could be your issue right there.

    A database is a resource much like the display of a terminal or file I/O. One thread can interfere with the operation of another thread. Unlike the display and cout in c++ the database won't finish up what it was doing in the previous operation if it was interfered with. (that depends on database)

    If the database doesn't have that ability or it isn't turned on it won't happen then you need to setup a mux to prevent one thread from accessing the database before the operations is complete. It needs to validate the move is complete before letting the mux go.

    I am guessing you have a separate operation that once the data base is done loading actually handles the display and after that the AI should run to move the ships. If any of those are in different threads and their are no fences in place then the order of operation is not ensured.

    In short what you need is something like this to prevent it.
    Mux on access to database operation.

    databaseMove()
    fence
    displayObject()
    fence
    AIMove()
    [doublepost=1492279066,1492277813][/doublepost]Got the following error when starting a new world. None of the buttons work. Had to exit by using task manager to end task.
    Tried it again sent in logs on bug report. Screen lit up like a christmas tree with the errors.
    Yep, I would bet this is a race condition issue.

     
    Last edited:

    Az14el

    Definitely not a skywanderers dev
    Joined
    Apr 25, 2015
    Messages
    848
    Reaction score
    325
    • Legacy Citizen 2
    • Purchased!
    • Community Content - Bronze 1
    Hello players,

    we are currently finalizing the new version with lots of bugfixes. There are still a few bugs that need fixing. One of them is the "Fleets losing turrets" bug, which we have almost resolved.
    based, this one in particular has been such a pain in the a, even after swapping most of my drone ships to single entity ones it still prevents me from making use of fleets for moving my player piloted ships around (which is super nice when it's not a rail parts risk!), remember it rearing its ugly head in a less-reproducible form as early as Q1 2016
     

    schema

    Cat God
    Joined
    Feb 17, 2012
    Messages
    1,552
    Reaction score
    2,604
    • Schine
    The exception is due to trying out a safety fallback. I'll fix it asap.

    (@GRHayes Thanks for trying to help, but what you describe is already like this in the code, as I have made the code thread safe long ago, although it can have holes depending on granularity, but that is unlikely the case here. the original fix didnt have anything to do with multithreading.
    I coded the whole networklayer in threads, which would be impossible if it hadn't been made thread safe. Bugs like these are bit more complex than this unfortunately as there are several things from different modules that all work together in loading/unloading entities. There is also nothing to display since all this happens on the server.)
     
    Last edited:

    Lecic

    Convicted Lancake Abuser
    Joined
    Apr 14, 2013
    Messages
    5,115
    Reaction score
    1,229
    • Thinking Positive Gold
    • Purchased!
    • Legacy Citizen 11
    You gonna throw us a bone with any tiny new feature or block? Perhaps some super cool, totally unexpected aesthetic block that we definitely don't know is coming?
    There's new features coming in the update that are already in the pre-release. Read the pre-release changelog.
     
    Joined
    Dec 14, 2014
    Messages
    745
    Reaction score
    158
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 2
    The exception is due to trying out a safety fallback. I'll fix it asap.

    (Thanks for trying to help, but I have made the code thread safe long ago, but it can have holes depending on granularity. This is one possible hole I'm trying to fix (the original fix didnt have anything to do with multithreading even). I know how synchronization and databases work. And i know how to use locks. This is a bit more complex than this unfortunately as there are several things from different modules that all work together in loading/unloading entities. There is also nothing to display since all this happens on the server.)
    You couldn't have made it this far if you didn't know how. Just so many times I see this issue crop up. It only takes a small over site for re-occurrences. The absolute best of programmers still get caught with it at times. If you think I am kidding check out the CPPCON videos on youtube some time. Its a more than little discussed topic.

    What I meant by display is to have a memory model in memory to deal with collisions and so on like that. Otherwise I wouldn't see a need to store more than its coords and vectors of the main ship all docked entities would be relative to it. That's just me though.
     

    schema

    Cat God
    Joined
    Feb 17, 2012
    Messages
    1,552
    Reaction score
    2,604
    • Schine
    Yeah, I'm in no way saying that the code is error free of course. this bug is likely caused by an oversight of me somewhere. However, the system itself is thread safe in design, the error is more in the detail.
     
    Joined
    Dec 14, 2014
    Messages
    745
    Reaction score
    158
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 2
    Yeah, I'm in no way saying that the code is error free of course. this bug is likely caused by an oversight of me somewhere. However, the system itself is thread safe in design, the error is more in the detail.
    I've yet to see anyone write anything of any significant size that didn't have some bug in it.
    The fun part comes when you have a library or code that was safe a while back and they change the rules and suddenly that safe code has holes in it.
     
    Last edited:

    Lecic

    Convicted Lancake Abuser
    Joined
    Apr 14, 2013
    Messages
    5,115
    Reaction score
    1,229
    • Thinking Positive Gold
    • Purchased!
    • Legacy Citizen 11
    Can we salvage (salvage beam) overheating NPC faction ships yet?
    Yeah, this bug is really annoying. What's worse is that when you try and reboot the ship so you can salvage it manually, they will regularly immediately fly off to go fight something, despite no longer being in a faction.

    Can you PLEASE make ships get kicked from their fleet when they overheat or have their faction wiped? It makes salvaging or reclaiming AI ships essentially impossible, as well as any player ship that's in a fleet.
     
    Joined
    Jun 17, 2015
    Messages
    124
    Reaction score
    16
    • Purchased!
    • Legacy Citizen 3
    can we get longer wedges and everything? like a 2 block long wedge? that has a slope of 1/2? or 1/3 or even 1/4?
    and the same with the pentas and triangles?
     
    Joined
    Aug 5, 2013
    Messages
    405
    Reaction score
    140
    • Community Content - Bronze 1
    can we get longer wedges and everything? like a 2 block long wedge? that has a slope of 1/2? or 1/3 or even 1/4?
    and the same with the pentas and triangles?
    wrong thread to ask for wedge, this should to go to LOD thread?