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

CocoaSplit crashes when I write displayed text file #88

Open
gobzer opened this issue Apr 8, 2020 · 3 comments
Open

CocoaSplit crashes when I write displayed text file #88

gobzer opened this issue Apr 8, 2020 · 3 comments

Comments

@gobzer
Copy link

gobzer commented Apr 8, 2020

Hi,
CocoaSplit 2.1.12 crashes when displaying contents of a file being rewritten by an external process.
To reproduce:

  1. make file sample.txt write some text to it.
  2. Open CocoaSplit and add text file source. Source the text from sample.txt
  3. Run this script:

python2

cnt = 0
while True:
    cnt = cnt + 1
    f = open("sample.txt", "w")
    f.write(str(cnt))
    f.close()

CocoaSplit 2.1.12 should crash.

Rewriting text files by an external process is useful either for chat or donations.
I tried to do the same on OBS, but it doesn't crash.

Attached crash report and console messages.
crash_write_to_file.txt
console_write_to_file.txt

@zakk4223
Copy link
Owner

zakk4223 commented Apr 9, 2020

Fixed in commit 16564b3

I'll have a new release out in a day or two

@gobzer
Copy link
Author

gobzer commented Apr 13, 2020

Yes. It's not crashing now. But sometimes it skips states.
For example. I count to infinity with a timed interval. On live view the the source sometimes becomes blank. Skips number or two:

import time
cnt = 0
while True:
    time.sleep(1)
    cnt = cnt + 1
    f = open("sample.txt", "w")
    f.write(str(cnt))
    f.close()

@zakk4223
Copy link
Owner

(Hopefully) fixed in commit db39e67

File change events were causing double updates of the CATextLayer, one of which was a nil string. Sometimes the layout render would hit during the blank phase. Removed the nil update part and it seems better behaved now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants