Giter VIP home page Giter VIP logo

Comments (6)

p0nce avatar p0nce commented on May 24, 2024 1

@toh-ableton I've given a new build to Oli with your kind informations :) it should fix it in Xcode 15 hosts. (Got the feedback it's all right now)

from dplug.

p0nce avatar p0nce commented on May 24, 2024

Uh, I'm not in Live 12 beta...
Certainly no repro with Sonoma 14.0 + any type of Live 11

  • maybe with Sonoma 14.3? => nope

from dplug.

toh-ableton avatar toh-ableton commented on May 24, 2024

I believe the bug starts on this line:

int ysource = -origY + _height - height;

The rect passed in is the dirty rect and can be larger than the view's bounds. If this computes a firstPixel that is outside _wfb's buffer

const (RGBA)* firstPixel = &(_wfb.scanline(ysource)[origX]);

or a sizeNeeded going beyond the end
size_t sizeNeeded = _wfb.pitch * height;

it will crash here:
CGDataProviderRef provider = CGDataProviderCreateWithData(null, firstPixel, sizeNeeded, null);

Apple mentions this in the AppKit release notes:

Some patterns that have historically worked will require adjustment:
[...]

  • Filling the dirty rect of a view inside of -drawRect. A fairly common pattern is to simply rect fill the dirty rect passed into an override of NSView.draw(). The dirty rect can now extend outside of your view’s bounds. This pattern can be adjusted by filling the bounds instead of the dirty rect, or by setting clipsToBounds = true.
  • Confusing a view’s bounds and its dirty rect. The dirty rect passed to .drawRect() should be used to determine what to draw, not where to draw it. Use NSView.bounds when determining the layout of what your view draws. (10905750)

from dplug.

p0nce avatar p0nce commented on May 24, 2024

To reproduce the host must be built with Xcode 15
A x86_64 built with LDC 1.28 also doesn't exhibit the issue for some unknown reason.

from dplug.

p0nce avatar p0nce commented on May 24, 2024
  •  for good measure test the new build on 10.15, before drawRect about broke every year

from dplug.

p0nce avatar p0nce commented on May 24, 2024

Fixed in latest tag

from dplug.

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.