swremote problem

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
incoronado
Senior Member
Posts: 153
Joined: Fri Mar 19, 2004 12:30 am
Location: San Diego, CA

swremote problem

Post by incoronado »

I have designed a remote for use with my Dell Axim x50v. The problem I'm having is that swremote (ARM) will not complete loading once I add an 11th panel. I think it is a memory problem. If I delete the 11th Panel and rebuild it, it will work to a point and then it will stop loading once I get a certain amount of buttons on the page. I've converted all of my graphics from .png to .jpg because I thought that would help. Even though .png seems to look much better to me. Is there a way that swremote can swap out to the smartcard when it needs more memory? I've set it up so that the swremote folder is on my smartcard thinking that it might be using all of the memory. On another note the panel loads up fine using the PC version of swremote.
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

It sounds like a memory issue to me too. If possible, check the available memory after the SWRemote loads (or hangs) and see what you have left.



Converting to PNG was definitely the right thing to do. If it is a memory problem, you may just want to find the largest image files (usually backgrounds) and find a way to reduce the size of the big ones. Depending on how the PNG is encoded, you may be able to reduce the size by reducing the color depth (number of colors used) of the images.
Scott
incoronado
Senior Member
Posts: 153
Joined: Fri Mar 19, 2004 12:30 am
Location: San Diego, CA

Post by incoronado »

Are you saying that I should be using .png format? I really don't think it is a background image issue. Converting to .jpg made very little difference. I tried downloading a utility called memmaid for memory optimization on the PPC, but it only allows dlls to be moved to an external memory card.



The memory settings are almost useless on Pocket PC 2003 as far as I'm concerned, but here they are. Every time I load swremote it indicates something totally different. As I watch it load these numbers go up and down with little or no discernable rationale that I understand. This all relates to how the internal memory manager manages system memory.



Here is what I see when the load stalls.



Storage | Program

Allocated 16.52 MB | Allocated: 45.23

In Use: 9.40 MB | In Use: 36.26

Free: 7.12 MB | Free: 8.97



I have nothing else running on the PDA.



Is there a way I could send you a zipped copy of my theme and you could take a look at it. I'm using Photoshop to save out the .png. I really don't want to reduce the number of colors I'm using. I like the look.
incoronado
Senior Member
Posts: 153
Joined: Fri Mar 19, 2004 12:30 am
Location: San Diego, CA

Post by incoronado »

I'm on the right track here. The total size for \Program Files\SWRemote\Config\Themes is only 2.1 MB. I would hardly think such a small amount would hang the program, so I'm pretty sure the problem is not with the graphic file sizes or formats. I would be more apt to think it is a problem with the .xml file and the way swremote handles it. How much memory have you allocated to read and parse the .xml file. My file is 51k and probably relatively complex.
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

It may not be a memory problem, but that's always the first thing to check.



There's no limit on memory allocation that should cause this. I have a 70k theme XML file that I load into my PocketPC without any problem, and it has 14 panels.



I only suggested PNG because it typically produces the smallest format with the most accurate reproduction. Jpeg is fine too.



You might just want to try moving things around within the theme to see if that makes any difference. Maybe there's a button or something somewhere that's causing it to not load. Try moving the 11th panel into a Theme all it's own and see if it loads.
Scott
incoronado
Senior Member
Posts: 153
Joined: Fri Mar 19, 2004 12:30 am
Location: San Diego, CA

Post by incoronado »

This has been extremely difficult to find any real decisive cause and effect solution. If I copy this panel to it's own theme, it works fine. I can start adding all of the panels to the new theme, and at some point (around 11 panels) it fails. Never in the exact same spot, and the memory settings shown on my PPC are never consistent. As soon as it fails, I start removing items from the panel one at a time, including replacing the background with a very small button image. I can remove all items from the panel. Still doesn't load. I've even deleted the panel and fails to load with one less panel that previously loaded fine. Mind you, this always loads fine on the X86 version of swremote. I've spent, it seems like, endless hours on this. I don't have tools, like a debugger, to help me quickly figure out where the problem is. This is why I defer to you, and why I wanted to send you my theme. I consider your time valuable, and don't want you wasting it on a problem that I could have created myself. I realize it could very well be something I'm doing wrong-- I just can't easily figure it out by reverse engineering this thing. At any rate, whatever the problem is, I would think you would want to know what it is so you can at least recover from it gracefully, or provide a useful error message--and neither of these things are occurring.
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

