iPhone mapview will only update when in wifi - ios4

I have a little application in progress.
One of my current problems is: it seems that the MapView will only load map data when I am in wifi range (when e.g. zooming in). When only 3G/2G is available, it displays the tiles already cached but will not load new ones. It seems to be no problem with the general setup of my iPhone: the Maps application works nicley.
Any ideas?

... well, looks like I was indeed too impatient. Sometimes, it takes a lot of time until the maps starts loading.

Related

GPUImageMovieWriter without the camera

I'm new to GPUImage, but I think that it is really nice: good work Brad. I love the way the filters chain together so cleanly.
GOAL
I'm trying to wire up the following:
* create an openGL scene
* apply some filters (irrelevant to the discussion below)
* record to video
PROBLEM
My problem is I'm not clear how to connect up the recording. Unfortunately, interacting with opengl-es does not give me enough detail to work out what to do.
ATTEMPT
I have two starting points from the examples in the package:
* CubeExample - getting raw openGL to interact with GPUImage
* SimpleVideoFileFilter - recoding a video file through filters to a new file
I started with the CubeExample, substituted the videoCamera filter for GPUImageSolidColorGenerator (as an aside, I'm not sure how to start with no filter). This allowed me to be able to create a mesh, render it and interact with it. Then I thought that I'd simply add on a GPUImageMovieWriter filter as per the instructions given in filtering and re-encoding a movie, but that requires coordination between the GPUImageMovie (the source) and the writer. As I'm not wanting a camera stream or a video file as the source, but an animated openGL sequence, I'm not clear how to do it. I've tried adding a videoInputReadCallback to the movieWriter:
movieWriter.videoInputReadyCallback = ^{
[renderer nextFrame];
[movieWriter newFrameReadyAtTime:renderer.cmTime atIndex:0];
};
where nextFrame is creates the next frame, calls endProcessing when done and sets the CMTime. Without the newFrameReadyAtTime:atIndex: call, it works fine (animated image rendered as expected to the screen) except that it creates a video with only one frame in it. With the newFrameReadyAtTime:atIndex: call, I get the message
Problem appending pixel buffer at time: 6
before it dies, which makes me think that the movieWriter is not yet ready for the renderer to present its frame, but I'm not sure what to do about it. I've tried many other things, but to no avail. From the description in Interacting with OpenGL-ES (see link above), it seems like it should be easy, but I'm not having any luck.
REQUEST
To make the question more relevant to others, I would just like it if someone might be able to post an example of creating an openGL scene (eg a triangle) and connecting it to GPUImageMovieWriter to record to a file, perhaps rotating the triangle for 10 frames so that we can see that more than a still image is created.
thanks.

Memory leak JQuery - all browsers

I am using jquery in my web page. I see a lot of memory leak happening and after a while the whole browser grinds to a halt. I used the sieve tool and noticed that there is a contsant increase in the no. of DOM elements, everytime by a no. of 4.
Am I doing something wrong in the way I have associated events?
Or is it because I am using setTimeout to redraw my app every X seconds?
Event association:
$('.bir_Names').click(showNames);
The selector $('.bir_Names') evelautes to a set of some 300 elements each of which call the function on click.
setTimeout
Every X mins I remove every single HTML element in the app and rebind fresh data and associate the events. I use jquery remove() to delete elements. have tried innerHTML = '' and empty() also.
I see a jump of nearly 30-40 MB for every redraw and Sieve indicates that none of the deleted nodes are actually removed.
Anyhelp would be greatly appreciated. This thing is driving me nuts.
Thanks.
You don't mention which browser, but some googling seems to indicate that this is a known problem with IE. Here's one potential workaround:
http://forum.jquery.com/topic/possible-memory-leak-in-remove-and-empty
Note that that's referring to a 1.2.x release of jQuery. Before you do anything, make sure you are running the latest 1.6.x release to first see if the defect has already been fixed within jQuery.
[EDIT] ack...you DO state your browsers...'all'...so maybe disregard that first link.

Put UIActivityIndicator over UIMapView

I would like to put a UIActivityIndicator in the center of my UIMapView. I have setup plenty of spinners before, but not sure what I'm missing about the MapView that is making this difficult.
The real issue seems to be that when I try to place the UIActivityIndicator onto the UIMapView in Interface Builder, it doesn't stick or it breaks the Map View.

Blackberry application hangs and freezes on UI modification

I've written a Blackberry appliation with the Blackberry JDE, running on a 9000 simulator. I tested it a week or so ago and loaded it on a Blackberry 9000 phone, and everything worked just fine. Sometime between then and now, though, something went wrong.
My code does the whole moving arrow "loading things from the internet" or whatever thing, but no screens pop up. My original screen, which is just a MainScreen with a RichTextField doesn't load at all. This screen, at least, has most likely not changed in the passing week, so if something broke, it would be in one of the later screens/lines of code that it shouldn't even be getting to yet!
Is it possible that my .jad or .cod file are corrupted somehow? I noticed that when I first put code on my machine, I just stuck in the .cod file that Eclipse provided me. Then, last week, the .cod file it gave me didn't work, because it was ACTUALLY a zip file with a two .cod files inside of it. Using the .cod file with the same name as the .cod file they were in succesfully loaded my app. I did the same this time, and I don't get invalid cod file errors or anything, but the app is still as broken.
Is there some direction I should be looking? Is the issue likely to be in my code, the cod file, the phone, or somewhere completely else?
-Jenny
Edit: I've narrowed it down to the problem only occuring if I attempt to load a particular screen. My problem is that this screen is nearly identical to another screen that IS working just fine on the actual device. Both screens are generated from the same method (which makes a webservice call and gets XML back and parses it to populate the fields of the screen). The only difference is that the screen that is breaking is going to a different URL. This URL DOES work (both from a browser and from the simulated device), so I"m at a loss. The application doesn't seem to crash, (it's still running in the background), it just doesn't attempt to display anymore.
Edit:
Okay, I'm seeing some tunneling errors immediately after I load my app, (but before I execute any of my networking code). When i do execute my networking code, it works just fine, unless it happens to be for my "Rental" section. I commented out all calls to that, and made my menu item for Rentals simply make a print statement. The code behaves identically (it freezes, or displays a white screen after selecting the button). All other menu items work (including those that call threads or network methods). And the rentals menu sucessfully executes in the simulator.
private MenuItem _rentals = new MenuItem("My Rentals", 110,
10) {
public void run() {
//if the last thing I did was a rental
//just show the screen
//else, reload rentals
System.out.println("Rentals was selected");
displayError("Rentals was pressed");
// if(rental){
// System.out.println("It's a rental!");
// popScreen(getActiveScreen());
// pushScreen(_offeringsScreen);
// }else{
// System.out.println("Getting Rentals from scratch");
// RentalsThread _rThread = new RentalsThread();
// _rThread.start();
// }
}};
I'm at a complete loss here: The device debugger doesn't seem to even register me selecting the menu item, and not a single line of code executes! It just freezes! I'll try putting back in my RentalsThread call in the start of my program (which was also freezing) just to see if I can tease apart the problem with the Rentals Thread (which makes the Rental Screen), and the problem with the Rentals menu item.
Okay, I think I have this figured out.
1.) My code was still behaving identically even after commenting out everything because I wasn't rebuilding the .COD files (they automatically rebuild if you try to run it in the simulator, but don't when you're generating a .ALX file, for some reason).
2.) The code I had for generating the Rental Screen was adding things to said screen. Apparently this is all well and good on the simulator, but on the real device it's required that you do all graphics manipulation (even for graphics not yet displayed) in an event thread (I used invokeAndWait).
So, now everything seems to be working just fine. There wasn't anything wrong with my networking (nor did I think there was, because my other networking screen works just fine). I still don't know why I get all those weird tunneling network things before I start, but it doesn't seem to affect anything yet.
See also:
BlackBerry UI Threading - The Very Basics
BlackBerry threading model
several suggestions:
if you have some background work with resources like file IO or networking, app just may stuck there... provide error handling and try to debug app from device!
code signing, check latest code update for API which require signing. But since there are no errors this is doubtful.
To debug on device, run Blackberry Device Manager, attach phone to usb, in eclipse select project, Context Menu -> Debug As -> Blackberry Device.
See A50 How to Debug and Optimize
UPDATE I see "Tunnel failed" exception, so it's like network connection problem...
See tunnel failed in blackberry bold. why?
How to Configure Full Internet Access On BlackBerry
UPDATE Support - Application stops responding when opening a connection

