This problem that I am seeing makes no sense whatsoever.  I'm not 
even sure it's related to coding.  It might have something to do with the 
simulator.  Please read the entire description.

I have tested an application on many devices and it works fine.
I have tested the application on the emulator, with most of the ROMs, 
and it works fine.

But, I tried testing it on the Simulator for 5.0, 5.1 and 5.2 and it fails.  I 
have set the RAM Memory to maximum and the HEAP at maximum.

The problem fails at one instruction. I have a function call that returns a 
double value to a variable declared by:

double SecondFact;

I initialize that with:

SecondFact = 0;

Now, here is the original use of the statement that causes the problem:

SecondFact = (double) ParseBaseInt(dd, SecondFact, &baseErr);        

This statement causes a system reset.  dd, SecondFact and baseErr 
are defined properly and I have even removed that function all-together 
and I still have the same error, so the function, itself, isn't the problem.

To verify that this instruction is the specific problem point, I created the 
following test code:

FrmCustomAlert(altNotice, "Failure 1", " ", " ");                                      
                                       
      SecondFact = (double) ParseBaseInt(dd, SecondFact, &baseErr);                    
                                                         
FrmCustomAlert(altNotice, "Failure 2", " ", " "); 

When launched, the first custom Alert is displayed, then the system 
resets and the 2nd custom Alert isn't displayed.  Therefore, the problem 
is with this statement.

Now, heres the weird part.  I replaced the test code above with: 

FrmCustomAlert(altNotice, "Failure 1", " ", " ");                                      
                                       
      SecondFact = 5;                                                                  
           
FrmCustomAlert(altNotice, "Failure 2", " ", " "); 

This eliminated the function as the source of the problem and I still get 
the same symptom.  Alert1 is displayed but Alert2 is not.

Now, here is the real frustrating part.  I replaced this test code with:

FrmCustomAlert(altNotice, "Failure 1", " ", " ");                                      
                                       
      xxx  = 5;          // a different double variable for test                       
                                     
FrmCustomAlert(altNotice, "Failure 2", " ", " "); 

I declared xxx as double at the beginning of the routine.

This code displays both alert boxes.  So, it appears that for some 
reason, I can't assign anything to SecondFact variable.  Why not?  It is 
declared as a double.  

Any  clues why this won't work when I run it on the simulator but will run 
on all the emulators and on the actual palm devices?

Mike



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to