1. Note: Nightly builds are not officially supported and things that appear broken might actually just be broken with no way of fixing it, but community members may still be willing to assist you with common problems.

Closed Crash from damaging too many blocks

Discussion in 'Nightly Builds Support' started by Quilavabom, Oct 4, 2014.

Thread Status:
Not open for further replies.
  1. Quilavabom

    Quilavabom Oxygen Tank

    I've been modding a weapon that spews out a cluster of little projectiles, which then explode using the regularexplosion2 config. Normally, there is no problem. However, when one of them explodes on a tree (usually a thick one like a pine tree or the top of a palm tree), the game crashes. This looks like the pertinent part of the log:
    Code:
    Info: UniverseServer: Client <1> <User: Quil> has been forcibly disconnected for attempting to damage 50 blocks at once, max allowed is 49
    Info: UniverseServer: Client 'Quil' <1> (Fifo <0xd84f140>) disconnected
    Info: Client received world stop packet, leaving: Removed
    Info: NetSocket read loop shut down: (FifoClosedException) Fifo::read called on closed Fifo
    Info: NetSocket read loop shut down: (FifoClosedException) Fifo::read called on closed Fifo
    Error: Access violation detected at 0x564628 (Read of address 0x60)
    Error: Stack Trace...
      SignalHandlerImpl::sehTrampoline()
      Player::inventory()
      QuestManager::update()
      MainInterface::update()
      ClientApplication::updateRunning()
      ClientApplication::update()
      StarApplicationBase::run()
      _SDL_main
      _console_main
    Here is the complete log file:
    Code:
    Info: Preparing Star::Root...
    Info: Detected mod 'xbawks' at '../mods\xbawks\.'
    Info: Detected mod 'Kineptic' at '../mods\kineptic\.'
    Info: Loading Configuration with config file: 'starbound.config'
    Info: Loading Star::Configuration from '..\starbound.config'
    Info: Pre-loading Star::Root with 4 assets sources
    Info: Loading Star::Assets from: '../assets/packed.pak'
    Info: Loading Star::Assets from: '../assets/user'
    Info: Loading Star::Assets from: '../mods\xbawks\.'
    Info: Loading Star::Assets from: '../mods\kineptic\.'
    Info: Done preparing Star::Root.
    Info: Client version 'Beta v. Rampaging Koala - Update 1' Protocol: 658
    Info: Running from : C:\Program Files (x86)\Steam\steamapps\common\Starbound\win32\starbound.exe
    Info: Initialized SDL
    Info: Initialized SDL Video
    Info: Initialized SDL Joystick
    Info: Initialized SDL Sound
    Info: Opened default audio device with 44khz / 16 bit stereo audio, 2048 sample size buffer
    Info: Finishing loading Star::Root...
    Info: Initializing SDL Window
    Info: Created initial window 1212x758
    Info: Renderer initialized
    Info: Renderer destroyed
    Info: Initializing SDL Window
    Info: Re-created window 1212x758
    Info: Renderer initialized
    Info: Done loading Star::Root.
    Info: Renderer destroyed
    Info: Creating default Star::Configuration
    Info: Renderer initialized
    Info: Renderer destroyed
    Info: Acquiring universe lock file
    Info: UniverseServer: Loading world db for world -60589974:-51393795:7247271:4:1
    Info: UniverseServer: client connection made from local
    Info: UniverseServer: Sending Handshake Challenge
    Info: UniverseClient: Sending Handshake Repsonse
    Info: UniverseServer: Client 'Quil' <1> (Fifo <0xd84f140>) connected
    Info: UniverseServer: Loading ship world received from client <User: Quil>
    Warn: Recovering SimpleDatabase at device: <unnamed temp file>
    Warn: Recovery finished
    Info: Creating default Star::Configuration
    Info: Renderer initialized
    Info: UniverseServer: Loading world db for world -60589974:-51393795:7247271:4:2
    Info: Client received world stop packet, leaving: Removed
    Info: UniverseServer: Shutting down world CelestialWorld:-60589974:-51393795:7247271:4:1 due to inactivity
    Error: Could not load /objects/generic/torch/default asset, attempting to use default.
    (AssetException) No such asset '/objects/generic/torch/default'
    Error: Could not load /objects/generic/torch/default:default.off asset, attempting to use default.
    (AssetException) No associated frames file found for image '/objects/generic/torch/default' while resolving image frame '/objects/generic/torch/default:default.off'
    Info: UniverseServer: Shutting down world ClientShipWorld:8119adc7b336f94259088e3009ceee4b due to inactivity
    Info: UniverseServer: Client <1> <User: Quil> has been forcibly disconnected for attempting to damage 50 blocks at once, max allowed is 49
    Info: UniverseServer: Client 'Quil' <1> (Fifo <0xd84f140>) disconnected
    Info: Client received world stop packet, leaving: Removed
    Info: NetSocket read loop shut down: (FifoClosedException) Fifo::read called on closed Fifo
    Info: NetSocket read loop shut down: (FifoClosedException) Fifo::read called on closed Fifo
    Error: Access violation detected at 0x564628 (Read of address 0x60)
    Error: Stack Trace...
      SignalHandlerImpl::sehTrampoline()
      Player::inventory()
      QuestManager::update()
      MainInterface::update()
      ClientApplication::updateRunning()
      ClientApplication::update()
      StarApplicationBase::run()
      _SDL_main
      _console_main
    


    Yes, I'm using mods and I know this is nightly, so nightly mods are more broken than broken that broke, but I figured it'd be better to report the problem on the chance that it is, in fact, a true bug.

    I can post a gif of the crash happening if necessary. I'm able to reproduce it consistently.
     
  2. Iris Blanche

    Iris Blanche Pudding Paradox Forum Moderator

    You're creating too much damage. "Info: UniverseServer: Client <1> <User: Quil> has been forcibly disconnected for attempting to damage 50 blocks at once, max allowed is 49" That's why it's crashing.
     
  3. Quilavabom

    Quilavabom Oxygen Tank

    Well yes, I kinda figured that. What strikes me as strange is that it only happens when I use it on the thick parts of a tree. I can hurl these things all over the place underground without issue (so far as I have experienced). Only the trees. I'm wondering if it has something to do with the fact that you can "chop" the leaves of a tree without being able to knock the tree down or something, if that makes sense.
     
  4. Iris Blanche

    Iris Blanche Pudding Paradox Forum Moderator

    That's hard to figure out because i don't know what parts in a tree counts as a block "object". But if this only happen at trees you should avoid it there.
     
  5. Any of it along the trunk.
     
  6. Quilavabom

    Quilavabom Oxygen Tank

    Try using an axe on the leaves and branches.
     
  7. dev-zzo

    dev-zzo Starship Captain

    Still, I don't think this is a good reason to dereference a NULL pointer, as stated further below:

    Forced disconnect should not crash the client.
     
  8. Iris Blanche

    Iris Blanche Pudding Paradox Forum Moderator

    It can be possible that this "kick-handling" isn't optimized by now. So a crash can be the result.
    Info: NetSocket read loop shut down: (FifoClosedException) Fifo::read called on closed Fifo
    There is a read-function called on a closed object. So reading buffer with value NULL will cause this NULL-Pointer exception.
     
  9. Dunto

    Dunto Guest

    Has this issue cleared up for you in the latest Nightly build? (not the kicking, that's expected, has the crashing cleared up?)
     
  10. Quilavabom

    Quilavabom Oxygen Tank

    Well, I kinda consider the whole issue to be that the game is ejecting me for this in the first place.
    wispcrash.gif

    If I recall correctly, trees used to simply fall over if you threw a bomb on them. That doesn't seem to be the case anymore. You can also chop the leaves with an axe; the entire tree will shake until it is supposed to fall over, but then it will return back to its normal not-shake state. I wouldn't know for certain, but I kinda feel like the two things might be related.

    ALSO. The trees fall through the ground when you chop them down in today's nightly version. Like, they fall over, and just pass right through the ground. All you get is three logs, and the rest of the drops are lost underground.
     
  11. Dunto

    Dunto Guest

    The kicking happens when you damage too many blocks, I believe it's part of an anti-griefing measure. Try changing your starbound.config where it says "tileDamageLimit" : 49 to something like 100 and see what happens. Honestly, as someone who plays multiplayer, I usually request that new addons be altered to remove such weapons since they do so much damage (or I alter them myself and then pass it on). If changing the config makes everything work for you, I would consider bundling the really high-powered stuff like this in a separate addon (you can make it depend on the original addon to avoid issues) so that server owners/operators can easily choose whether they want such weapons/abilities on their servers.

    As for the crashing, that is a geniune issue that shouldn't be happening, you should just be getting disconnected (due to being auto-kicked by the server) instead.

    Edit: The Nightly tree issue is known, there's an open thread in the Nightly subforum if you want to chime in on that, however I'm sure it'll be fixed in a future build, several issues so far have been resolved eventually.
     
  12. Quilavabom

    Quilavabom Oxygen Tank

    Ah, an anti-griefing measure. I see.... but I still find it strange that a single explosion (that wasn't the case in the gif, but it does happen) will cause a kick while spamming them underground or in a house doesn't cause problems. Regardless, I suppose I could tweak it so that the explosions do damage to players, but not terrain. I'll give that a shot. If that doesn't work, I'll just have to tone down the number of explosives. Thanks for letting me know what the reasoning was behind this thing. I appreciate it!
     
  13. Dunto

    Dunto Guest

    No problem. As far as underground vs trees, (if I recall correctly) the game doesn't really care what tiles your damaging, the client can send a packet that requests damage be done to an array of tiles, if you make that request with too many tiles in one go, it'll trigger the protection measure and disconnect you. It's possible that firing this underground won't trigger it depending on the projectile, if it doesn't spread far enough and fast enough to make at least one big damage request (over the limit), then the server won't trigger that protection. If you really just need this to work, you can try changing your code around so that you temporarily store the target coordinates, then spawn a series of smaller projectiles on an area around that point to do the same overall damage to the same overall area, essentially breaking it up into multiple hits triggered by one shot, thus breaking up and spacing out your damage requests so that you won't exceed the (max tiles to damage per request) limit.

    Edit: Again, in my opinion, putting the really high-damage stuff into an add-on addon ( :p ) will make it easier for you to get your addon onto more servers since it'll be very simple for them to leave out the stuff that could potentially be used for griefing. If you're curious about what kind of damage is too much, most big servers have a public link to their modpack, you'll be able to see which items/abilities were removed when a specific addon went into the pack, and which addons may have been dropped entirely due to potential griefing use (I can think of a certain tech mod that is not allowed, nor ever will be, on quite a few servers due to this).
     
    Last edited by a moderator: Oct 10, 2014
  14. Quilavabom

    Quilavabom Oxygen Tank

    Actually, it doesn't do that much damage--once you get to tier 10, it's practically useless. If every single explosion hits at the exact same time on a single, unprotected target it appears to do about 700 damage. The explosions are disproportionately large, I do agree there. Perhaps a smaller explosion would be more suitable. I've also modified it to do no damage to the environment.
     
    Dunto likes this.
  15. Dunto

    Dunto Guest

    Did changing this keep you from being kicked? (it should)

    Edit: As a side note, I'd keep a copy of your old one around so that you can test a later Nightly build under the same conditions to see if the crash (caused by performing a read on a closed FIFO) was fixed.
     
  16. Quilavabom

    Quilavabom Oxygen Tank

    Yes, removing the environment damage did prevent the problem from happening. I'll keep a copy of how it was originally, but the intent of the spells aren't to damage the terrain (actually, causing terrain damage is one of my pet peeves... I like to preserve the landscape.)
     
  17. Dunto

    Dunto Guest

    Have you had a chance to check the latest Nightly build to see if the kicking was handled properly?
     
  18. Quilavabom

    Quilavabom Oxygen Tank

    I guess it depends on how you define "kicking properly". The game freezes and I get a series of popups.
    upload_2014-10-16_9-53-43.png
    upload_2014-10-16_9-52-4.png
    upload_2014-10-16_9-54-47.png
    This doesn't seem quite right to me, but it could just be my preconceived notion of how it should react vs. how it is supposed to react.

    Edit: there's also a runtime error in there, but I accidentally deleted it from the attachments. "This application has requested the Runtime to terminate it in an unusual way."
     
  19. Iris Blanche

    Iris Blanche Pudding Paradox Forum Moderator

    You only need to post the stack-trace ^^ the runtime error is automatically caused when starbound causes an error (so it's not necessary ;) )
    If i follow the stacktrace right there is an internal signal within the player inventory which isn't handled right. So it looks like you'll have to wait fur further updates and see if this is fixed. (anyways the trees are bugged currently)
     
  20. Dunto

    Dunto Guest

    When we looked at the logs last time, the game had crashed due to a read on a closed FIFO. If you can post your starbound.log after such a crash then we'll be able to see if the underlying issue is the same or if another one has popped up.
     
Thread Status:
Not open for further replies.

Share This Page