Closed suprnrdy closed 12 years ago
Hey Thanks for the email could you give me a stack trace?
Adrian
On Mon, Feb 6, 2012 at 8:23 PM, brizo < reply@reply.github.com
wrote:
When uploading two images one right after another, an error occurs. Not sure how the queue is being handled, but this error results in a crash at the following line: emit (this->*signal)();
Within void Facebook::parseNetworkReply(QNetworkReply* reply){ ..........
if (signal !=0){ emit (this->*signal)(); } if (nextRequest != 0){ sendMessage(nextRequest); }
............ }
Reply to this email directly or view it on GitHub: https://github.com/eamocanu/Facebook.Qt.APIs/issues/1
0 ?? 0 0xca72bf72
1 ?? 0 0x1a586635
2 Facebook::parseNetworkReply Facebook.cpp 442 0x40cb32
3 Facebook::qt_metacall moc_Facebook.cpp 128 0x417b58
4 QMetaObject::metacall qmetaobject.cpp 237 0x11f5ff8
5 QMetaObject::activate qobject.cpp 3278 0x12067b0
6 QNetworkAccessManager::finished moc_qnetworkaccessmanager.cpp 163 0xbbaf6de
7 QNetworkAccessManagerPrivate::_q_replyFinished qnetworkaccessmanager.cpp 1081 0xbbad9dd
8 QNetworkAccessManager::qt_metacall moc_qnetworkaccessmanager.cpp 107 0xbbaf4fa
9 QMetaObject::metacall qmetaobject.cpp 237 0x11f5ff8
10 QMetaObject::activate qobject.cpp 3278 0x12067b0
11 QNetworkReply::finished moc_qnetworkreply.cpp 152 0xbc1853d
12 QNetworkReplyImplPrivate::finished qnetworkreplyimpl.cpp 680 0xbbc80ab
13 QNetworkAccessBackend::finished qnetworkaccessbackend.cpp 298 0xbbb1d8a
14 QNetworkAccessHttpBackend::finished qnetworkaccesshttpbackend.cpp 342 0xbbb7da1
15 QNetworkAccessHttpBackend::replyFinished qnetworkaccesshttpbackend.cpp 763 0xbbbab47
16 QNetworkAccessHttpBackend::downstreamReadyWrite qnetworkaccesshttpbackend.cpp 700 0xbbba6f4
17 QNetworkReplyImplPrivate::handleNotifications qnetworkreplyimpl.cpp 390 0xbbc6da1
18 QNetworkReplyImpl::event qnetworkreplyimpl.cpp 890 0xbbc8e88
19 QApplicationPrivate::notify_helper qapplication.cpp 4462 0x2dcbd88
20 QApplication::notify qapplication.cpp 3862 0x2dc96da
...
Here's a full backtrace:
Thread 21 (Thread 7216.0x1964):
No symbol table info available.
No symbol table info available.
No symbol table info available.
No locals.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
Thread 20 (Thread 7216.0x1780):
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
Thread 19 (Thread 7216.0x1b74):
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
Thread 18 (Thread 7216.0x110c):
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
Thread 17 (Thread 7216.0x1e78):
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
Thread 14 (Thread 7216.0xeb0):
No symbol table info available.
No symbol table info available.
No symbol table info available.
No locals.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
Thread 12 (Thread 7216.0xf74):
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
Thread 11 (Thread 7216.0x1150):
No symbol table info available.
No symbol table info available.
No symbol table info available.
No locals.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
Thread 5 (Thread 7216.0x2738):
No symbol table info available.
No symbol table info available.
No symbol table info available.
No locals.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
Thread 4 (Thread 7216.0x1744):
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
Thread 2 (Thread 7216.0x1bd8):
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
Thread 1 (Thread 7216.0x2364):
No symbol table info available.
No symbol table info available.
signal = (void (Facebook::*)(Facebook *)) 0x1a58662c
lastRequest = 0x1e487610
nextRequest = 0x0
No locals.
mo = 0x0
receiverInSameThread = true
previousSender = 0x0
receiver = 0x1a614010
method = 22
currentSender = {sender = 0x1a614054, signal = 6, ref = 1}
c = 0x1a614cb8
last = 0x1a614cb8
methodOffset = 4
signal_absolute_index = 6
empty_argv = {0x0}
currentThreadData = 0x347990
locker = {val = 442396616}
connectionLists = 0x1a614cf0
signalOffset = 2
signal_index = 4
_a = {0x0, 0x28d534}
q = 0x1a614054
reply = 0x1e137ca0
No locals.
mo = 0x0
receiverInSameThread = true
previousSender = 0x0
receiver = 0x1a614054
method = 10
currentSender = {sender = 0x1e137ca0, signal = 9, ref = 1}
c = 0x1e3e2420
last = 0x1e3e2420
methodOffset = 8
signal_absolute_index = 9
empty_argv = {0x0}
currentThreadData = 0x347990
locker = {val = 442062120}
connectionLists = 0x1a58cd10
signalOffset = 6
signal_index = 7
No locals.
q = 0x1e137ca0
totalSize = {d = {data = {c = 78 'N', i = 78, u = 78, b = 78, d = 3.853712037561723e-322, f = 1.0930128e-043, real = 3.853712037561723e-322, ll = 78, ull = 78, o = 0x4e, ptr = 0x4e, shared = 0x4e}, type = 4, is_shared = 0, is_null = 0}, static handler = 0x3602640}
No locals.
No locals.
statusCode = 400
sslConfig = {d = {d = 0x20b8e320}}
No locals.
notification = QNetworkReplyImplPrivate::NotifyDownstreamReadyWrite
current = {<QList<QNetworkReplyImplPrivate::InternalNotifications>> = {{p = {static shared_null = {ref = {{_q_value = 3781}}, alloc = 0, begin = 0, end = 0, sharable = 1, array = {0x0}}, d = 0x1a592fc8}, d = 0x1a592fc8}}, <No data fields>}
No locals.
consumed = false
d = 0x3484c8
res = false
threadData = 0x347990
returnValue = true
result = false
cbdata = {0x1e137ca0, 0x208fc5e8, 0x28dc83}
d = 0x1b9445b0
No locals.
pe = @0x20767388
e = 0x208fc5e8
r = 0x1e137ca0
locker = {val = 3439032}
startOffset = 0
i = @0x3479b0
localSerialNumber = 6033
msg = {hwnd = 0xe20f48, message = 1025, wParam = 0, lParam = 0, time = 0, pt = {x = 1, y = 2678372}}
app = 0x28fe4c
q = 0x348758
result = 0
d = 0x348778
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No locals.
No symbol table info available.
No symbol table info available.
I will look into the stack traces tomorrow. What is the value of signal when you breakpoint on
if (signal !=0){
Let me know
Tx Adrian
On Mon, Feb 6, 2012 at 8:23 PM, brizo < reply@reply.github.com
wrote:
When uploading two images one right after another, an error occurs. Not sure how the queue is being handled, but this error results in a crash at the following line: emit (this->*signal)();
Within void Facebook::parseNetworkReply(QNetworkReply* reply){ ..........
if (signal !=0){ emit (this->*signal)(); } if (nextRequest != 0){ sendMessage(nextRequest); }
............ }
Reply to this email directly or view it on GitHub: https://github.com/eamocanu/Facebook.Qt.APIs/issues/1
It just null. No value.
Name Value Type
signal void (Facebook::)(Facebook )
But it is true when I'm doing things like connecting to facebook, getting user information and album information too.
if it's null then it should not go inside
if (signal !=0){ ...
Right? It can't be null.
This if
is a check for null.
Try to say signal=0 at the top where signal is declared about 10 lines up.
Could I see how your code use the API?
I'm not sure I understand how you're using the signal variable.
The function is in: void Facebook::parseNetworkReply(QNetworkReply* reply){ And declared as: Facebook::Signal signal;
And I see that you set the value of signal here: if (!reply->error()) { signal= parseReplyData(lastRequest, reply->readAll());
Is the return type of parseReplyData incorrect? Because wont this always be returned as null?
If parseReplyData returns NULL
then a signal is not emitted so you should not be seeing this error.
It just stores whatever signal parseReply returns. It can be NULL
or another signal. Based on whatever reply data is sent to be parsed, parseReply returns a signal. How does your code use the API? What calls are you making?
Note: I don't have Qt on my machine anymore, that's why I asked you to inspect different vars for me.
I'm going through a loop that is processing images in a directory (adding watermarks) and then sending the QByteArray via the uploadPhoto function. So I've tested it out by calling uploadPhoto twice.
The first image is uploaded fine, the second one crashes the program and I get a qdebug response of: "{"error":{"message":"(#1) An unknown error occurred","type":"OAuthException"}}"
So I figured it out. It was a poorly formed image buffer that I was passing to it. The crash was due to signal not being initialized (signal = 0).
Thanks for putting this together and for your quick response.
Cool; you've figured it out. So it was the data that you pass in. If you did initialize the signal to 0 let me know and I'll update the code just in case someone else uploads some bad data ;)
Just a note:
Your error:
"{"error":{"message":"(#1) An unknown error occurred","type":"OAuthException"}}"
comes from facebook and not from my API so indeed something that you are sending is wrong. Maybe it's too fast; maybe bad data. They change their API frequently so it's hard to keep up.
Also can you let me know your website or facebook app and I'll add you in the readme. I'd like to know who uses this API. I know only on a http://elacarte.com/
All in all, thanks for filing this :)
Yes, adding the signal = 0 in the declaration kept it from crashing.
I made release 0.4 based on these findings
When uploading two images one right after another, an error occurs. Not sure how the queue is being handled, but this error results in a crash at the following line: emit (this->*signal)();
Within void Facebook::parseNetworkReply(QNetworkReply* reply){ ..........
............ }