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

tiled 1.7.0 crashes when pasting multiple layers #3097

Closed
HoraK-FDF opened this issue Jul 6, 2021 · 2 comments
Closed

tiled 1.7.0 crashes when pasting multiple layers #3097

HoraK-FDF opened this issue Jul 6, 2021 · 2 comments
Labels
bug Broken behavior.

Comments

@HoraK-FDF
Copy link

HoraK-FDF commented Jul 6, 2021

here is what i did do produce the crash made it several times:

@bjorn
Copy link
Member

bjorn commented Jul 7, 2021

Hrm, strange, I could reproduce this reliably twice with the released AppImage, but with a local build of the v1.7.0 tag I have not been able to crash it yet. The AppImage reveals the following code involved in the crash:

Thread 1 "tiled" received signal SIGSEGV, Segmentation fault.
0x00007ffff6819630 in Tiled::Layer::isHidden() const ()
   from /home/bjorn/Downloads/linux-64bit/squashfs-root/usr/bin/../lib/libtiled.so
(gdb) bt
#0  0x00007ffff6819630 in Tiled::Layer::isHidden() const () from /home/bjorn/Downloads/linux-64bit/squashfs-root/usr/bin/../lib/libtiled.so
#1  0x00005555554bd141 in Tiled::AbstractTileTool::updateBrushVisibility() ()
#2  0x00005555555b71a0 in Tiled::MapScene::event(QEvent*) ()

This suggests there has been a faulty Layer pointer returned from AbstractTileTool::targetLayersForStamp.

@bjorn bjorn added the bug Broken behavior. label Jul 7, 2021
@bjorn bjorn closed this as completed in df8773d Jul 7, 2021
@bjorn
Copy link
Member

bjorn commented Jul 7, 2021

Pushed a fix. That was a silly mistake I made in c87f8c4. :-(

bjorn added a commit that referenced this issue Jul 7, 2021
Due to a missing check, pasting a multi-layer stamp could crash when the
target map did not have matching layers.

Closes #3097

(cherry picked from commit df8773d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken behavior.
Projects
None yet
Development

No branches or pull requests

2 participants