1. Hey Guest! We're currently translating StarMade. Anyone can translate, if you can, feel free to!
      Dismiss Notice
    2. Interested in helping moderate SMD? We're currently looking for moderators, check out this thread.
      Dismiss Notice

    Quick dev update

    Discussion in 'Game News' started by schema, Apr 15, 2017.

    1. schema

      schema Cat God

      Joined:
      Feb 17, 2012
      Messages:
      1,532
      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
       
      • Like Like x 14
      • Informative Informative x 2
      • Friendly Friendly x 1
    2. SchnellBier

      Community Mentor

      Joined:
      Sep 10, 2014
      Messages:
      181
      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:.
       
      • Like Like x 2
    3. GRHayes

      Joined:
      Dec 14, 2014
      Messages:
      745
      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.
       
      #3 GRHayes, Apr 15, 2017
      Last edited: Apr 15, 2017
    4. schema

      schema Cat God

      Joined:
      Feb 17, 2012
      Messages:
      1,532
      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 Like x 1
    5. jstenholt

      Joined:
      Jul 29, 2013
      Messages:
      1,050
      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?
       
      • Like Like x 3
      • Funny Funny x 1
    6. splatthecat

      Joined:
      Jan 14, 2016
      Messages:
      309
      Bug fixes are important but we all love a bone!
       
      • Agree Agree x 3
      • Funny Funny x 1
    7. GRHayes

      Joined:
      Dec 14, 2014
      Messages:
      745
      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()
      --- Updated post (merge), Apr 15, 2017, Original Post Date: Apr 15, 2017 ---
      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.

      [​IMG]
       
      #7 GRHayes, Apr 15, 2017
      Last edited: Apr 15, 2017
      • Useful Useful x 2
      • Informative Informative x 1
    8. Az14el

      Az14el Lord Procrastinator General

      Joined:
      Apr 25, 2015
      Messages:
      751
      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
       
    9. schema

      schema Cat God

      Joined:
      Feb 17, 2012
      Messages:
      1,532
      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.)
       
      #9 schema, Apr 16, 2017
      Last edited: Apr 16, 2017
      • Like Like x 2
      • Informative Informative x 1
    10. Lecic

      Lecic Convicted Lancake Abuser

      Joined:
      Apr 14, 2013
      Messages:
      5,046
      There's new features coming in the update that are already in the pre-release. Read the pre-release changelog.
       
      • Friendly Friendly x 1
    11. GRHayes

      Joined:
      Dec 14, 2014
      Messages:
      745
      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.
       
    12. schema

      schema Cat God

      Joined:
      Feb 17, 2012
      Messages:
      1,532
      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.
       
      • Like Like x 2
      • Friendly Friendly x 1
    13. GRHayes

      Joined:
      Dec 14, 2014
      Messages:
      745
      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.
       
      #13 GRHayes, Apr 16, 2017
      Last edited: Apr 19, 2017
    14. jstenholt

      Joined:
      Jul 29, 2013
      Messages:
      1,050
      I was clearly not talking about any of them.
       
      • Funny Funny x 1
    15. Shaker

      Joined:
      Jan 19, 2015
      Messages:
      367
      Can we salvage (salvage beam) overheating NPC faction ships yet?
       
      • Like Like x 1
      • Agree Agree x 1
    16. Lecic

      Lecic Convicted Lancake Abuser

      Joined:
      Apr 14, 2013
      Messages:
      5,046
      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.
       
      • Agree Agree x 4
    17. djthekiller

      Joined:
      Jun 17, 2015
      Messages:
      120
      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?
       
    18. Gamel

      Joined:
      Aug 5, 2013
      Messages:
      405
      wrong thread to ask for wedge, this should to go to LOD thread?
       
    19. Drakkart

      Joined:
      Nov 3, 2014
      Messages:
      617
      any news on the new power system?
       
      • Agree Agree x 1
    20. Shaker

      Joined:
      Jan 19, 2015
      Messages:
      367
      They are currently working on their 2nd proposal to bring to the community
       
      • Informative Informative x 1
    Loading...
    Similar Threads - Quick update
    1. schema
      Replies:
      42
      Views:
      4,313
    2. schema
      Replies:
      30
      Views:
      2,819
    3. schema
      Replies:
      169
      Views:
      15,873
    4. schema
      Replies:
      33
      Views:
      2,645