Apple phoned me :S because I have had problems several times in the process of reviewing my application, it appears that the problem comes from the line:
LEE$=NETWEBGET$("www.google.com", "/", 80, 512)
This makes the application crashes.
Does anyone know what I'm doing wrong?
Should work fine. It returns :
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.co.uk/">here</A>.
</BODY></HTML>
You will to put in debug statements after each command just before and after that, as I suspect the crash is elsewhere.
The rest are simple commands such as IF, ALPHAMODE, DRAWSPRITE ...
That is why I am sure that the bug comes from NETWEBGET$
Will need to see if another iPhone user can try it...
It might be worth trying it on its own (and in debug mode) and see what XCode says.
Tested on my iPhone with Development Certificate and it works correctly but when I upload to iTunes, they reject it because it crashes.
Sounds like iTunes does something to the Application...
do you get a log of the output form apple?
Then, you could put a lot of STDOUT calls in between to see where it crashes.
They "Called" you!?
This is the reason why my application was rejected.:
Quote2.2: Apps that exhibit bugs will be rejected
May 11, 2011 11:55 AM. From Apple.
2.2
We found that your app failed to launch on iPhone 4 running iOS 4.3.3, on an unsecured Wi-Fi network.
We encountered the issue when selecting the application on the Home screen - the app displayed a launch image then quit unexpectedly. This may be because iOS 4 uses a watchdog timer for applications; if an application takes too long to complete its initial startup, the operating system terminates the application.
For information about the watchdog timer, please see Technical Q&A: Application does not crash when launched from debugger but crashes when launched by user..
Another possibility could be a missing entitlement. For more information, please see the Technical Note: Resolving "0x800003A", applications not launching and "missing entitlement".
For discrete code-level questions, you may wish to consult with Apple Developer Technical Support. Please be sure to include any symbolicated crash logs, screenshots, or steps to reproduce the issues when you submit your request. For information on how to symbolicate and read a crash log, please see Tech Note TN2151 Understanding and Analyzing iPhone OS Application Crash Reports.
To appeal this review, please submit a request to the App Review Board
I could use STDOUT as you advise me, but the problem is that it works for me correctly the app so that I would be useless, unless they notify me, that I do not think because they are very brief.
Yes, really they called me personally to my phone :S and not only that, I have the phone number, email from Apple Developer Technical Support and the email from application review department.
Quote from: msx on 2011-May-25
This is the reason why my application was rejected.:
...I have the phone number, email from Apple Developer Technical Support and the email from application review department.
Sell that, then. XD
I "think" - it's the entitlement.plist. Are you very sure you have that in your XCode project and filled in properly?
I do not use Ad-Hoc distribution so I have no such file.
Apparently, they run my application far as the point where the NETWEBGET$ command appears
You must have such a file. That's what I always implement with distributing.
Trucidare, for the rescue!!
:blink:
check the following link:
http://developer.apple.com/ios/manage/distribution/index.action
click on "Building your Application with Xcode for Distribution."
Find point 7 just below the image, you can read "App Store For Distribution, skip to Step 12. For Ad Hoc Distribution, complete the Following:"
Probably a silly idea but which version of XCode are you using? - I know there's an issue with XCode 4 iOS 4.3 with apps working fine locally but crash for Apple. This appears to be with GLB and Unity3D - Recommendations until it's sorted out are to use XCode 3.2.5 and iOS 4.2 SDK.
Another possible solution (again, assuming it's an XCode iOS 4.3 issue) is detailed here http://forum.unity3d.com/threads/83076-iOS-4.3-App-Rejected?p=578829&viewfull=1#post578829
Some time ago I use XCode 3.2.5 SDK 4.2 because later versions give me many errors.
Quote from: Kitty Hello on 2011-May-25
You must have such a file. That's what I always implement with distributing.
Trucidare, for the rescue!!
Could someone confirm if this is so?
I answer myself. Not so, entitlement.plist file is only required for Ad-Hoc distribution.
Referring to NETWEBGET$ finally clear to me that is a BUG which makes Apple reject applications that use this command. After 3 months uploading my application, I deleted the NETWEBGET$ command and I changed it to NETWEBGET and socket and the application has finally been approved.
Can you send me the code where you use NETWEBGET$? I can't believe there's a bug, but I'm wiling to take a peek.
I haven't it here, but the problem was this:
LEE$=NETWEBGET$("www.google.com", "/", 80, 512)
Replaced by NETWEBGET and running.
I uploaded my application to 8 times, so I can assure you that the problem was this.
I don't see it being a bug as it works okay without sending to Apple. What could be happening is the time-out value is too long and their machine thinks its crashing - essentially testing it as if there is a poor (or no) connection.
It is very strange that in the same conditions NETWEBGET works and NETWEBGET$ does not work.
What were you using NETWEBGET$ for? Checking for an internet connection?
I used to check the internet and read a text file hosted on my server. Finally eliminated and my application appears in the App Store.
I would be interesting to see if they would accept Spots in that case - I do the same thing (but call up to 4 different websites)...
Be careful, I would not use it. (I mean NETWEBGET$)
What version of GLBasic are you using, by the way ? There was a problem with truncation.
The last version, naturally.
With the hotfix ?
there is a hotfix? :blink:
for the BETA, yes. The release might have the bug, still.
I use the official version, yet. Is the Beta version which adds the Android SDK?
Thats right
If Spots game is "in review" and use the NETWEBGET$ command would confirm that this is a bug. :whistle:
Considering that no one has had these problems before, is there anything in your "check for internet connection" code that could cause problems? It seems strange that it would a GLB thing if it works in some instances but not others...
I searched in the forum and it is curious that the NETWEBGET command with the $ does not appear, so this would explain why no one has had any problems yet.
Anyway I'd like to meet someone who use this command and has a published application in App Store.
Quote
// 9.040
// Kern:
// NETWEBGET$ returned nothing when the buffer was too small.
I think that was already fixed. But wasn't there a bug where it crashed, that you sent me as an email MrTaToad?
MSX my friend, Ill help you in any way I can. I have 2-3 apps in the itunes store which use Netwebget$.
Approved and no problems in any manner :P
I'm using NETWEBGET$ and NETWEBGET in HTD Baseball iphone/ipad for the leaderboards
and don't have a problem, but it was compiled with version 9.040
I'm going to be sending an update tomorrow using the latest beta with the latest hotfix, does that
mean I now could have a problem with the NETWEBGET$ command?
Thank you Omadan. My application was working normally until it ran that command. Could prove that NETWEBGET$ is working properly?.
P.D.: Millerszone, don't worry, I used oficial versión and not Beta.
Just to be safe I removed NETWEBGET$ and used NETWEBGET for everything.
Quote from: Kitty Hello on 2011-May-26
Quote
// 9.040
// Kern:
// NETWEBGET$ returned nothing when the buffer was too small.
I think that was already fixed. But wasn't there a bug where it crashed, that you sent me as an email MrTaToad?
There was I believe - I cant remember when though... :S
QuoteIf Spots game is "in review" and use the NETWEBGET$ command would confirm that this is a bug
I dont develop for iPhone - I prefer the much more programmer friendly webOS :)
QuoteJust to be safe I removed NETWEBGET$ and used NETWEBGET for everything.
I've never used either command, but aren't they used two different ways?
NETWEBGET%() is to return a web page to a local file, which the name is specified in the call, and it returns an 'ok' status to the left variable if it succeeded (and you have to manually open the file if you want the text data)
NETWEBGET$() returns the web page string directly to the left variable
[Edit] Ha, or did you mean you also recoded the routine to expect the results in a file?
Quote from: Slydog on 2011-May-26
QuoteJust to be safe I removed NETWEBGET$ and used NETWEBGET for everything.
I've never used either command, but aren't they used two different ways?
NETWEBGET%() is to return a web page to a local file, which the name is specified in the call, and it returns an 'ok' status to the left variable if it succeeded (and you have to manually open the file if you want the text data)
NETWEBGET$() returns the web page string directly to the left variable
[Edit] Ha, or did you mean you also recoded the routine to expect the results in a file?
To send leaderboard scores:
NETWEBGET("www.smashedfly.com", str$, 80, 0)
To receive leaderboard scores:
NETWEBGET("www.smashedfly.com", str$, 80, globalLeaderboardFile$)
Works on PC, should work on all platforms?
Using this to check internet connection:
FUNCTION checkInternetConnection:
internetConnectionGood = FALSE
SOCK_INIT()
sock% = SOCK_TCPCONNECT("www.smashedfly.com", 80, 5000)
// if sock -1 then no connection to leaderboard server, if sock = 0 then leaderboard is connected
IF sock >= 0 THEN internetConnectionGood = TRUE
SOCK_CLOSE(sock)
SOCK_SHUTDOWN
ENDFUNCTION
Ok, so I did it and works correctly at least on the iPhone and Windows.
I note that you used sock > = 0, it took me a while to find out why it did not work.
I too use the NETWEBGET command and works perfectly.