Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by mkreitler

Hey all,

I'm porting one of my Impact games to Ejecta, and have run into a problem. This game starts in Landscape mode. About 50% of the time, I get a BAD_ACCESS exception in setCurrentRenderingContext when launching the game from XCode. The other 50% it works fine.

This sounds like a race condition. Has anyone else come across this?

Mark

1 decade ago by dominic

Can you please try the current development version from github: https://github.com/phoboslab/Ejecta - I believe this issue was fixed some days ago.

1 decade ago by mkreitler

After further investigation, it appears that currentRenderingContext (in EJBindingCanvas.m) can be left pointing to a temporary object after calls to functions like fillRect or getContext. If that object gets garbage collected before the currentRenderingContext changes, Ejecta will crash trying to call flushBuffers on the destroyed object when a new object is assigned to currentRenderingContext.

I think. I'm basing this on indirect information.

Anyone have thoughts on an elegant solution to this problem?

Mark

1 decade ago by mkreitler

Oops. We cross-posted.

I will try the latest version, though I downloaded from GitHub yesterday (Monday the 8th).

Thanks for the quick reply, though.

1 decade ago by mkreitler

Oops...wait. I think it was Friday the 5th when I last updated. Regardless, I did get new files when I pulled today.

So far, it's working great.

Thanks for the fix, Dominic -- you are always two steps ahead.

Mark
Page 1 of 1
« first « previous next › last »