MOSS'07 - Page View Web Part Slows Menu Hovers

In our MOSS '07 site we have a page that contains just a Page Viewer web part in it that points to a site on another server. However, I've noticed that on that page (and any others that have a Page Viewer web part on it) our drop down menus and hover effects are super slow and completely max out the CPU on the visitor's computer (process is IExplorer.)
Through testing, I was able to determine that it doesn't matter what URL the web part is pointed to...just having the Iframe on the page seems to cause it (just setting the viewer to load Google's homepage--which is probably the simplest site I know--still causes the problem). If I go and remove the web part, the menus start functioning just fine again.
I attached a debugger to the process and stepped through the Menu_HoverStatic and called functions and it seems to have a hard time when assigning panel.scrollTop to zero in the PopOut_Show function.
Has anyone else noticed this? ...perhaps found a solution to it? I can't find where to edit PopOut_Show function on our server (I think it's a resource in one of the .NET DLLs) or else I'd just comment out that line as I don't think it's really important anyway...at least on our site.
I really like the ability to have web pages from another server hosted in our SharePoint site, but the performance on the hovers is agonizing... and, honestly, unacceptable. Depending on the resources of the user's computer, the hover effects can take 15 seconds to complete at times!!!!
Any suggestions would be really appreciated!
SharePoint's built-in JavaScript is probably making the browser wait until the IFrame within the Page Viewer Web Part has completely loaded. If you can see a status bar message that says "Please wait while scripts are loaded..." when you attempt to click on the page then that's definitely the problem.
Thank you for your reply. I was actually able to discover what the problem was (my appologies for not sharing it here with everyone when I did!)
The problem wasn't so much from having the IFRAME on the page, it was because I had set the zone to be 100% width and height. Because of a but in IE, trying to calculate the location of the dropdown was erroring (I don't remember what javascript function or call was exactly to blame, but I remember stepping through it with the debugger.) I believe it had something to do with "location offset" or something like that. My take at the time was that it was trying to position the dropdown menu on the screen, and the calculation for positioning it was failing.
To get around it, I had to set a javascript routine to programmatically set the height of the zone after the page loaded. Exactly setting the height prevented the dropdown problem in the menus. Of course, it wasn't ideal because if a user resizes the window, the IFRAME (or, more precisely, the zone it's in) doesn't resize with it. But, it was a suitable band-aid for the problem.
I'm hoping that IE 8 will fix this when it's released.

Resources