Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] Crash on startup. #8128

Closed
vng opened this issue May 9, 2024 · 7 comments · Fixed by #8131
Closed

[iOS] Crash on startup. #8128

vng opened this issue May 9, 2024 · 7 comments · Fixed by #8131
Assignees
Labels
CrashReports Crash Reporting iOS iOS development

Comments

@vng
Copy link
Member

vng commented May 9, 2024

Crash dump:

Thread 22 Crashed:
0   libsystem_platform.dylib      	       0x1edce2af0 _platform_memmove + 144
1   Organic Maps                  	       0x100e7e7b0 0x100b88000 + 3106736
2   Organic Maps                  	       0x100eb64d0 0x100b88000 + 3335376
3   Organic Maps                  	       0x100eb5b50 0x100b88000 + 3332944
4   Organic Maps                  	       0x100eb593c 0x100b88000 + 3332412
5   Organic Maps                  	       0x100eb6214 0x100b88000 + 3334676
6   Organic Maps                  	       0x100f4b1f4 0x100b88000 + 3944948
7   Organic Maps                  	       0x100f3c100 0x100b88000 + 3883264
8   Organic Maps                  	       0x100e92700 0x100b88000 + 3188480
9   Organic Maps                  	       0x100f4fa98 0x100b88000 + 3963544
10  Organic Maps                  	       0x100e0b0f0 0x100b88000 + 2633968
11  libsystem_pthread.dylib       	       0x1edd99a90 _pthread_start + 136
12  libsystem_pthread.dylib       	       0x1edd98fcc thread_start + 8

I've decoded it with https://github.com/organicmaps/organicmaps/actions/runs/8952369390

dp::VertexArrayBuffer::ApplyMutation(ref_ptr<dp::GraphicsContext>, ref_ptr<dp::IndexBufferMutator>, ref_ptr<dp::AttributeBufferMutator>) (in Organic Maps) (vertex_array_buffer.cpp:398)
std::__1::__function::__func<gui::ShapeRenderer::Render(ref_ptr<dp::GraphicsContext>, ref_ptr<gpu::ProgramManager>, ScreenBase const&)::$_2, std::__1::allocator<gui::ShapeRenderer::Render(ref_ptr<dp::GraphicsContext>, ref_ptr<gpu::ProgramManager>, ScreenBase const&)::$_2>, void (gui::ShapeControl::ShapeInfo&)>::operator()(gui::ShapeControl::ShapeInfo&) (in Organic Maps) (function.h:364)
std::__1::__function::__func<gui::ShapeRenderer::ForEachShapeInfo(std::__1::function<void (gui::ShapeControl::ShapeInfo&)> const&)::$_3, std::__1::allocator<gui::ShapeRenderer::ForEachShapeInfo(std::__1::function<void (gui::ShapeControl::ShapeInfo&)> const&)::$_3>, void (gui::ShapeControl&)>::operator()(gui::ShapeControl&) (in Organic Maps) (function.h:364)
gui::ShapeRenderer::ForEachShapeControl(std::__1::function<void (gui::ShapeControl&)> const&) (in Organic Maps) (shape.cpp:149)
gui::ShapeRenderer::Render(ref_ptr<dp::GraphicsContext>, ref_ptr<gpu::ProgramManager>, ScreenBase const&) (in Organic Maps) (shape.cpp:99)
df::FrontendRenderer::RenderScene(ScreenBase const&, bool) (in Organic Maps) (frontend_renderer.cpp:1524)
df::FrontendRenderer::RenderFrame() (in Organic Maps) (frontend_renderer.cpp:1767)

I suspect, it is connected with drawing still not ready glyphs in GUI (diagnostic FPS was turned-on by user) at this point:
shape.cpp, line 120:

    if (info.m_handle->HasDynamicAttributes())
    {
      dp::AttributeBufferMutator mutator;
      ref_ptr<dp::AttributeBufferMutator> mutatorRef = make_ref(&mutator);
      info.m_handle->GetAttributeMutation(mutatorRef);
      info.m_buffer->ApplyMutation(context, nullptr, mutatorRef);
    }
@vng vng added iOS iOS development CrashReports Crash Reporting labels May 9, 2024
@biodranik
Copy link
Member

Glyphs are now ready immediately, without waiting for them to be generated later on other threads.

@biodranik
Copy link
Member

This one can be related #8108

@vng
Copy link
Member Author

vng commented May 9, 2024

I've also noticed rare black-line artifacts on my desktop. And also in time after some drape refactorings were merged.

@vng
Copy link
Member Author

vng commented May 9, 2024

Ok, one more idea to reproduce - Compass Shape. Start the app when previously was closed in Follow-and-Rotate mode.

@biodranik
Copy link
Member

This issue is reproducible in simulator with memory debugging enabled:
выява

@rtsisyk
Copy link
Contributor

rtsisyk commented May 10, 2024

Do we know what PR has caused this regression?

@biodranik
Copy link
Member

Yes, the PR which was done 10+ years ago to print debug label at the top left of the screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CrashReports Crash Reporting iOS iOS development
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants