Re: Need help getting FTP to work from within Acrobat 6.0 plugin
Re: Need help getting FTP to work from within Acrobat 6.0 plugin
- Subject: Re: Need help getting FTP to work from within Acrobat 6.0 plugin
- From: daniel <email@hidden>
- Date: Wed, 16 Feb 2005 00:49:42 -0800
Well, you've got all the source code right there, so I think you've got some narrowing down to do. What happens if you just call CFRunLoopRun without any of the other code that you imported? Since you imported a lengthy chunk of code, presumably you can narrow down the problem by cutting out chunks of the code you're currently calling.
For what it's worth, I use CFNetwork's HTTP functions from a Carbon CFM app without crashing. Once you narrow down your problem to a small, identifiable chunk of code, I suggest reposting your question with the snippet of code that makes the difference and a copy of the crash backtrace.
Daniel
On Feb 15, 2005, at 3:38 PM, Wells, Terry C wrote:
Hi,
I'm new to the list and couldn't find anything relating to my problem in the archives.
What I'm trying to do:
- I'm writing an Acrobat 6.0 plugin that runs in OS 10.3 and needs to use FTP to search remote directories and bring files to the local machine.
In case you didn't know:
- Acrobat 6.0 is a Carbon App.
- Acrobat 6.0 plugins are CFM modules.
What I've tried:
- I've tried using URLSimpleDownload, but always get a result code of -30785 ("Indicates that your extension failed to load.").
- I've tried using CFBundle to import the CFNetwork functions to do FTP. I used the Apple example: CFFTPSample.c as a starting point, simply renamed main() to CFFTP_main() and tried calling it with a constructed argv. Everything seems to work fine up to the point of calling CFRunLoopRun(). At this time, the program crashes with a BAD_INSTRUCTION fault. It appears that about 10 layers down into CoreFoundation and CFNetwork, an invalid function pointer gets called and jumps into oblivion. I set a breakpoint in my callback routine and it never gets hit, so it never makes it to the point of dispatching any events to me. Since Acrobat is a Carbon App, I had a hunch that my call to CFRunLoopRun was conflicting with a run loop that Acrobat was already running so I tried commenting out that call. The result was quite similar in that when my code returned to Acrobat after setting up the asynchronous FTP, I got a BAD_INSTRUCTION fault several layers down below Acrobat.
At this point, I'm really stuck. I've wasted almost three weeks chasing something that should have been easy. It doesn't help that I'm primarily a Windows developer and have been learning Mac as I go.
If anyone has any thoughts or suggestions on how to solve this problem, I'd really appreciate them.
Thanks so much in advance,
Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden