FortressCraft Evolved

FortressCraft Evolved

steveman0's Blueprint Builder
isochronous 7 Feb, 2020 @ 12:34pm
Game-crashing bug
I know I mentioned this somewhere else, but I figured I'd actually come here and report it in the correct place :)

Basically, I found a way to totally lock up the game on demand by breaking the blueprint builder after rotating the hologram from its original orientation. If I un-rotate it back to its original orientation, I can break it without issue. If I select a different hologram (and don't rotate it) I can break it without issue. However, if I place a builder, rotate the hologram in any direction, then break it, INSTANTLY the game freezes, I get a spinner, and eventually windows asks to close the game.

I made sure that there were no mod blocks or anything in the blueprint I was testing this with.
< >
Showing 1-15 of 20 comments
steveman0  [developer] 8 Feb, 2020 @ 7:47am 
I've heard a few reports of this but no one has been able to provide a log with any indications of anything pointing to the blueprint builder code itself. As such, it's likely down to a driver or Unity bug (my code can't possibly cause a full game crash - that's only possible at the unity level which is beyond my capability to modify). Short of throwing around some weird hack ideas I don't have ideas on a way to fix it. I don't have much time for that as I've got higher priorities with freight development that are on my plate right now.
isochronous 8 Feb, 2020 @ 10:38am 
I've noticed that things don't always get written to the log before the process freezes. I've definitely had more than one crash that showed zero evidence of itself in the log. But fair enough. As long as there's a workaround - I just wish I didn't occasionally forget to un-rotate things before breaking my builders 😅
isochronous 3 Mar, 2020 @ 7:24am 
I've run into another issue here. This time there's PLENTY of errors in the log. I'm betting that the blocks causing the error are from Myrianne's Creative Blocks mod. It's a paste-based block, but the machine is requesting the actual block name, not paste. Unfortunately, neither the block nor just paste actually get the builder to do anything.

Error doing low frequency segment update. Object reference not set to an instance of an object at BlueprintBuilder.ModBlockTypeUpdate (System.UInt16& type, System.UInt16& val) [0x00000] in <filename unknown>:0 at BlueprintBuilder.BuildBlock () [0x00000] in <filename unknown>:0 at BlueprintBuilder.HandleBlueprintBuilding () [0x00000] in <filename unknown>:0 at BlueprintBuilder.LowFrequencyUpdate () [0x00000] in <filename unknown>:0 at Segment.UpdateEntities () [0x00000] in <filename unknown>:0 at Segment.LowFrequencyUpdate () [0x00000] in <filename unknown>:0 at SegmentUpdater.UpdateSegments () [0x00000] in <filename unknown>:0
steveman0  [developer] 4 Mar, 2020 @ 11:16am 
Thanks, I'll have a look later.
steveman0  [developer] 5 Mar, 2020 @ 4:23am 
I looked over the code and don't see how that error could be thrown. Could you provide the whole log file? I suspect a prior error may be at fault.
steveman0  [developer] 7 Mar, 2020 @ 8:33am 
No obvious signs how it's failing. I've pushed a new build with additional logging and a catch that might allow it to keep working on other blocks at least. Try again and if you still see odd performance send me another log file.
isochronous 7 Mar, 2020 @ 8:57am 
Thanks man, will do. I'll let you know either way.
isochronous 7 Mar, 2020 @ 10:02am 
This version is definitely working better, but it's still not placing certain blocks from that mod. It wants the block itself, though the blocks are paste blocks. The problem is that it wants a certain COLOR of those blocks, which I am incapable of providing it, because I can't paint the blocks until I place them, and once I place them I can't pick them back up because they're paste blocks -_-. Will upload my latest log to see if that tells you anything useful.
isochronous 7 Mar, 2020 @ 11:07am 
Actually, this log looks like it might be a little more useful? I dunno. It certainly has a lot more exceptions logged, but they're pretty much exactly the same as the one I posted a couple of days ago.
https://www.dropbox.com/s/k10ebmtae6mmjfl/bb_output_log-3.txt?dl=0
isochronous 7 Mar, 2020 @ 11:08am 
Well, not exactly the same, the new error is coming from ItemBaseUtil.GetAmount
steveman0  [developer] 9 Mar, 2020 @ 4:32am 
Err, the latter error is odd and suggests a potentially corrupted item. I need to dig into the source of the utility library to confirm though. Aside from the log spam, nothing really stands out in the earlier log. I'll need to review how paste blocks are handled. It could be the other mod doesn't handle them in standard fashion making them incompatible with the builder. I'll look closer when I get time tonight and let you know what I find.
steveman0  [developer] 9 Mar, 2020 @ 2:11pm 
I've reviewed the code more closely. I can confirm the only way the ItemBaseUtil.GetAmount would throw an exception is from a corrupt item. I suspect another mod is the cause. I see you're using at least one "stackable" mod which have been known to cause these sorts of exceptions due to how they cheat the normal gameplay rules.

As for it not converting the blocks to paste, I've also reviewed that code and see no reason why it wouldn't convert them as they would non-mod blocks aside from the mod author didn't follow convention and label the blocks as decorations. Either that or they did not define the crafting recipe the standard way which bypassed the usual craftdata entry that my code relies on for getting the paste cost. Either way, you'd have to follow up with the mod author as I don't have a reasonable way to support them if they break convention.
isochronous 10 Mar, 2020 @ 11:15am 
Ok, thanks for looking into it. I'm totally up for a little XML modification myself. Could you possibly take a look at this block definition and recipe and tell me if you see anything wrong? This whole mod just uses the same pattern repeated with various block names/textures, so if you can identify where the problem is with this one recipe/block, I can fix it for all of the recipes/blocks.

Recipe
<CraftData> <Key>Myrianne.Grass</Key> <Category>decoration</Category> <Tier>7</Tier> <CraftedKey>Myrianne.Grass</CraftedKey> <CraftedAmount>1</CraftedAmount> <Costs> <CraftCost> <Key>ConstructionPaste</Key> <Amount>1</Amount> </CraftCost> </Costs> <Description>Decorative block. REINFORCED</Description> <Hint>Want to help? http://www.patreon.com/FortressCraft</Hint> <CanCraftAnywhere>true</CanCraftAnywhere> <ResearchRequirements> <Research>aesthetics</Research> </ResearchRequirements> </CraftData>

Terrain data:
<TerrainDataEntry> <Key>Myrianne.Grass</Key> <Name>Grass</Name> <LayerType>PrimaryTerrain</LayerType> <TopTexture>0</TopTexture> <SideTexture>3</SideTexture> <BottomTexture>2</BottomTexture> <GUITexture>3</GUITexture> <isSolid>true</isSolid> <isTransparent>false</isTransparent> <isHollow>false</isHollow> <isGlass>false</isGlass> <isPassable>false</isPassable> <hasObject>false</hasObject> <hasEntity>false</hasEntity> <AudioWalkType>Dirt</AudioWalkType> <AudioBuildType>Dirt</AudioBuildType> <AudioDestroyType>None</AudioDestroyType> <Category>Decoration</Category> <isGarbage>true</isGarbage> <isReinforced>true</isReinforced> <tags> <tag>Voxel</tag> <tag>Outdoor</tag> </tags> </TerrainDataEntry>
Last edited by isochronous; 10 Mar, 2020 @ 11:56am
< >
Showing 1-15 of 20 comments
Per page: 1530 50