782 views
in System Integration by

Hi,

I use USB cdc to input data to my device and store data in database.

In one of my EW view, I will get some data from database and show it on view.

but  when I run for a while , I will get the below errors.

[FATAL ERROR] Unmanaged string found '\x600A' 

[FATAL ERROR] Unmanaged string found '\x600B\x3C80\x81DA'

[FATAL ERROR] Unmanaged string found '\x600A\x48EC\x81DA\x0001'

I don't know how to figure out this error, is there any suggestions ?

and I am not sure that it will be helpful for you to understand my question

I just paste my function code below 

 

this function is from C code to update Latitude,Longitude.... to Embedded Wizard

void UpdateGUI(GPS_DATA * gpsdata)
{
	static char LATbuf[15];
	static char LONbuf[15];
	memcpy ( &GpsBuf, gpsdata, sizeof(GPS_DATA) );
	Ownship.Latitude  = Mins2DegreeMins(gpsdata->Latitude.number);
	Ownship.Longitude = Mins2DegreeMins(gpsdata->Longitude.number);
	ShipData_Pos2Dispaly(Ownship.Latitude,Ownship.Longitude,LATbuf,LONbuf);

	DataDataClass device = EwGetAutoObject( &DataData,DataDataClass );
	DataDataClass__UpdateOwnLat(device,EwNewStringAnsi(LATbuf));
	DataDataClass__UpdateOwnLon(device,EwNewStringAnsi(LONbuf));
	DataDataClass__UpdateSOG(device,gpsdata->SOG_Knot.number);
	DataDataClass__UpdateCOG(device,gpsdata->COG_True);
}

 and this is from Embedded Wizard to get some data from database

var int32 i = 0; 
var int32 tmpSv  = 0;
var int32 tmpUse = 0;
var int32 tmpID  = 0;
var int32 tmpSNR = 0;
var Core::View view  = Bar1;
Reset();

native(tmpSv)
{
  GPS_DATA *gps;
  gps = GpsData_Get();
  tmpSv = gps->NoSv;
}

for(i=0;i<tmpSv;i=i+1)
{
  var Menu::MeteringBar bar = (Menu::MeteringBar)view;
  trace view;

  if ( bar != null )
  {
    native(tmpUse,tmpID,tmpSNR,i)
    {
      GPS_DATA *gps;
      gps = GpsData_Get();
      tmpUse = 0;
      tmpID  = gps->Sv_Id[i];
      tmpSNR = gps->Sv_SNR[i];
      if(tmpID == CHAR_MAX)
        continue;
      for(int j=0;j< gps->NoSu;j++)
      {
        if(gps->Sv_Id[i] == gps->Su[j])
        { 
          tmpUse = 1;
          break;
        }
      }
    }
    bar.Caption = string(tmpID);
    bar.MaxValue = 50;
    bar.CalculateValue = tmpSNR;
    bar.InUse = tmpUse;
    bar.Visible = true;
  }
  // Search for next view
  view = FindNextView( view, Core::ViewState[]);
}

 

thanks!

Best Regards,

Andy

2 Answers

0 votes
by
 
Best answer
Hi Andy,

just some additional ideas/questions:

Are you using an operating system? Please ensure that the stack (either the system stack or the stack for the GUI task) is large enough (4...8 KB).

Does the error happens always or only sporadically?

Best regards,

Manfred.
by

Hi Manfred, Paul

I use FreeRTOS and I am sure the stack is large enough.

I try to mark some code and I find that the error happened when I update Latitude. Longitude

 

below I think it might be the reason to cause the error when I update the Latitude, Longitude

My Latitude, Longitude object is Views::Text and its Font is FontSmall

the picture is my FontSmall setting

FontRange.txt is generated by the Strings.xls which is offered by Embedded Wizard in Language Table Example

Is this a reason to cause the error and how to fix it?

Thanks

Best Regards.

Andy

by

Hi Andy,

I seems that you are now talking about a different error.

According to the error message, there are overlapping ranges within your font definition. Within FontRange.txt there is already a range from 0x20-0xFF defined - so this range is defined twice. In order to solve this error, please restore the default value for Chinese (so that it is again empty) and set the language variant Default to FontRange.txt. The Excel Sheet Macro collects all character codes of all strings in all languages and stores them within the FontRange.txt file.

Concerning your origin error:

How often does this error happen - each time with the same Latitude, Longitude values or only seldom after a couple of minutes/hours?

Best regards,

Manfred.

by

Hi, Manfred

thanks for your reply for font definition error.

I used PropertyObserver to update my Latitude and Longitude.

Each time it start to run, the error happened after 20 minutes or 30 minutes (not sure).

it's not the same value to cause the error happened.

----update----

sometimes it will appear another error like below

EMI ERROR: code: 335, info1: 8107F800, info2: 13
For details please visit https://doc.embedded-wizard.de/errors

Best Regards,

Andy

by

Hi Andy,

according to your reports, there seems to happen some memory overwriting.

Two more questions / ideas:

1.) Can you ensure, that there is no other thread/task that is calling Embedded Wizard functions?

2.) I assume you are working on iMXRT1050. Are you using the original board.c file? Please let me know the MPU settings for the SDRAM - should be something like this:

    /* Region 7 setting: Memory with Normal type, not shareable, outer/inner write back */
    MPU->RBAR = ARM_MPU_RBAR(7, 0x80000000U);
    MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_32MB);

Do you have these settings? If yes, you can try the following:

    MPU->RBAR = ARM_MPU_RBAR(7, 0x80000000U);
    MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, 0, 1, 0, 0, ARM_MPU_REGION_SIZE_32MB);

Does this change something?

Best regards,

Manfred.

by

Hi Manfred,

1. my project has several tasks, Gui_task(Embedded Wizard), Ais_task and so on.

   My function UpdateGUI(GPS_DATA * gpsdata) (the content is above) is called in Ais_task.

   I am not sure whether I violate multithreading or not

2.  I am working on iMXRT1052

    /* Region 7 setting: Memory with Normal type, not shareable, outer/inner write back */
    MPU->RBAR = ARM_MPU_RBAR(7, 0x80000000U);
    MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_32MB);

I will try the below settings

    MPU->RBAR = ARM_MPU_RBAR(7, 0x80000000U);
    MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, 0, 1, 0, 0, ARM_MPU_REGION_SIZE_32MB);

Best Regards,

Andy

by

Hi Andy,

it seems that you have found the answer:

1. my project has several tasks, Gui_task(Embedded Wizard), Ais_task and so on.

   My function UpdateGUI(GPS_DATA * gpsdata) (the content is above) is called in Ais_task.

   I am not sure whether I violate multithreading or not

Please have a look to the chapter Avoid multithreading. The update of the device class (DataDataClass) must be done in the context of the GUI task.

There is no need to test other MPU settings.

Best regards,

Manfred.

by
Hi Manfred

Thanks for your help!!

Best Regards,

Andy
0 votes
by

Hello Andy,

at the first view I don't see any errors in the implementation. Generally, the error message "Unmanaged string ..." indicates the usage of a string not created by Embedded Wizard functions. It can, however, also indicate an error caused by an overwritten memory area. More details to the error message can be found in the section Error message: Unmanaged string found

What can you do?

Q 1: Do you recognize the string content '\x600A\x48EC\x81DA\x0001'? If yes, check the corresponding code location.

Q 2: Do you have more C code intended for data exchange with UI? Try to comment out the code section by section and test the application each time. In this way you can isolate the possible error source.

Q 3: Are you using multithreading? If yes, please see the section Avoid multithreading.

Best regards

Paul Banach

 

by
Hi Paul

Thanks for your reply

1. I don't recognize the string content, actually I don't know their meanings, are they ascii code or ?

2. I will try to mark C code to find out the problem.

3. I don't use multithreading.

Best Regards,
Andy

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...