Author Topic: NETWEBEND problem  (Read 8317 times)

Offline Crivens

  • Prof. Inline
  • *****
  • Posts: 913
    • View Profile
NETWEBEND problem
« on: 2012-Jan-06 »
Ok, this is a weird one. If I make a new project with the single following line:-
NETWEBEND "http://developer.palm.com/appredirect/?packageid=com.teamgates.rotaslider"

Then it works fine. Windows opens it in the browser and my WebOS devices (Pre2/TP) open a browser which immediately opens the app store (TP fails as isn't for TP but Pre2 works fine), which is what I want, and what is expected.

However, when I put this exact same line as the first line of my game (3000+ commands) it quits the program as expected but then nothing else happens... ie. no browser, no app store, nothing. It's like you quit the program. I found this out after quite a bit of time moving the line around (thought it was not working in different functions or files initially). However being the first line of the program I thought it wouldn't matter...

So what the hell eh? Gernot, any ideas? Note it definitely used to work on my old game (Free version of Rotaslider) but now even that has the same problem. I can't remember when I last compiled that so I don't know if it's a new GLB problem or a WebOS one.

Cheers
« Last Edit: 2012-Jan-06 by Crivens »
Current fave quote: Cause you like musicians and I like people with boobs.

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1600
    • View Profile
    • AMpostata Website
Re: NETWEBEND problem
« Reply #1 on: 2012-Jan-07 »
it happened to my a while ago, and although I can't remdmber it, was related go glb calling a END znd not returning to exe the web string.

Hope my vague idea can help you :-)
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4176
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: NETWEBEND problem
« Reply #2 on: 2012-Jan-07 »
You can't put NETWEBEND as the first line of your app, you must use ALLOWESC FALSE prior to calling it on Pre IIRC. That should stop the app exiting :)
I came. I saw. I played.

Offline Crivens

  • Prof. Inline
  • *****
  • Posts: 913
    • View Profile
Re: NETWEBEND problem
« Reply #3 on: 2012-Jan-07 »
Strange it works fine as a single line app on the pre and the TP but not as the first line in my main app.

I will try your suggestions a bit later.

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Offline Crivens

  • Prof. Inline
  • *****
  • Posts: 913
    • View Profile
Re: NETWEBEND problem
« Reply #4 on: 2012-Jan-07 »
Nah that didn't work. I *want* the app to quit and then load up the store on WebOS. It totally used to work in my first app but now isn't. However if I put the NETWEBEND command as the *only* line of an app then it works fine (quits app then runs a browser which kicks off the app store). Using the NETWEBEND command in the main app just quits the app and does nothing else. My old app used ALLOWESCAPE FALSE and yes it used to get the app store up while keeping my app alive. Not working at all now.

Ampos, I don't quite understand what you are saying there. Can you explain again?

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4176
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: NETWEBEND problem
« Reply #5 on: 2012-Jan-07 »
Maybe Gernot has changed something? Maybe it's a bug that has always been there, just never discovered. I know in my old earlier apps using NETWEBEND wouldn't go to the site and also terminated the app (which seems to be what you are experiencing), but I then started using one of MrT's functions to keep the app alive, which also required ALLOWESCAPE FALSE. I did actually report to Gernot prior to this what you are experiencing, although this was a long while back, when I first started devving for webOS.

Dunno.
I came. I saw. I played.

Offline Crivens

  • Prof. Inline
  • *****
  • Posts: 913
    • View Profile
Re: NETWEBEND problem
« Reply #6 on: 2012-Jan-07 »
Hmm possibly. My original app doesn't work (quits but doesn't run the browser) now but I can't remember if it ever did or whether it only worked in iOS and I never tested the same code in WebOS. Pretty sure I tested it at the time though so possibly a bug in the latest WebOS?

Still it's a bit weird how the exact same command works perfectly in WebOS if it's the only line of code (or two as I also tried it with a string variable for the URL originally).

Seriously annoying though as the whole reason I wrote an shop function was because WebOS can't search the app store like iOS can (although iOS is a bit rubbish for searching too especially if your company name has a space in it).

Hopefully Gernot can fix the problem though. It's almost the last thing to do before releasing my new app really.

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10851
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: NETWEBEND problem
« Reply #7 on: 2012-Jan-08 »
did you play with AUTOPAUSE, too?
What does the console windows show?

Offline Crivens

  • Prof. Inline
  • *****
  • Posts: 913
    • View Profile
Re: NETWEBEND problem
« Reply #8 on: 2012-Jan-08 »
Quote
did you play with AUTOPAUSE, too?
Not yet at all on my new project, but my old one sets it to TRUE if that helps. How does it make any difference though if two projects use the same command and one works and the other doesn't when the command is the first thing that happens in both projects (even though one of those projects *only* uses this command)? I'll give it another go a bit later if I get a chance.

Quote
What does the console windows show?
You will have to explain what you mean a bit more to me for WebOS.

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10851
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: NETWEBEND problem
« Reply #9 on: 2012-Jan-09 »
in compiler/platform/webos/tools/bin is a "deviceshell.bat". That should give you the ability to run a program from command line and view the stdout printout. Also the GLBasic engine log.
To make it easier, make a symlink to the apps-directory:
Code: (glbasic) [Select]
ln -s media/cryptofs/apps/usr/palm/applications apps

you can then do:
Code: (glbasic) [Select]
cd apps
cd com.company.yourapp
./glbasic-webos-exe

Offline Crivens

  • Prof. Inline
  • *****
  • Posts: 913
    • View Profile
Re: NETWEBEND problem
« Reply #10 on: 2012-Jan-09 »
Quote
Shut down GLB
glb is shut down
exiting with url http://developer.palm.com/appredirect/?packageid=com.teamgates.rotaslider
Ignore the segfault that will come now ;)PDL_Quit
</PDL_Quit>
exit
Ok, here is what I get. After this nothing is on the Pre2. Just the desktop.

Note that I also did this for my test program that *only* does the exact same NETWEBEND command that is above (and I end up with the app store in the correct location and a browser window open which is fine). And the trace is identical to the above at the end.

Cheers
« Last Edit: 2012-Jan-09 by Crivens »
Current fave quote: Cause you like musicians and I like people with boobs.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10851
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: NETWEBEND problem
« Reply #11 on: 2012-Jan-10 »
Oh. That's very strange then.
Maybe you must clear some memory before?

Offline Crivens

  • Prof. Inline
  • *****
  • Posts: 913
    • View Profile
Re: NETWEBEND problem
« Reply #12 on: 2012-Jan-10 »
Hmm. First perhaps I should make my test app load tonnes of sprites and see if that can still exit to a browser.

It's weird though as the trace specifically says it is "exiting with URL" which is identical to the test app.

Honestly this "finish the game off" stage takes bloody forever. Wrote the main game in an afternoon, and that code has hardly changed since then, and it's now been about 4 months of "everything else"...

As an alternative is there any other way to kick off a URL do you think? I know Trucidare has/will have a library to allow a URL inside an app. Do you think (or anything else you can think of) this would be a good (possibly better) workaround the problem?

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10851
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: NETWEBEND problem
« Reply #13 on: 2012-Jan-10 »
No. There's no other way than the PDL_ function I use :(

Offline Crivens

  • Prof. Inline
  • *****
  • Posts: 913
    • View Profile
Re: NETWEBEND problem
« Reply #14 on: 2012-Jan-10 »
Hmm. Ok I will try the memory release later. Out of interest, assuming that is the problem, could the same thing be done by GLB? ie. if WebOS and doing NETWEBEND then clear out all memory it can first before exiting?

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.