Issue 83 in xar: xar_register_errhandler's usrctx gets set to NULL when a new error is raised

1 view
Skip to first unread message

codesite...@google.com

unread,
Mar 5, 2012, 3:44:24 PM3/5/12
to xar-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 83 by bertra...@gmail.com: xar_register_errhandler's usrctx gets
set to NULL when a new error is raised
http://code.google.com/p/xar/issues/detail?id=83

What steps will reproduce the problem?
1. Register an error handler using xar_register_errhandler(x, callback,
some_custom_context)
2. xar_extract_tofile to a folder that is read only
3. the registered callback gets called with the error

What is the expected output? What do you see instead?
I'd expect the "some_custom_context" to be passed as the err_handler's
usrctx parameter, but I keep getting nil.

What version of the product are you using? On what operating system?
OS X Lion + XAR 1.5.2 from the Download's tarball.

Please provide any additional information below.

The issue happens because the usrctx is stored within the errctx struct and
when an error is reported xar_err_new is called which memsets errctx thus
removing the context. I would have expected the usrctx to be stored in the
same struct as the callback which would fix this issue.

I need this so that the error handler will call my ObjC wrapper.

Reply all
Reply to author
Forward
0 new messages