crash when switching between dropbox API and codea too quickly

Hello Codea forum,

I was wondering if there was anyone out there who could help me with a bug concerning switching from my app to dropbox to log in. If I press the ‘done’ button too quickly, or if the connection has not fully finished, it crashes the app.

I do not have any experience with the dropbox API code as it was borrowed from an existing code, and finding it very hard to fix this bug. The rest of my app is 95% complete and can be ported onto appstore soon, and I wish to deal with this weakness in my app.

Cheers,
YK

I see - thank you

@archistudent - We don’t know this code, so the best is to call on the original code authors for help, by writing their names as below (and as I wrote your name), then they will get an email notification. Otherwise they may not see your message.

@aciolino and/or @briarfox - help is needed with the Dropbox API, please, see above.

any ideas?

Can you define “crash” - do you get an error, does it lock up?
Can you post a snippet of code to demonstrate or replicate the error?
Are you making a HTTP request, is the success function being called correctly?

If you want any help then you have to help us to help you, otherwise the best you can hope for is some random advice about “making sure your buffers are aligned” and “ensuring partial integrity of the resolved coefficients” and other such blather that’s not really going to be of much use at all.

There are some very talented and very helpful developers on this board (and even a few very talented and helpful ones) but I don’t know of any psychic ones - I suppose if I was one I might, but I’m not (psychic that is).

:slight_smile:

There’s currently a bug with http.request where if you close your project while it’s downloading something, Codea will crash. There isn’t really any way around it.

okay , i will try to explain the method as accurately as possible.

I am using the dropbox API built by Aciolino and modified by briarfox, its the auth1 version.

A button is pressed in the app, d:RunAuth() and d:GetRequestToken() and are called. This opens up the dropbox webage. Now I log into the dropbox webpage successfully but if I press the ‘done’ button too quickly to get back to my app, the app goes into a frenzy, it looks like its switching between two frames constantly, does not respond to anything else.

If you have any more questions please feel free to message me, I am really stuck haha.