Canvas firing Paint Event until Crashing the app in Mojave

  1. 4 months ago

    Aurelian N

    Dec 20 Pre-Release Testers, Xojo Pro
    Edited 4 months ago

    Hello Guys,

    Using XOJO 2018R4

    I have an app that shows some photos in a Canvas as preview.

    High Sierra all nice and smooth , same code in Mojave is crashing the app straight with the error :

    Date/Time: 2018-12-20 17:26:25.392 +0100
    OS Version: Mac OS X 10.14.2 (18C54)
    Report Version: 12

    Time Awake Since Boot: 2200 seconds

    System Integrity Protection: enabled

    Crashed Thread: 0 Dispatch queue: com.apple.main-thread

    Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
    Exception Codes: 0x0000000000000001, 0x0000000000000000
    Exception Note: EXC_CORPSE_NOTIFY

    Termination Signal: Illegal instruction: 4
    Termination Reason: Namespace SIGNAL, Code 0x4
    Terminating Process: exc handler [908]

    Application Specific Information:
    Crashing on exception: The window has been marked as needing another Display Window pass, but it has already had more Display Window passes than there are views in the window.

    Any idea what this could be ?

    So doing some tests , in High Sierra , the Modal window shows, loads the pictures and displays and all, while in Mojave same code is calling Paint event several it crashes with that error .

    Did something changed in the last update related to Canvas ? and Mojave ?

    Thanks.

    @Aurelian N Me.Invalidate

    THAT causes PAINT to fire again..... remove it completely

  2. Dave S

    Dec 20 San Diego, California USA

    in you PAINT event.. .do you have ANYTHING the takes focus away from the Canvas?

    MSGBOX? xxx.show? ANYTHING at all.

    If you remove focus from a CANVAS during paint for any reason, it will run the paint event again, and then focus is remove, and it fires again etc. etc. etc.

  3. Aurelian N

    Dec 20 Pre-Release Testers, Xojo Pro
    Edited 4 months ago

    @Dave S in you PAINT event.. .do you have ANYTHING the takes focus away from the Canvas?

    MSGBOX? xxx.show? ANYTHING at all.

    If you remove focus from a CANVAS during paint for any reason, it will run the paint event again, and then focus is remove, and it fires again etc. etc. etc.

    Hi Dave,

    Nothing at all, except the end line which is Me.Invalidate and I tried with and without False and same thing. I will try without Invalidating the Canvas to see how it goes.

  4. Dave S

    Dec 20 Answer San Diego, California USA

    @Aurelian N Me.Invalidate

    THAT causes PAINT to fire again..... remove it completely

  5. Aurelian N

    Dec 20 Pre-Release Testers, Xojo Pro

    @Dave S THAT causes PAINT to fire again..... remove it completely

    And it works, Is that a bug or what ? in High Sierra is working perfectly it seems .

    Thanks.

  6. Dave S

    Dec 20 San Diego, California USA

    The "bug" is the High Sierra SHOULD have reacted the same way.

    Invalidate says "Hey run PAINT when you get a chance"... It defers until the end of a run cycle

    Well, the last line of the PAINT event IS the end of a run cycle... so at the end of PAINT you are saying "Run Paint"

  7. Aurelian N

    Dec 20 Pre-Release Testers, Xojo Pro

    @Dave S The "bug" is the High Sierra SHOULD have reacted the same way.

    Invalidate says "Hey run PAINT when you get a chance"... It defers until the end of a run cycle

    Well, the last line of the PAINT event IS the end of a run cycle... so at the end of PAINT you are saying "Run Paint"

    Got it , thanks.

or Sign Up to reply!