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

Apps may crash during free if the app is built for Debug. #353

Closed
PooyaZv opened this issue Feb 18, 2016 · 0 comments
Closed

Apps may crash during free if the app is built for Debug. #353

PooyaZv opened this issue Feb 18, 2016 · 0 comments
Labels

Comments

@PooyaZv
Copy link

PooyaZv commented Feb 18, 2016

Known issue:

This is because the framework is built for Release and thus uses a different memory pool that the app when the app is built for Debug. Thus calling APIs that allocate memory in the framework and freeing memory later in the app or vice versa will cause the app crash on free. An example of a stack with this issue is as follows (note “free” on top on the stack):

>> ucrtbase.dll!free(void * block)
Foundation.dll!_i_NSData__dealloc(NSData * self, objc_selector * _cmd)
libobjc2.dll!release(objc_object * obj)
libobjc2.dll!objc_release(objc_object * obj)
libobjc2.dll!objc_storeStrong(objc_object * * addr, objc_object * value)
Call to destructor in the app ---
libobjc2.dll!call_cxx_destruct(objc_object * obj)
libobjc2.dll!object_dispose(objc_object * obj)
Foundation.dll!_i_NSObject__dealloc(NSObject * self, objc_selector * _cmd)
libobjc2.dll!release(objc_object * obj)
libobjc2.dll!objc_release(objc_object * obj)
libobjc2.dll!objc_storeStrong(objc_object * * addr, objc_object * value)
App's frames ---
StarboardWS.dll!ApplicationMainStart(int argc, char * * argv, const ch ...
StarboardWS.dll!WinObjcMainLoop(void * param)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants