Recent

Author Topic: Carbon application crash on 10.4  (Read 14696 times)

Jaco

  • New Member
  • *
  • Posts: 45
Carbon application crash on 10.4
« on: March 26, 2008, 04:50:10 pm »
Hello,

A carbon application I made on an intel MacOS 10.5 machine gave an immediate crash on an Intel 10.4 machine.
I made a tiny "Hello world" application with only one form, which caused the same crash.
Here is the console log:

OS Version:     10.4.11 (Build 8S2167)
Report Version: 4

Command: testje
Path:    /GIANTT/Temp/testje.app/Contents/MacOS/testje
Parent:  WindowServer [55]

Version: 0.1 (1)

PID:    528
Thread: Unknown

Link (dyld) error:

Symbol not found: _kUTTypePlainText
  Referenced from: /GIANTT/Temp/testje.app/Contents/MacOS/testje
  Expected in: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices


Would appreciate some help to avoid this from happening !

Thanks,

Jaco

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Carbon application crash on 10.4
« Reply #1 on: March 26, 2008, 05:10:06 pm »
Quote from: "jvoorham"
Link (dyld) error:

Symbol not found: _kUTTypePlainText
  Referenced from: /GIANTT/Temp/testje.app/Contents/MacOS/testje
  Expected in: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices


_kUTTypePlainText is a clipboard format, defined in FPCMacOSAll.pas. This should be available in 10.4 too.

It's used in TCarbonClipboard.Create.

Not sure what to suggest. I'm running Carbon apps on 10.4 without problem.

Thanks.

-Phil

Jaco

  • New Member
  • *
  • Posts: 45
Carbon application crash on 10.4
« Reply #2 on: March 27, 2008, 09:25:44 am »
Thanks Phil for the feedback.

Could you be so kind to test the Hello World application on your 10.4 machine, so that I can tell whether it is the application or the system I tried to run it on that caused the problem ?

Jaco

Phil

  • Hero Member
  • *****
  • Posts: 2737
Carbon application crash on 10.4
« Reply #3 on: March 27, 2008, 02:41:23 pm »
Quote from: "jvoorham"
Thanks Phil for the feedback.

Could you be so kind to test the Hello World application on your 10.4 machine, so that I can tell whether it is the application or the system I tried to run it on that caused the problem ?

Jaco


I don't have an Intel machine, but if you post the source I could compile and run it.

Thanks.

-Phil

chillibear

  • Newbie
  • Posts: 3
Carbon application crash on 10.4
« Reply #4 on: March 28, 2008, 01:11:02 pm »
I'd be happy to try the app out on a 10.4 intel machine - will have access to my intel 10.4 mac again next week.

Phil

  • Hero Member
  • *****
  • Posts: 2737
Carbon application crash on 10.4
« Reply #5 on: March 29, 2008, 06:03:48 pm »
Quote from: "jvoorham"
Thanks Phil for the feedback.

Could you be so kind to test the Hello World application on your 10.4 machine, so that I can tell whether it is the application or the system I tried to run it on that caused the problem ?

Jaco


It runs fine when compiled on my 10.4 PowerPC machine. I deleted the indylaz package from your .lpi file since indylaz.lpk 10.2.1 won't compile with Lazarus (I just use the FPC units).

Try taking indylaz out of your project since it doesn't need it and see if that makes any difference. I wouldn't think so but just in case.

There is a serious bug in netdb.pp used by Indy that has not yet been fixed for FPC 2.2. But the error you're getting doesn't look related to that.

Thanks.

-Phil

Jaco

  • New Member
  • *
  • Posts: 45
Carbon application crash on 10.4
« Reply #6 on: March 29, 2008, 06:58:31 pm »
Thanks for the testing.

The indylaz was a leftover from another test application, and I do use the Indy FTP a lot on 10.5, without any problem.ffre

Another test with my compiled test on a different Intel 10.4 machine gave the same problem, so it was (unfortunately) not something specific of that first machine.

Although I definitively would like to solve this issue, for practical reasons (moving on!)  I am considering now is to generate powerpc executables, since most of my users have these.
I looked a bit into cross-compiling (on my Intel 10.5 compiling for powerpc), and found the information quite difficult to follow. Could you direct me to a good guide (low level knowledge needed, I mean) to do this?

Thanks,

Jaco

Phil

  • Hero Member
  • *****
  • Posts: 2737
Carbon application crash on 10.4
« Reply #7 on: March 29, 2008, 07:28:35 pm »
Quote from: "jvoorham"
Thanks for the testing.

The indylaz was a leftover from another test application, and I do use the Indy FTP a lot on 10.5, without any problem.ffre

Another test with my compiled test on a different Intel 10.4 machine gave the same problem, so it was (unfortunately) not something specific of that first machine.


But did you compile and test on 10.4 *without* the indylaz package? That's what I'm trying to rule out.

Thanks.

-Phil

Jaco

  • New Member
  • *
  • Posts: 45
Carbon application crash on 10.4
« Reply #8 on: March 29, 2008, 08:14:51 pm »
Yes, I did.

The first test app was just a form, did not even ave a label on it (and no indylaz package added).

Phil

  • Hero Member
  • *****
  • Posts: 2737
Carbon application crash on 10.4
« Reply #9 on: March 29, 2008, 09:07:47 pm »
Quote from: "jvoorham"
Yes, I did.

The first test app was just a form, did not even ave a label on it (and no indylaz package added).


Very odd. I suppose it's possible that Leopard is new enough that nobody has tested a 10.5-compiled Laz app on a 10.4 machine and you've discovered a linking issue or something.

Here's some things to try:

- Compile a single console app on 10.5 and see if it runs okay on 10.4 machine. This should not have any dependence on any frameworks. You can see by doing this:

otool -L myapp

This test should indicate if there's anything wrong with the basic linking. There are lots of linker options. If you have sogudi installed, enter man:ld in the URL box in Safari to see the linker help.

- Compile a simple Laz app on 10.4 and see if it runs okay on 10.5 machine. If this works, then I would suspect some kind of backward compatiblity link issue.

- Since I have a PowerPC machine I don't think I can do any cross-compiling, but I can supply you with a ready-to-install (.dmg file) OS X version of one of my work apps that you could test. This app uses Indy with the Web Service Tookit to get data via a Web service. Your Intel machine's Rosetta should allow it to run PowerPC apps. This would also be a test of whether a 10.4 compiled app can run on 10.5

Thanks.

-Phil

Jaco

  • New Member
  • *
  • Posts: 45
Carbon application crash on 10.4
« Reply #10 on: March 29, 2008, 10:53:55 pm »
OK, I'll try this with a console app, and look into the linker options.

Unfortunately I can't compile a Laz pp on 10.4, since I only have my Macbook pro.

But, the only way to find out whether this is a problem of my environment, or a generic 10.5 => 10.4 compatibility issue, is that somebody else tries to duplicate my observation. So, is there someone who could
1) make a simple test app on an Intel 10.5, and testrun it on an Intel 10.4 ?

Jaco

Phil

  • Hero Member
  • *****
  • Posts: 2737
Carbon application crash on 10.4
« Reply #11 on: April 02, 2008, 09:56:47 pm »
Quote from: "jvoorham"
OK, I'll try this with a console app, and look into the linker options.

Unfortunately I can't compile a Laz pp on 10.4, since I only have my Macbook pro.

But, the only way to find out whether this is a problem of my environment, or a generic 10.5 => 10.4 compatibility issue, is that somebody else tries to duplicate my observation. So, is there someone who could
1) make a simple test app on an Intel 10.5, and testrun it on an Intel 10.4 ?

Jaco


I see Jonas' explanation to your bug report:

http://bugs.freepascal.org/view.php?id=11094

I was afraid it was going to be something like that. Apple sometimes has a way of making things difficult for developers. A couple of comments:

(1) You don't need to target anything earlier than 10.4 with Intel or when cross-compiling for PowerPC since the Carbon widgetset only supports 10.4 and later.

(2) Not sure if the SDK's for previous versions are installed by default.

(3) You won't be able to use the current snapshots since they're 2.2.0.

Eventually this will all become easier. Note Tomas' recent patch to eliminate the linker error on 10.5.

Thanks.

-Phil

Jaco

  • New Member
  • *
  • Posts: 45
Carbon application crash on 10.4
« Reply #12 on: April 03, 2008, 10:35:13 am »
Well, reporting this as a bug at least gave me the information I was looking for.
Not sure how to proceeed now.
Compiling my apps on a powerpc, would this avoid the problem, sticking to carbon?

Jaco

Phil

  • Hero Member
  • *****
  • Posts: 2737
Carbon application crash on 10.4
« Reply #13 on: April 03, 2008, 03:20:11 pm »
Quote from: "jvoorham"
Well, reporting this as a bug at least gave me the information I was looking for.
Not sure how to proceeed now.
Compiling my apps on a powerpc, would this avoid the problem, sticking to carbon?

Jaco


Yes, that should work - make sure it's a PowerPC with 10.4.

Unless your app is really processor intensive I doubt if you'll notice much of slowdown running a PowerPC app with Rosetta on Intel.

I have an actual app all ready to go (in .dmg) that was compiled on 10.4 PowerPC if you need something to test on an Intel 10.5 machine.

Thanks.

-Phil

Jaco

  • New Member
  • *
  • Posts: 45
Carbon application crash on 10.4
« Reply #14 on: April 03, 2008, 03:24:24 pm »
Thanks Phil, that's an useful answer to define my approach.
So, I'll go to the 2nd-hand market to find myself a compiling machine...

Yes, I would appreciate your application to test on this intel 10.5 machine.

Many thanks,

Jaco

 

TinyPortal © 2005-2018