iphone: co-processor offset out of range - iphone

i have a strange compiling problem with xcode and iphone. my game is almost finish but now i got suddently this compiling error:
{standard input}:6108:co-processor offset out of range
gcc-4.2 failed with exit code 1
this only happens if i compile the release version for the device. the debug version and both versions for the simulator works. clean targets and recompile don't work.
strangly enough that error only happens if i add a line of code to one specific source file and only between these lines:
[_sharedDirector checkAndPutScoreToHighscore:(int)[player score]];
gameOverScreen = YES;
gameOverScreenSlideY = 320.0f;
[buttonManager activateButtonWithID:replayButton];
[buttonManager activateButtonWithID:menuButton];
so when i put a random line between this lines of code i get that error.
i do not know what causes this error. i had opened the sourcecode file to "show as assembly file" just for fun but i don't think this has caused the error.
has anybode a hint for me what could be going on? i am searching the web for over 3 hours and thats very frustrating.

You most likely found a compiler bug. You really should switch to the LLVM compiler (clang).

Related

Abort Trap: 6 error after upgrading to Xcode 14

I just updated my Xcode to Version 14.1 (14B47b) from version 13.4. When I try to run my SwiftUI project in the live preview, the "Abort Trap" errors showed everywhere in the project.
Part of the error log is as below:
CompileSwift normal x86_64 /Users/apple/Downloads/SwapSpot/SwapU/ViewModels/ItemVMs/ItemGridViewModel.swift (in target 'SwapU' from project 'SwapU')
unknown:0: error: fatal error encountered during compilation; please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project
unknown:0: note: SmallVector unable to grow. Requested capacity (4294967297) is larger than maximum value for size type (4294967295)
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project and the crash backtrace.
I found a post that answers as such:
We will not observe "Abort: trap 6", if under Build Settings, we are using "Optimize for Speed" in Debug, instead of "No Optimization"
We can also avoid "Abort: trap 6", if we change the following code
guard let batchUpdateResult = batchUpdateResult else { return }
to
guard let batchUpdateResult2 = batchUpdateResult else { return }
I tried both methods mentioned above. Renaming the guard let variable did not work at all. Changing the optimization level in the target removed all the Abort Trap errors, and the project runs successfully in the simulator.
However, the live preview stopped working due to the optimization level. The new error is stated below:
OptimizationLevelError: not building -Onone
"SwapU.app" needs -Onone Swift optimization level to use previews
I believe this is a swift compiler error. Can anyone help me avoid this while keeping the live preview working?

VSCode showing weird errors in my Haxe Code

i just started learning Haxe today and i got a couple of problems with my VSCode.
There are 3 "Errors" in total, to be exact 2 errors and 1 info, but the info seems kind of wrong and i would like to know how to get rid of it aswell.
Before i go into more detail, some info that might be relevant:
I created my project using the "Haxe: Initialize Project" from the Haxe VSCode extension
I changed nothing in the build.hxml file
If i run my code via VSCode (Ctrl-Shift-B) i get an error
If i run it on a normal CMD with "haxe build.hxml" it works totally fine, no errors at all
The Code:
class Main {
static function main() {
trace("Hello, World!");
var t:String = Sys.stdin().readLine().toString();
trace(t);
}
}
The build.hxml file:
-cp src
-D analyzer-optimize
-main Main
--interp
The first error i get:
It seems that this error is not even in my own file, how can this be?
The Sys.stdin().readLine() seems to have something to do with it, since this error came the moment i added this line.
Uncaught exception Not implemented in haxe.io.input.readByte at haxe/io/Input.hx tasks [180. 1]
Screenshot from VSCode
The second error i get:
Once again it seems to have something to do with Sys.stdin().readline() this time this exact part of my code is red underlined and the error message is pointing at this exact line.
Called from here tasks [4, 18]
Screenshot from VSCode (Error)
Screenshot from VSCode (red underline)
The (kind of) error / Info i get:
This is the most weird one imho..
Its a blue "~" i get at the beginning of my trace("Hello, World!"); line.
Screenshot from the weird Blue Symbol
Screenshot from the VSCode "Problem" regarding this line
Thanks in advance!
I looked through the internet the whole day hoping to find something to get this things solved on my own, but since its my first time ever using Haxe and i was not able to find something even similar to this i hope some of you 5heads out there can help me with this. :)

including Kal.a (from Kal calendar) and including libidn.a (xmpp framework) causes app to crash

