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

Crash drawing tilemaps #2854

Closed
dacap opened this issue Jul 26, 2021 · 1 comment
Closed

Crash drawing tilemaps #2854

dacap opened this issue Jul 26, 2021 · 1 comment
Assignees
Labels
bug crash report Issue originated from a crash report / .dmp file critical priority time-2
Milestone

Comments

@dacap
Copy link
Member

dacap commented Jul 26, 2021

We have receive a couple of similar crashes:

https://igarastudio.zendesk.com/agent/tickets/2489
https://igarastudio.zendesk.com/agent/tickets/2517
https://igarastudio.zendesk.com/agent/tickets/2588
https://igarastudio.zendesk.com/agent/tickets/2600

From the information given from the user in ticket 2600, we can now reproduce the issue: tile manual mode, change to a regular layer, with the preview window visible, it crashes in this place with cel_layer is not a tilemap but the cel_image is a IMAGE_TILEMAP.

    if (area.size.w < 1 ||
        area.size.h < 1)
      return;

    auto tilemapLayer = static_cast<const LayerTilemap*>(cel_layer);
    doc::Grid grid = tilemapLayer->tileset()->grid(); // 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.
    grid.origin(grid.origin() + gfx::Point(celBounds.origin()));

    // Is the 'm_previewTileset' set to be used with this layer?
    const Tileset* tileset;
    if (m_previewTileset && cel &&
        checkIfWeShouldUsePreview(cel)) {
      tileset = m_previewTileset;
    }
>	Aseprite.exe!render::Render::renderCel(doc::Image * dst_image, const doc::Cel * cel, const doc::Image * cel_image, const doc::Layer * cel_layer, const doc::Palette * pal, const gfx::RectT<double> & celBounds, const gfx::ClipT<int> & area, void(*)(doc::Image *, const doc::Image *, const doc::Palette *, const gfx::ClipT<double> &, const int, const doc::BlendMode, const double, const double, const bool) compositeImage, const int opacity, const doc::BlendMode blendMode) Line 1246	C++
 	Aseprite.exe!render::Render::renderCel(doc::Image * dst_image, const doc::Cel * cel, const doc::Sprite * sprite, const doc::Image * cel_image, const doc::Layer * cel_layer, const doc::Palette * pal, const gfx::RectT<double> & celBounds, const gfx::ClipT<int> & area, const int opacity, const doc::BlendMode blendMode) Line 1216	C++
 	Aseprite.exe!render::Render::renderLayer(const doc::Layer * layer, doc::Image * image, const gfx::ClipT<int> & area, const int frame, void(*)(doc::Image *, const doc::Image *, const doc::Palette *, const gfx::ClipT<double> &, const int, const doc::BlendMode, const double, const double, const bool) compositeImage, const bool render_background, const bool render_transparent, const doc::BlendMode blendMode, bool isSelected) Line 1182	C++
 	Aseprite.exe!render::Render::renderLayer(const doc::Layer * layer, doc::Image * image, const gfx::ClipT<int> & area, const int frame, void(*)(doc::Image *, const doc::Image *, const doc::Palette *, const gfx::ClipT<double> &, const int, const doc::BlendMode, const double, const double, const bool) compositeImage, const bool render_background, const bool render_transparent, const doc::BlendMode blendMode, bool isSelected) Line 1149	C++
 	Aseprite.exe!render::Render::renderSpriteLayers(doc::Image * dstImage, const gfx::ClipT<double> & area, int frame, void(*)(doc::Image *, const doc::Image *, const doc::Palette *, const gfx::ClipT<double> &, const int, const doc::BlendMode, const double, const double, const bool) compositeImage) Line 808	C++
 	Aseprite.exe!render::Render::renderSprite(doc::Image * dstImage, const doc::Sprite * sprite, int frame, const gfx::ClipT<double> & area) Line 740	C++
 	Aseprite.exe!app::Editor::drawOneSpriteUnclippedRect(ui::Graphics * g, const gfx::RectT<int> & spriteRectToDraw, int dx, int dy) Line 701	C++
 	Aseprite.exe!app::Editor::drawSpriteUnclippedRect(ui::Graphics * g, const gfx::RectT<int> & _rc) Line 857	C++
 	Aseprite.exe!app::Editor::onPaint(ui::PaintEvent & ev) Line 2140	C++
 	Aseprite.exe!ui::Widget::paintEvent(ui::Graphics * graphics, const bool isBg) Line 1140	C++
 	Aseprite.exe!ui::Widget::onProcessMessage(ui::Message * msg) Line 1481	C++
 	Aseprite.exe!app::Editor::onProcessMessage(ui::Message * msg) Line 2034	C++
 	Aseprite.exe!ui::Manager::sendMessageToWidget(ui::Message * msg, ui::Widget * widget) Line 1867	C++
 	Aseprite.exe!ui::Manager::pumpQueue() Line 1758	C++
 	Aseprite.exe!ui::Manager::dispatchMessages() Line 830	C++
 	Aseprite.exe!ui::Manager::run() Line 267	C++
 	Aseprite.exe!app::App::run() Line 424	C++
 	Aseprite.exe!app_main(int argc, char * * argv) Line 105	C++
 	Aseprite.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Line 41	C++
@dacap dacap added bug crash report Issue originated from a crash report / .dmp file labels Jul 26, 2021
@dacap dacap added this to the v1.3-beta6 milestone Jul 26, 2021
@dacap dacap self-assigned this Aug 18, 2021
@dacap
Copy link
Member Author

dacap commented Aug 19, 2021

This will be fixed in v1.3-beta6

@dacap dacap removed the wip label Aug 19, 2021
@dacap dacap closed this as completed Aug 19, 2021
dacap added a commit that referenced this issue Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug crash report Issue originated from a crash report / .dmp file critical priority time-2
Projects
None yet
Development

No branches or pull requests

1 participant