Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / December 2006



Tip: Looking for answers? Try searching our database.

xcode bus error revisited

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Santa Claus - 26 Dec 2006 00:49 GMT
I'm starting to get the xcode bus error yet again

i've zipped up all needed files and put them on my site for folks to download:
http://robertdell.dyndns.org/files/YASSE_copy.zip

Would somebody please download this file (less than 600k and expands to about 4 megs)
and tell me if they got the bus error and if so, why is it happening?

the needed settings are in the project file so it should be compiled as-is
Florian Zschocke - 26 Dec 2006 10:09 GMT
Santa Claus <santa@northpole.com> schrieb:

> I'm starting to get the xcode bus error yet again
>
[quoted text clipped - 5 lines]
>
> the needed settings are in the project file so it should be compiled as-is

Why do you have these ";" in the function head and after the closing bracket.
You are the first person I see coding this way. I think that is wrong. I don't
know if that can cause your error. For me and my powerbook it is nearly
impossible to handle yasse.m it is to big. Every action takes minutes.

Florian
Patrick Machielse - 26 Dec 2006 12:00 GMT
> Santa Claus <santa@northpole.com> schrieb:
>  
[quoted text clipped - 7 lines]
> know if that can cause your error. For me and my powerbook it is nearly
> impossible to handle yasse.m it is to big. Every action takes minutes.

I can only agree. The first compiler error is in a 900 (!) line method,
containing around 200 nested if statements (maybe this exceeds some
internal compiler limit?). Don't program like this!

Really, there is no reason to have a 34k line .m file. Either it should
be split up, or/and the code should be written more compact (I'm
thinking of the initialization routines; Santa, please use a loop when
you are adding 100 items to an array, don't write it all out...)

On a side note: I too hate that 'cc1obj has crashed' message. That
really shouldn't happen, and it really shouldn't happen that regularly.
Bad Apple :-(

patrick
Santa Claus - 27 Dec 2006 01:55 GMT
>> I can only agree. The first compiler error is in a 900 (!) line method,
> containing around 200 nested if statements (maybe this exceeds some
> internal compiler limit?). Don't program like this!

oops, forgot to comment on this...

i was also considering switching from that many if statements into a
case statement.

considering the fact that ALMOST everything needs to be included in one file,
the choices on what to eliminate into a separate class gets limited.
Michael Ash - 27 Dec 2006 03:40 GMT
> considering the fact that ALMOST everything needs to be included in one file,
> the choices on what to eliminate into a separate class gets limited.

Um, what? Why does "ALMOST everything" need to be in the same file? I've
shipped serious apps which contained no source file that broke 2,000
lines.

Signature

Michael Ash
Rogue Amoeba Software

Santa Claus - 27 Dec 2006 01:55 GMT
> Really, there is no reason to have a 34k line .m file. Either it should
> be split up, or/and the code should be written more compact (I'm
[quoted text clipped - 6 lines]
>
> patrick

actually, the program WAS around 50k lines long and compiles flawlessly.  it
wasn't until i started to modularize what could be modularized when things started
going wrong.
Michael Ash - 26 Dec 2006 16:13 GMT
> Santa Claus <santa@northpole.com> schrieb:
>
[quoted text clipped - 12 lines]
> You are the first person I see coding this way. I think that is wrong. I don't
> know if that can cause your error.

While it's strange and probably bad style, there's nothing wrong with it.
Putting a semicolon where you don't need one normally results in a nop.
This is not true if the semicolon is between two things that are supposed
to be related, but putting one at the end of a function is fine. If you
put ";;;;;;;;;;" in between two functions it will compile without a
problem.

Incidentally, my entry in the 2005 IOCCC took advantage of this property
to build a combined C/Lisp program, as ; is the Lisp comment character.
Most of my semicolons terminated statements as you'd expect, but the first
character in the file was a semicolon, as that was the only safe way to
start the file in both languages.

Of course, "used in a winning IOCCC entry" is not exactly a resounding
endorsement of style.

Signature

Michael Ash
Rogue Amoeba Software

Florian Zschocke - 26 Dec 2006 17:01 GMT
Michael Ash <mike@mikeash.com> schrieb:


> While it's strange and probably bad style, there's nothing wrong with it.
> Putting a semicolon where you don't need one normally results in a nop.
> This is not true if the semicolon is between two things that are supposed
> to be related, but putting one at the end of a function is fine. If you
> put ";;;;;;;;;;" in between two functions it will compile without a
> problem.

What is about the size? I there a limit? Can a compiled object grow endless?

Florian
Michael Ash - 26 Dec 2006 17:31 GMT
> Michael Ash <mike@mikeash.com> schrieb:
>
[quoted text clipped - 6 lines]
>>
> What is about the size? I there a limit? Can a compiled object grow endless?

In theory there should be no limit, in practice... well, you'll eventually
run out of memory if nothing else.

However, it is not too uncommon to run into multi-megabyte source files.
Aside from horrible programmers who don't understand the benefits of
modularization, there are also some situations where very large
machine-generated source files are compiled. I doubt the massive size by
itself would cause anything here, but it's probably a contributing factor
in getting a crash instead of a sensible error. In my experience gcc will
happily crash if you confuse it enough, so that part isn't too remarkable.

Signature

Michael Ash
Rogue Amoeba Software

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.