After trying really hard i am posting this qustion in the 2 o clock of night in my office.
The problem is :
1) i have included Kal calender (link here) in my application
2) And its really working fine before i decided to include xmpp framework(xmpp framework) in my application.
3) The Main problem is when i try to include libidn.a file and then compile the project it gives me 4 errors , and to remove these error i have to remove "Other linker flag -> -all_load".
4) Here the problem begins when i have removed -all_laod flag and compile , app compiles success fully. But i try to run my app and press calendar button to load calender it crashes with following error:
-[__NSDate cc_dateByMovingToFirstDayOfTheMonth]: unrecognized selector sent to instance 0x75b85c0 2012-06-12 01:38:47.483 BizPro[10251:11903]
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDate
cc_dateByMovingToFirstDayOfTheMonth]: unrecognized selector sent to
instance 0x75b85c0'
* First throw call stack: (0x209e022 0x22f0cd6 0x209fcbd 0x2004ed0 0x2004cb2 0x12bc3d 0x12bb91 0x13149e 0x1315f6 0x12961 0xa8d38f
0xa8d5eb 0xa9dff1 0xa9e85f 0xa9e9e1 0xbbc5c2 0xa02d21 0x209fe42
0x856679 0x860579 0x7e54f7 0x7e73f6 0x874160 0x9d4f30 0x207299e
0x2009640 0x1fd54c6 0x1fd4d84 0x1fd4c9b 0x26e67d8 0x26e688a 0x9c4626
0x2a9d 0x2a15 0x1) terminate called throwing an exception(lldb)
4) I know very well that this error is a misguide (NSDate is not causing the crash but the collision of static libraries is doing it , i think so) , because when i again add -all_load flag and remove the libidn.a file from my project , It compile and RUN successfully and calendar displays my data smoothly.
i googled a lot about it .. and got very little guidance .. relating the solution to workspaces and all that .. But i really dont know what could be the solution .. Plz help me
Thanks
cc_dateByMovingToFirstDayOfTheMonth
is an addition to NSDate that is defined in NSDateAdditions.h from the Kal Framework.
I had no end of problems and wanted more customisation of the Kal framework so I just dragged all the source code into my project.
If you still have issues with the framework then remove Kal.a and just bring in the source code :) then you can get dirty with it
If you rather keep Kal as a subproject, the way to fix this is to link the addition files.
Under
Project -> Build Settings -> Linking -> Other Linker Flags
add '-all_load'
sorry i am answering late ..
i solved the problem ..
removed kal.a file and just included src folder (all the header files required)
so that i will not collide with the other static library ...
Similar problem here. Because I'm using Parse Framework, can't add -all_load, so integrating static library will never work for me. The simplest way is to add all source files in src folder to my own project, rather than adding Kal.xcodeproj. Other steps to config "copy bundle files" or "header search path" etc are still necessary. I also need to add these lines from Kal_Prefix.pch to my own project.pch.
#import "NSDate+Convenience.h"
#define RGBCOLOR(R,G,B) [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:1]
#define RGBACOLOR(R,G,B,A) [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:A]
#define kDarkGrayColor RGBCOLOR(51, 51, 51)
#define kGrayColor RGBCOLOR(153, 153, 153)
#define kLightGrayColor RGBCOLOR(185, 185, 185)

Strange Xcode error

When I run my app, i get one error and i dont know how to fix it. Can someone help me?
Here is the error:
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
Picture: http://imageshack.us/photo/my-images/200/screenshot20110609at256.png/
Thanks
The causative problem is the error immediately preceding that one, the duplicate symbol error.
gcc-4.2 failed with exit code 1 Error Occurs due to some of your file or frame work are duplicated check it out which file is in you target link file or in your framework are repeated.
from your log message "didUpdate" may be repeated in your project look for that...
May be this is helpful to You.
From the error message, it seems like didUpdate is defined more than once in your code. Search for didUpdate on your workspace and make sure it's only being defined once.
Either you are redefining variable or you are probably importing a *.m file somewhere in your project.Try importing corresponding *.h file.

Strange, Sudden compiler fail error in Xcode for iPhone dev

What is the following error caused by? I did not make any significant changes and suddenly it started appearing:
Linking /Users/JimB/Desktop/iPhone Dev/Games4Kids/build/Debug-iphonesimulator/ETFanClub.app/Games4Kids(1 error)
duplicate symbol .objc_category_nameNSString_HTTPExtensions in (path)ViewController3 and (path)ViewController1
Command /Xcode 3.1.4/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
The symbol .objc_category_nameNSString_HTTPExtensions is duplicated, meaning the category NSString(HTTPExtensions) is declared twice ViewController3 and ViewController1.
Check that you don't have #implementation's in the headers #import-ed by both of these files, and they don't both have #implementation NSString(HTTPExtensions) simultaneously.