GithubHelp home page GithubHelp logo

Comments (3)

RenechCDDA avatar RenechCDDA commented on June 16, 2024 1

I got it to reproduce when loading the save the second time, it happened during loading. Interestingly, it's trying to draw... z+14?

image

That's way out of bounds.

image

Looks like it continues the while-loop even after reaching Z+10. I'm guessing it doesn't crash all the time because of how the memory is aligned - it only sometimes manages to escape valid memory and trigger the segfault. Still it shouldn't try to read anything past max height, there's definitely nothing there and it could end up reading bad data.

from cataclysm-dda.

RenechCDDA avatar RenechCDDA commented on June 16, 2024 1

This should probably prevent the crash in the future, but the circumstances to trigger it aren't clear to me. I wasn't able to get it to crash more than the one time (with or without this patch).

index 0eaa347af9..c640f23c79 100644
--- a/src/cata_tiles.cpp
+++ b/src/cata_tiles.cpp
@@ -4049,6 +4049,9 @@ bool cata_tiles::draw_critter_above( const tripoint &p, lit_level ll, int &heigh
     // Search for a creature above
     while( pcritter == nullptr && !here.dont_draw_lower_floor( scan_p ) &&
            scan_p.z - you.pos().z <= fov_3d_z_range ) {
+        if( scan_p.z >= OVERMAP_HEIGHT ) {
+            break;
+        }
         pcritter = get_creature_tracker().creature_at( scan_p, true );
         scan_p.z++;
     }

from cataclysm-dda.

GuardianDll avatar GuardianDll commented on June 16, 2024

I've had this error a lot, i could not reproduce it properly, and it was almost completely gone when i changed my build from MSVC to other

from cataclysm-dda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.