Drawbot freezes after running



  • I know the title is kinda vague, I can provide more info if needed of course:

    I have a script that runs and creates frames with text and saves it as a mp4. Right after running (takes a couple of seconds) Drawbot freezes. Have to Force Quit it. It DOES complete the whole script since it saves a perfectly good MP4. Any way to make sure this doesn't happen? Can I save a MP4 without displaying the pages for example?

    With less frames (about 50) it also freezes for a while, but will unfreeze after showing all the pages. with 250 frames it just freezes and stays that way.

    Update: it does the same thing when not saving as a MP4. It just runs, goes through all the frames, and then takes a long time displaying the pages. Is there a better way to do this?


  • admin

    Could you share the script or make a dummy script causing this behaviour?

    What is your OS?

    You could install drawBot as a module (with all required packages) and run the a script in terminal.



  • I am experiencing the same issue. When I first launch Drawbot and run the script, it works fine. If I try to run it a second time Drawbot freezes (but it saves the gif anyways).

    This is the script:

    font_name = 'MalvaVariable-Italic'
    min_var = listFontVariations(font_name)['wght']['minValue']
    max_var = listFontVariations(font_name)['wght']['maxValue']
    
    w, h = 980, 490
    texto = 'Animating in Drawbot!'
    steps = len(texto)
    step_size = (max_var - min_var) / (steps-1)
    lines = 5
    font_size = w/12
    step_rad = 2*pi / steps
    
    frames = 30
    total_duration = 2 # in seconds
    frame_duration = total_duration / frames
    
    
    for frame in range(frames):
        newPage(w, h)
        frameDuration(frame_duration)
    
        fill(25/255, 29/255, 59/255)
        rect(0,0,w,h)
    
        y = (h - (lines * font_size)) / 2
        y += w/50
        
        frame_start = (2*pi) * frame/frames
    
        for l in range(lines):
            step_start = frame_start - (pi * (l / (lines -1)))
            
            txt = FormattedString()
            txt.fill(235/255, 0/255, 89/255)
            txt.font(font_name)
            txt.fontSize(font_size)
            txt.lineHeight(font_size)
            txt.openTypeFeatures(ss01=True)
    
            for i in range(steps):
                inst_step = pi * (i / (steps -1))
                curr_step = (cos(step_start - inst_step) + 1) / 2
                curr_step /= 1
                curr_value = min_var + curr_step * (max_var - min_var)
                txt.append(
                    texto[i], 
                    fontVariations=dict(wght=curr_value)
                    )
    
            textWidth, textHeight = textSize(txt)
            text(txt, ((w-textWidth)/2, y))
    
            y += font_size
        
    saveImage('output.gif')
    

  • admin

    what is the OS?

    Could you also send over the crash report?

    thanks



  • @frederik I am on Mojave (10.14.5). This is the crash report that comes up after I force quit Drawbot: https://www.dropbox.com/s/4b6gkksm1ti5rnv/Drawbot crash report.txt?dl=0 Not sure if there is another report somewhere else…

    One other thing I have noticed just now is that if I run the script above and then run a different script, Drawbot will freeze as well. The second script being one that I use daily with zero issues.