I realize that it's probably very frustrating to debug through trial and error, and although I am curious to know what the problem may be I really don't have the bandwidth to do that level of debugging. Maybe one of the Meedio guys can help, but you may have to enter a support ticket. Not really sure how far that route will get you either.
Scott
yaccri
HouseBot Special Member
Posts: 304
Joined: Wed May 07, 2003 2:19 pm
Location: Tel-Aviv, Israel
Contact:

Post by yaccri »

I experience a similar problem with a SIMPad (with ARM and Win CE 4.1, and the FakeDll installed). I have a 132k XML file.



I didn't spend the time yet to figure out what causes this.
incoronado
Senior Member
Posts: 153
Joined: Fri Mar 19, 2004 12:30 am
Location: San Diego, CA

Post by incoronado »

I've have worked probably 20 more hours on trying to figure this out. No luck. I've tried everything from converting all of my graphics to .jpg's, a rearranging everything on the panels. I've started from scratch rebuilding all panels at least 3 times. I've pretty much concluded that my Dell Axim X50V will only load 10 or 11 panels. After that it just fails to load no matter what I try. I don't think my panels are all that complicated. I think it is just a problem with the way the remote PPC remote software handles memory. It would be nice if there were an option to load panels dynamically instead of loading all panels into system memory. The PPC's memory model is nowhere near as robust, or forgiving, as a PC's memory model.



Here's a picture of the PPC remote I'm working on



Image
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Post by dlmorgan999 »

I had a similar issue running a large theme on my ViewPad. I was able to partially solve the problem by changing the color depth on the Viewpad from 16-bit to 256 colors. This led me to believe that it was a video resource issue (reminded me of the Windows 3.1 days). I can't remember if you can change the color depth on a Pocket PC but if you can you might want to try that just to see what happens.



-- Dave
incoronado
Senior Member
Posts: 153
Joined: Fri Mar 19, 2004 12:30 am
Location: San Diego, CA

Status

Post by incoronado »

Is there any update on the status of this problem? I can still only run about 10 panels on a given remote on a Dell Axim x50v. Although I have yet to receive a definitive response that this is more-or-less a bug, or hard memory limitation, with the current version of the swremote, I have determined this to be a memory shortage problem related to the higher resolution screens that the Dell. I have scaled my panels down to about 8 because I'm not interested in taking a large step backwards by moving my resolution down to 256 colors. Has there been any discussion about this hard memory limitation in higher level development circles?
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

While the swRemote is running, how much memory is available? It will load all of the screens into memory when starting, so smaller images will allow you to load more screens. However, it sounds like there may also be another limitation that is being hit too.
Scott
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Just guessing here, but .png or .jpg files are compressed datafiles. At some point in time they will unpack to a full screensize memory used by the video chip. The theme I use on my PC has 39 panels, uses the same buttons for all panels which are only 1.6KB and I use the same background for all panels (only 16KB), but the theme takes up 350MB when running. The theme itself uses far less space on disc then the 350MB when it is running. Changing the buttons back from 1.6KB .jpg's to 29KB .png's, really doesn't make any difference to the amount of memory used when the theme is running. It appears that a running theme unpacks all of the picture files into the video memory and grows much larger then the size of the theme on disc.



My PDA theme (IPaq 4150) uses 28 panels without any problems!



My PC theme runs into trouble when used over the network. It stops displaying status properties when more then 29 of these properties are displayed on one single panel. Also a problem I have never been able to fix and it happens on W2K and XP SP2 PC's with my theme. According to ScottBot, there should be no limitations to the amound of status properties on one panel and dlmorgan tested his theme with more than 30 status properties without any problems.

Just trying to say that you are not alone here and more of us have unexplainable swremote problems in different area's.
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

One bad thing is that it doesn't share resources. So if you use the same background in 10 different panels, it actually loads 10 of the images into memory. Same is true for the control images.



I know that sounds insane, but I left it as an optimization for Meedio to work on. :wink:
Scott
incoronado
Senior Member
Posts: 153
Joined: Fri Mar 19, 2004 12:30 am
Location: San Diego, CA

Post by incoronado »

I would have to look at that again, but the amount of memory seems to dance around a bit depending on how many graphics and how many objects/elements are on the panel. The number of panels it will load moves around a bit. I spent a lot of time playing around with trying to figure out what was actually putting it over the top. I failed to isolate what was causing it. It appears to me that there are multiple factors involved, but I'm pretty sure more memory, or better memory mangement, would correct it. I submitted a ticket back in October. What a useless venture that was. In the process I uploaded my remote files.
Post Reply