Author Topic: Sequence crashes upon saving; Version 31 and above  (Read 542 times)

Offline SanDiegoBob

  • Newbie
  • *
  • Posts: 21
    • View Profile
Sequence crashes upon saving; Version 31 and above
« on: October 24, 2018, 09:47:26 AM »
You guys are great and I have not completely ruled out operator error on my part, but thought I should pass this through you just in case.  I have a sequence that crashes every time I do a save using the most recent Xlights version (i.e., v37).  It crashes Immediately upon taking the "save" action.  I did some trouble shooting on my own and the problem does not occur with version 29 or older.  Hopefully I have attached what you need (as it happens every time I save with v31 or greater).

I have multiple sequences (10+), and this crash is only happening to this one sequence (so far),

My system is a newer MacBook Pro laptop, running OS 10.14 Mojavi.

I also noted that I get similar results on the same type of sequence on my iMac running 10.13.6 (High Sierra).  It is just not as dramatic (it doesn't crash till the rendering is complete and you exit out of the program).
« Last Edit: October 24, 2018, 01:10:17 PM by SanDiegoBob »

Offline dkulp

  • Supporting Member
  • Hero Member
  • *
  • Posts: 812
    • View Profile
Re: Sequence crashes upon saving; Version 31 and above
« Reply #1 on: October 24, 2018, 12:34:46 PM »
Ick... Looks like the wxGraphicsContext that is used for Tendrils has some not-thread-safe issues.  :(   That's not going to be fun to deal with. 
Daniel Kulp
Framingham, MA

Offline keithsw1111

  • Administrator
  • Hero Member
  • *****
  • Posts: 2733
    • View Profile
    • Kellyville Christmas Lights
Re: Sequence crashes upon saving; Version 31 and above
« Reply #2 on: October 24, 2018, 02:44:45 PM »
We could just move it to the main thread.


Sent from my iPhone using Tapatalk

Offline dkulp

  • Supporting Member
  • Hero Member
  • *
  • Posts: 812
    • View Profile
Re: Sequence crashes upon saving; Version 31 and above
« Reply #3 on: October 24, 2018, 02:52:19 PM »
We could just move it to the main thread.


That's a possibility, but I'm trying to figure out if it applies to all the usages of the wxGraphicsContext stuff we use for rendering.   If it does, that would also impact the Text and some usage of Image effects.

The other alternative (which I've debated for years) is to update the GDI object reference counting in wxWidgets to use atomic<int> and see if that would prevent much of this.   That's the big issue as the reference counting is NOT thread safe at all and you get one thread deleting various objects (like wxBLACK) that are used elsewhere.   Since I'm already maintaining a patch set for OSX (various Mojave fixes) and using custom wxWidgets builds, adding that wouldn't be a big deal.
Daniel Kulp
Framingham, MA