-
Notifications
You must be signed in to change notification settings - Fork 22
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
Memory leak when recreate canvas #42
Comments
The yellow page of "Just Canvas", is it: a yellow image by ctx.drawImage() or ctx.fillStyle = 'yellow' then ctx.fillRect() ? |
@flyskywhy thats just a background of View
|
I am meeting the same problem |
fixed by @flyskywhy/[email protected] |
Still having the same problem in fixed version My onCanvasCreate method:
Not using any local variables to make sure memory doesn't leak there. |
2.3.22 just fixed the issue in iOS, because I test and found it's already OK on Android. |
The memory leak is still here. :( |
Hi flyskywhy, I am working with Loovery (Grigory) here and we are not experts in objective c/ios code and these memory leaks. If there is anyway I could inspire you to help us find the problem please let me know. We love what you have done here. We are a startup but still we have a commercial product that is making us some money, so I would pay you to help us. |
@Loovery @avanlaningham , OK, I can try 😄
|
memory-leak.mov |
But Grigory normally it was about 6 times or something that it would crash after. Giving rough number might help him better understand. |
@Loovery , fixed by @avanlaningham , Donate link is in |
@flyskywhy New problem `void GCanvasContext::UseDefaultRenderPipeline()
}` File: GCanvas2dContext |
Have never meet such EXC_BAD_ACCESS in the past years, how to reproduce it? |
@flyskywhy Once we have this fixed, I will see if I can figure out how to send crypto. I have played with it a bunch but I am more of a beginner. I have crypto in different places but I don't even know how to transfer it to you :) I have not looked at it in a few years so I would have to figure out how to even access it. But yes if we can't figure that out, I could do bank transfer. Thanks for trying to help. |
@Loovery , If this only reproduced when you rotate the phone (e.g. from portrait to landscape or viceversa), so why don't you use |
@flyskywhy I live in Europe but am American and so I have no way to open a crtypto account. I used to have some but they blocked me because I am American. Crazy. I have some WAVES crypto in META MASK I could send you. I could do bank transfer also. Thanks for your help |
@flyskywhy Wait. Oh I found some ETH I had and sent it :) |
@flyskywhy This is suitable for a simple use case scenario. But we have too many appearance changes when the orientation changes. So a complete rebuild is used |
I just test the new commit Rotate Remount to test Memory Leak: just copy from https://github.com/Loovery/gcanvas-memory-leak/commit/b69fce2 of my GCanvasRNExamples, and rotate iPhone quickly and no Maybe there is something else affect the error, e.g. my GCanvasRNExamples use |
EXC_BAD_ACCESS: context > reInitContext > resetGlViewport: > Sometimes I catch this error |
I use RN 0.71.13 in main project |
@Loovery , I just released |
Hey, found one curious case on iOS (im not sure, but probably this problem on Android as well, still investigate)
We have screen with GCanvas, after some attempts to open this screen, we got crashes.
Test shows, after closing screen, memory doesn't clean, and i think GCanvas still remain in memory after close. So ios terminate process due overusing memory
Screen.Recording.2022-05-12.at.13.30.06.mov
The text was updated successfully, but these errors were encountered: