Discussion Forums  >  Crashes, Memory Warnings

Replies: 19    Views: 107

fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
05/20/12 06:34 AM (12 years ago)

SIGABRT error on orientation change (image gallery, BT2.0 self-hosted)

Our image galleries should be seen in portrait mode even on an iPad. But if the user changes orientation (on iPad 2), the app instantly quits. Only in the image galleries, not on other screens. All names of images seem ok. In Xcode, it pauses and I get this message: 2012-05-20 15:22:48.305 montreux[544:707] BT_rotatingTabBarController: willRotateToInterfaceOrientation 2012-05-20 15:22:48.755 montreux[544:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '[<BT_screen_images 0x4ac300> setNilValueForKey]: could not set nil as the value for the key rotating.' *** First throw call stack: (0x37e358bf 0x379811e5 0x37e357b9 0x37e357db 0x35146d4d 0x35145265 0x350f339d 0x350f2e33 0x9b6d 0x31a60885 0x31a60851 0x31a60185 0x318f281b 0x318f7fb9 0x37453ba7 0x309f0f7b 0x37e082dd 0x37d8b4dd 0x37d8b3a5 0x37b62fcd 0x3190b743 0x345bb 0x23e4) terminate called throwing an exception[Switching to process 7171 thread 0x1c03] Current language: auto; currently objective-c (gdb) Any idea? Thanks in advance!
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
05/20/12 05:01 PM (12 years ago)
Hey fusion, Seems like you found a bug? I cant fine the image gallery plugin for 2.0 - can you give me a link to the download so I can check and test it out? Take care, David buzztouchmods.com
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
05/20/12 10:34 PM (12 years ago)
Hi David! Here it is: http://www.buzztouch.com/plugins/download/bt_screen_images.zip Thanks for any help! Jack
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
05/21/12 04:49 AM (12 years ago)
in iOS source, file, BT_screen_images.m... line 53 line 71 line 732 line 929 line 932 there's only a few words / lines for the rotation code... perhaps removing 932, and setting 71 to YES (through, not sure if these changes would help more or hurt more, but tweak and see what you can do) when I get home I'll try to replicate the problem myself so I can see better the issue. Take care, David buzztouchmods.com
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
05/21/12 05:11 AM (12 years ago)
Thanks MrDavid, but... Removing 932 and setting 71 to YES brings an error message (something like 'rotation not implemented')... Hope you'll be able to replicate the problem! My iPad 2 is on iOS 5.0.1... Best greetings Jack
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
05/21/12 07:43 AM (12 years ago)
Okay will look into it soon... question, where did you download this plugin originally? I cant find it on buzztouch.com ANYWHERE! David buzztouchmods.com
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
05/21/12 08:31 AM (12 years ago)
Yes, you can find it... somewhere in the forum! And it's still there: http://www.buzztouch.com/plugins/download/bt_screen_images.zip Maybe this bug is a known issue? It would explain why it's not in the plugins list... I try not to bother David Book with too many questions... but in this case maybe I'll have to... except of course if you find the solution! This plugin is quite precious for me, as the apps I create rely heavily on photos embedded in them... I have an almost ready app (my first on bt self-hosted) but I can't submit it to Apple with this issue... Thanks for trying to find a solution! Jack
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
05/21/12 08:54 AM (12 years ago)
Hey Jack - I would recommend going to David on this one then. I cant for the life of me figure this one out - unless I'm totally missing something, it seems like this would be a easy fix.... grrrrr. The best I can tell you, if no-one (david) doesn't get back to you soon enough, and you have to release the app (like you said, you depend on it heavily) to restrict rotation in the app (at least it will work right?) until you add the fix, or "new feature" to your users ;) Get back to me on how that fix goes, sorry I couldn't have been more of a help this time. Take care, David buzztouchmods.com
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
05/21/12 09:04 AM (12 years ago)
OK, I'll contact David! I can't restrict rotation, I've read somewhere in the forum that it could be a rejection reason for Apple! Restricting rotation is ok for iPhones, but it seems they don't want such a restriction when it comes to iPads... Anyway, thanks for all, I'll post news in this thread as soon as I get a solution! Have a nice day (or night)! Jack
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
05/21/12 09:07 AM (12 years ago)
Yeah I heard that too, sneaky maybe to update it after getting it through however - not sure if you want to go that route - for now I think David can help anyways :) Looking forward to seeing it get solved for you :-) and np. Take care, David buzztouchmods.com
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/21/12 10:33 AM (12 years ago)
Hi Guys, There are all sorts of reasons that previous screen-types are not displayed in the list when creating a 2.0 app. How the rotation changes occur is one of them. It's not as easy as it sounds and we can't just "show all the old plugins" on the 2.0 list because there are nuances about how each screen works that are not understood by the 2.0 setup. This just means that if you use a new plugin (someones image gallery in this case) that isn't in the list that we make available for download, it's going to take some testing and debugging to get it to work. You can't simply "find an old URL" to a previous download and have it magically work. In this case, the older image gallery appears to work (reading the comments on this thread) but dies when the screen is rotated. So, we'll need to figure out why the screen rotations are causing the app to crash when using this older plugin. In looking at the error messages in the first comment in this thread, it looks like the app is crashing in the BT_rotatingTabBarController: willRotateToInterfaceOrientation method. You could try this: a) Open BT_rotatingTabBarController in Xcode. b) Scroll down to line 87 and find the willRotateToInterfaceOrientation method. c) In this method, look at the little code snippet that starts at line 126 and goes through 131. This code looks for a method called "setIsRotating" in the current screen. If it find one, it tries to set isRotating to Y. Comment out this code (line 126 / 131) and run. If the app does not crash, we isolated it to this section. Next, have a look at your images plugin. Does it have a property called "isRotating" ? I'll bet this is causing the crash. This means the image gallery plugin being used will need to be modified and a isRotating property will need to be added. This is a perfect example of why lots of the plugins are not included in the list that are available in v1.5. Each of the older plugins needs to be debugged, fixed, updated to support the 2.0 setup. Comment out that code section, see if it works...bet it does ;-)
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
05/21/12 11:24 AM (12 years ago)
David saves the day! and that cured my curiosity on why the plugin was unlisted, I thought initially you guys just forgot to add it. tell us how it goes fusion! David buzztouchmods.com
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
05/21/12 02:46 PM (12 years ago)
Bug reported here: http://buzztouchmods.com/downloads.php?cat_id=1&download_id=28&c_start=0 "Prew/Next buttons not showing up. BT2, Android." by vsystem. Maybe its a little more broken then originally thought. :-( David buzztouchmods.com
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
05/22/12 12:08 AM (12 years ago)
Thanks, David & David! Hope we'll not find more bugs... Anyway, I'm just into iOS, didn't try Android yet... Will try one day or another, but I got enough at the moment to play with... ;-) I've tried Mr Book's solution, but part of it is over my head... Did comment out lines 126 to 131 in BT_rotatingTabBarController, clean and run: still getting SIGABRT in Xcode and quitting if run disconnected from Xcode. Next, about 'isRotating' in the plugin: found in BT_screen_images.m something named 'setIsRotatingHelper' on line 929 but nothing else... And I'm not good enough with code to add the property! Within minutes I'll send my project to David Book, as suggested in the mail he sent me yesterday. Hope he'll find what's going on! Thanks for all and best greetings from rainy Switzerland! Jack
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
05/23/12 07:55 AM (12 years ago)
Here's the solution found by David Book: In BT_Layout, modify BT_rotatingTabBarController.m on lines 154-158: /* //if this view controller has a property named 'rotating' set it to false...This for sure //is used in the Image Gallery plugin... if ([theViewController respondsToSelector:NSSelectorFromString(@'rotating)]) { [theViewController setValue:0 forKey:@"rotating"]; } */ Just insert /* on the line before, and */ on the line after to comment out these lines of code and the image gallery will not crash anymore on orientation change. But beware! This plugin is not yet endorsed by Buzztouch for 2.0, test it thoroughly if you use it! Thanks a lot, David!!!
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
05/23/12 10:26 AM (12 years ago)
Hey fusion, Awesome! I'm going to apply & push the update to the plugin on BTM. Thanks to both of you for fixing this issue. :-) Take care, David buzztouchmods.com
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
06/04/12 07:53 PM (12 years ago)
Darn, just noticed the edit is in the actual app download files and not the plugin files. makes things more complicated for others. :-( have updated the plugin info and version through and pushed update through buzztouchmods. https://www.buzztouchmods.com/downloads.php?cat_id=1&download_id=28 Take care, David buzztouchmods.com
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
06/05/12 03:39 AM (12 years ago)
Thanks, David! BTW, I've submitted my 1st 2.0 self-hosted app 2 days ago and, as it features this plugin, it'll be a good test to see if the updated plugin is now ok... I'll post the info here as soon as I get news from Apple! Best greetings Jack
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
06/12/12 01:27 AM (12 years ago)
Hi there! Our latest app ('Montreux') has been accepted by Apple. Which means that the debugged plugin is ok! At least for the sigabrt error on orientation change. Many thanks to David and David for the help!
 
afinta
Lost but trying
Profile
Posts: 18
Reg: Apr 19, 2012
location unknow...
2,730
like
08/31/12 08:45 AM (11 years ago)
I just noticed this: "This is a perfect example of why lots of the plugins are not included in the list that are available in v1.5. Each of the older plugins needs to be debugged, fixed, updated to support the 2.0 setup. " So I assume that some of the older plug ins available for previous versions will eventually be available for 2.0?
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.