-
Notifications
You must be signed in to change notification settings - Fork 268
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
Crash in 1.8.2 #219
Comments
That does indeed look like a bug that was fixed in 2.0. Its actually really easy to upgrade - we strongly recommend this. |
Actually on 2nd look at that trace, I'm not sure that that is the bug that I had in mind. Unfortunately, as we're a free and volunteer-based project it becomes a personal out-of-pocket expense for us to support older versions. Our limited resources means we can't always do this. However, you're welcome to engage in some professional consulting / support with Al Digit or myself. Otherwise, let's get you onto version 2 and we'll continue. |
Thanks @jasperblues. To clarify, are you now saying this is fixed in 2.0, or potentially not? Obviously at this point in our testing cycle, we're looking for small, targeted fixes, not wholesale upgrades to a library. If this is fixed in 2.0, could you point me to the potential fix and let me see if I can cherry-pick it over into 1.8.x fork? |
Sorry. I'm saying I'm not sure. At first the description reminded me of an issue with early versions of runtime args. Please put a breakpoint before that crashing line and tell me value of the 'typeCode' string that has suffix '>'. That assumption about array components has always been correct until now - a protocol name in angle brackets. |
I'm available on Skype - 'jasperblues' |
@kcharwood can you share your property declaration which cause this crash? You can see property name in debugger in [TyphoonIntrospectionUtils typeForPropertyWithName:inClass:] call |
@alexgarbarev 👍 and @kcharwood also the TyphoonDefinition from the assembly? |
I've got a couple of meeting stacked up this morning. After that, I'll grab that info and attach it here. |
We've only seen this once, so we can't actually reproduce this. I'm not exactly sure which property caused the crash, or how to grab that information... Here is our (obscured) definition. return [TyphoonDefinition
withClass:[Obscured class]
initialization:^(TyphoonInitializer *initializer) {
initializer.selector = @selector(initWithObscuredArgument1:ObscuredArgument2:ObscuredArgument3:ObscuredArgument4:);
[initializer injectWithDefinition:[self ObscuredMethod1]];
[initializer injectWithDefinition:[self ObscuredMethod2]];
[initializer injectWithDefinition:[self ObscuredMethod3]];
[initializer injectWithDefinition:[self ObscuredMethod4]];
} properties:^(TyphoonDefinition *definition) {
definition.scope = TyphoonScopePrototype;
}]; |
Crash call stack says that something going wrong during property injection. Check properties of objects, received by ObscuredMethod1, ObscuredMethod2, ObscuredMethod3, ObscuredMethod4. Also make sure that all typhoon calls was on same thread, since typhoon 1.8.2 is not threaded-safe |
I finally caught this in the debugger today. I tried capturing all of the information that was requested above. A couple of strange things that I noticed while poking around the stack trace:
|
Thanks for info @larsacus.
Looks like you calling Typhoon from NSOperationQueue, but as I said before, Typhoon 1.8.2 is not threaded safe (it become threaded safe since 564fe91). In code you pointed, 'buffer' is static, so shared between threads, I think its a problem. |
That particular NSOperaionQueue that this was run on is not serial. Before I posted the trace above, we came to the same conclusion that it was likely a threading issue that caused |
@larsacus We may be able to back-port the tread-safety for you. But again we recommend upgrading to Typhoon 2.0.
|
@alexgarbarev Good analysis and well spotted! |
@larsacus It appears you have a work-around, meanwhile this issue is addressed in Typhoon 2.x Therefore we'll close this issue for now. Please reopen or raise a new one if you still have some concerns. |
We've "upgraded" to 2.0 as a workaround |
We're close to shipping a new product, so we haven't made the jump to 2.0 yet.
We did see a strange crash come in overnight last night, and wanted to see if anyone here had any insight...
Looking at the line that crashed, it looks like there is an assumption made that the resulting components array will always contain two items. Can anyone think of any reason why that would happen given naming convention of a typeCode in Typhoon?
Should there be a check there to confirm there are two items before proceeded with calling the array? Would it be possible to issue a 1.8.3 hotfix if that is the case (I know 2.0 is the version you are looking to support, but its too late in the game to bring in a new version for us right now).
Let me know your thoughts.
🍻
The text was updated successfully, but these errors were encountered: