calling an external process
calling an external process
- Subject: calling an external process
- From: Carlos Maldonado <email@hidden>
- Date: Sat, 24 Oct 2009 17:49:36 -0700
Hi List,
I'm debugging this code where there's a call to an external tool that
converts some audio files. This tool is in an obj-c/c mix code and as
far as I can tell it leaks memory but this is not the real issue.
The problem is that sometimes this tool crashes with the following
output to its own crash report:
***************************************************************************
Process: theConverter [7329]
Path: /Users/theT/theConverter
Identifier: theConverter
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: java [39338]
Date/Time: 2009-10-24 16:35:34.648 -0700
OS Version: Mac OS X Server 10.5.8 (9L34)
Report Version: 6
Anonymous UUID: C60F98EE-37EA-4542-AF4E-71677F76441E
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000004
Crashed Thread: 0
Thread 0 Crashed:
0 ...ple.ApplicationServices.ATS 0x91ae2307
GetDataChunkPtr(OpaqueStringLookupStruct*) + 15
1 ...ple.ApplicationServices.ATS 0x91ae21c4 FindKeyForPString +
40
2 ...ple.ApplicationServices.ATS 0x91ae20ba
_eFOGetFontFamilyFromName + 244
3 ...ple.ApplicationServices.ATS 0x91ae1fac
FOGetFontFamilyFromName + 62
4 com.apple.QD 0x97142e75 GetFNum + 17
5 com.apple.HIToolbox 0x921845a6 HLTBGetFontNumber +
24
6 com.apple.HIToolbox 0x921842b8 SetCustomizedFields
+ 991
7 com.apple.HIToolbox 0x92143809 InitIntlValue + 74
8 ...ple.CoreServices.CarbonCore 0x95372d50
IntlIsInitIntlValueDone + 34
9 ...ple.CoreServices.CarbonCore 0x95387af1 GetCachedItlbValue
+ 21
10 ...ple.CoreServices.CarbonCore 0x95397b68
GetScriptVariable_FontValue + 444
11 ...ple.CoreServices.CarbonCore 0x953720dd GetScriptVariable +
589
12 ...ple.CoreServices.CarbonCore 0x953977d9 InitLowMemFonts + 65
13 ...ple.CoreServices.CarbonCore 0x95397788 _LMGetSysFontFam + 27
14 ...ple.CoreServices.CarbonCore 0x953976c3 _IntlScript + 50
15 ...ple.CoreServices.CarbonCore 0x9539768e IntlScript + 11
16 com.apple.QuickTime 0x90054dfa
PrivateGetMoviePublicMovieComplete_priv + 400
17 com.apple.QuickTime 0x9019a4da
NewMovieFromHandlePriv + 467
18 com.apple.QuickTime 0x9019a95d
NewMovieFromHandle_priv + 47
19 com.apple.QuickTime 0x9019a921 NewMovieFromHandle
+ 45
20 ...le.QuickTimeMPEG4.component 0x94fbabca
SpitMP4_FromProceduresToDataRef + 6711
21 ...le.QuickTimeMPEG4.component 0x94fb4237
SpitMP4_ComponentDispatch + 123
22 ...ple.CoreServices.CarbonCore 0x95380935
CallComponentDispatch + 29
23 com.apple.QuickTime 0x90299332
MovieExportFromProceduresToDataRef + 49
24 ...le.QuickTimeMPEG4.component 0x94fb871b SpitMP4_ToDataRef +
3066
25 ...ple.CoreServices.CarbonCore 0x95380fcf
CallComponentFunctionCommon + 1403
26 ...le.QuickTimeMPEG4.component 0x94fb4237
SpitMP4_ComponentDispatch + 123
27 ...ple.CoreServices.CarbonCore 0x95380935
CallComponentDispatch + 29
28 com.apple.QuickTime 0x9029966f
MovieExportToDataRef + 73
29 com.apple.QuickTime 0x901ccd0b
ConvertMovieToDataRef_priv + 1727
30 com.apple.QuickTime 0x901cc63e
ConvertMovieToDataRef + 71
31 com.apple.QTKit 0x962e7fce -[QTMovie
writeToDataReference:withAttributes:error:] + 1592
32 com.apple.QTKit 0x962f257a -[QTMovie
writeToFile:withAttributes:error:] + 111
33 com.apple.QTKit 0x962f2505 -[QTMovie
writeToFile:withAttributes:] + 56
34 theConverter 0x00005dee -[FlashPlugin
processAudioFileWithPath:] + 913
35 theConverter 0x0000583e -[FlashPlugin
process] + 679
36 theConverter 0x00005ecf -[BasePlugin
loadWithDocument:] + 67
37 theConverter 0x000025f8 main + 686
38 theConverter 0x0000231e start + 54
***************************************************************************
The difficult part has been trying to catch this in a consistent way,
as sometimes fails at first attempt and others fails later on, you
can't never tell when it's going to fail. This worked on 10.4 before,
but it's crashing on 10.5. The worst part is that though my WOApp
still runs and can serve requests, theConverter keeps crashing. Is not
until I restart my WOApp that theConverter can --with luck-- keep
converting files.
I've read technical note TN2083 but it really doesn't say much to me,
as I really want to launch the tool by request and not run it as a
deamon or agent or anything the like. I'm starting to think in
recoding the converter in java but I don't know if this will solve the
problem or will behave the same way.
I've modified my woapp to launch theConverter using threads, wating
for the process, freeing resources consumed by java due to launching
the tool, but still crashes randomly in the same way, so it must be
something with the tool or how woapp should handle external faceless
tools.
Anybody has have this kind of issue when interacting WOApps with
faceless tools?
thanks!
-Carlos
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden