deptofdefense / AndroidTacticalAssaultKit-CIV

Other
14 stars 8 forks source link

Crash pressing OK after taking a photo #45

Open peterhaigh opened 3 years ago

peterhaigh commented 3 years ago

Hi, this issue happens on two devices we have

Samsung Galaxy Tab A, SM-T515 moto g8 power lite

It's worth noting that neither of these devices has a compass. On my Pixel 4, I don't see the issue.

I've caught the issue while debugging, it stops on the return statement of Tessellate_polygon, in Tessellate.h

template Util::TAKErr Tessellate_polygon(VertexDataPtr &value, std::size_t *dstCount, const VertexData &src, const std::size_t count, const double threshold, Algorithm &algorithm) NOTHROWS {

            if(sizeof(T)*src.size > src.stride)
                return Util::TE_InvalidArg;
            ReadVertexFn readV;
            WriteVertexFn writeV;
            if (src.stride > sizeof(T)*src.size) {
                readV = readVertexImpl_stride<T>;
                writeV = writeVertexImpl_stride<T>;
            } else {
                readV = readVertexImpl_nostride<T>;
                writeV = writeVertexImpl_nostride<T>;
            }

           //Here is where the issue occurs
            return Tessellate_polygon(value, dstCount, src, count, threshold, algorithm, readV, writeV);
        }
    }

Values read

Signal = SIGABRT (signal SIGABRT) value = {TAK::Engine::Renderer::VertexDataPtr &const} nullptr dstCount = {std::size_t | 0xb4064460} 0xb4064460 src = {const TAK::Engine::Renderer::VertexData &const} count = {std::size_t} 10 threshold = {const double} 0 algorithm = {TAK::Engine::Renderer::Algorithm &const} readV = {TAK::Engine::Renderer::ReadVertexFn | 0xb58d1241} (libatakjni.so`TAK::Engine::Util::TAKErr TAK::Engine::Renderer::readVertexImpl_nostride(TAK::Engine::Math::Point2, TAK::Engine::Util::MemBuffer2&, TAK::Engine::Renderer::VertexData const&) + 1 at Tessellate.h:47) writeV = {TAK::Engine::Renderer::WriteVertexFn | 0xb58d12e9} (libatakjni.so`TAK::Engine::Util::TAKErr TAK::Engine::Renderer::writeVertexImpl_nostride(TAK::Engine::Util::MemBuffer2&, TAK::Engine::Renderer::VertexData const&, TAK::Engine::Math::Point2 const&) + 1 at Tessellate.h:82)

takdeveloper commented 3 years ago

@peterhaigh Thanks for raising this to our attention! Does it appear to happen with specific items on the map? If so, could you create a Data Package with the items and attach to the issue?

peterhaigh commented 3 years ago

Hi, it happens when an image is taken. It happens on the version I downloaded from the PlayStore and the version I built from source. I only see this issue on my devices, without a compass; the devices with a compass don't have an issue. I only have two devices without a compass and two devices with a compass, so it's not an exhaustive test.

bisgroves commented 2 years ago

Following back up with this issue to see if you are still experiencing it or have any further details with a newer version of ATAK (presently 4.5.1)