MCUXpresso A stack overflow error has occurred.

cancel
Showing results for 
Search instead for 
Did you mean: 

MCUXpresso A stack overflow error has occurred.

1,451 Views
Contributor IV

MCUXpresso IDE v11.0.0 [Build 2516] [2019-06-05]
(c) Copyright 2006-2019 NXP

OS: Windows 7, v.6.1, x86_64 / win32
Java version: 1.8.0_201

MCU: 

C++ project

Problem:

MCUxpresso crashes with the error message:

Internal Error

A stack overflow error has occured.

You are recommended to exit the workbench.

How to Reproduce:

After starting a Debug session, or while hovering over code while debugging.

I have asked for a solution for this:

Case:00221977: A stack overflow error has occurred. While hovering over code while debugging.

I tried the suggestion to modify the mcuxpressoide.ini, but that did not work

-Xss1m -> -Xss10m

I realize this is an eclipse error, but does anybody have a solution or fix for this problem?

Thanks,

Bruce

0 Kudos
20 Replies

65 Views
NXP Employee
NXP Employee

I understand your frustration about MCUXpresso IDE not working for you. And we really would like to get this solved ASAP.

But please can you respond to the questions we have previously asked: https://community.nxp.com/thread/517150#comment-1233946 

which were:

  • Please can you confirm if you have seen this issue using a completely new workspace with one of the standard SDK examples?
    • If you have the IDE running, then you can easily switch to a new workspace by using File -> Switch workspace ->Other and just entering the name of a completely new directory (which the IDE will create, and restart in).
  • Can you comment if your normal workspace has projects with circular references in them?

Can you also now clarify something you commented on in you previous post : https://community.nxp.com/thread/517150#comment-1234246 

where you mention using J-Link software 4.40 to 4.66k

MCUXpresso IDE v11.0.1 ships with J-Link software version v6.46k. Is this the version you mean?

Since we released IDE v11.0.1, SEGGER have released quite a few further updates. It might be worth installing a new version and see if that helps. Please make sure that you update your workspace preference to point to the newer version though (the info in the following blog shows the preference page required):

https://community.nxp.com/community/mcuxpresso/mcuxpresso-ide/blog/2019/07/08/updating-a-segger-j-li... 

Regards,

MCUXpresso IDE Support

0 Kudos

65 Views
Contributor IV

When the Debug session is started, the Console window displays:

Executed SetRestartOnClose=1

[MCUXpresso Semihosting Telnet console for 'MedEquip JLink Debug' started on port 51355 @ 127.0.0.1]

SEGGER J-Link GDB Server V6.46k - Terminal output channel

0 Kudos

65 Views
NXP Employee
NXP Employee

We've done some more experiments in order to track down the issue you're seeing. We tried v11.0.0 and v11.0.1 with SDK 2.2.0 for FRDM KL26Z. There's really no problem with regards to debugging the default SDK example projects. However, when making some changes to the projects, the problem you describe starts showing up. So, please let us know which of the situation below applies in your case:

 1. Two 'power mode switch' demo apps (can be any other default/custom projects), each one having a reference to the other one. 

pastedImage_1.png

pastedImage_2.png

2. Using the 'power mode switch' (can be any other project) SDK example, force the 'Debug' build configuration reference the 'Release' build configuration. 

pastedImage_3.png

The workaround for the above mentioned use cases is to close the Global Variables view and use the Expressions view to monitor any global variables instead.

Even if you're not in one of the situations described above, would you please close Global Variables view and check if the problem still appears? Please let us know.

Greetings,
MCUXpresso IDE Support

0 Kudos

65 Views
Contributor IV

Today, I will do as you suggest, and I will report me results.

Thanks,

Bruce

0 Kudos

58 Views
Contributor IV

I am seeing the "Stack Overflow" problem when I have a different workspace open in another instance of MCUXpresso.

When I have only 1 instance of MCUXpresso open, and only 1 project open in the workspace window, I have not had the "Stack Overflow" problem.

If that is the work around, I can live with it.

I will try this out for a few more days.

Thanks,

Bruce

0 Kudos

65 Views
NXP Employee
NXP Employee

Thanks for providing your test project - we'll take a look at this and see if it helps us to reproduce.

But please can you confirm if you have seen this issue using a completely new workspace with one of the standard SDK examples?

Also, can you comment if you normal workspace has projects with circular references as per our previous post.

Regards,

MCUXpresso IDE Support

0 Kudos

65 Views
Contributor IV

This problem happens with ALL versions of MCUXpresso, on ALL PCs, on ALL builds, with ALL versions of j-link, with ALL new and imported projects!

I restart MCUXpresso one hundred times a day! That is no exaggeration! We spend most of our time restarting MCUXpresso.

Start Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart,  Debug, crash, restart, ...

Please let me know what else can I provide that can help you all sort this problem out.

Thanks,

Bruce

0 Kudos

65 Views
Contributor IV

More info...

Occurs with j-link versions 4.40 to 4.46k.

Occurs with old and new J-Link Debug Probes.

Occurs with and without FreeRTOS.

Occurs with all of our FRDM boards using j-link.

Occurs with old and new custom boards.

Thanks,

Bruce

0 Kudos

65 Views
NXP Employee
NXP Employee

We have so far been unable to reproduce your issue here. We need to try to narrow down the trigger point.

Do you see the issue if you create a new workspace, and use the new project wizard to create a simple test project for your MCU?

If that works, then does creating another simple test project is your normal workspace (where your real development project exhibits the problem), show up the problem or not?

Regards,

MCUXpresso IDE Support

0 Kudos

65 Views
Contributor IV

Every project that I build has the problem.

I built the SDK example "power mode switch", and got the problem.

Any other ideas?

Thanks,

Bruce

pastedImage_1.png

0 Kudos

65 Views
NXP Employee
NXP Employee

Would you please attach one of the demo example projects (e.g. "power mode switch") you create and that illustrates the problem?

Also, please double-check whether the projects you have in your workspace reference other projects - right-click the project => choose Project References. If you have circular references (e.g. project A references project B, and project B references project A) then this could be the root cause.

Greetings,
MCUXpresso IDE Support

0 Kudos

65 Views
Contributor IV

Please see the attached project.

Occurs with all version of MCUXpresso IDE v10 and v11.

My current version is:

MCUXpresso IDE v11.0.1 [Build 2563] [2019-09-01]
(c) Copyright 2006-2019 NXP

OS: Windows 7, v.6.1, x86_64 / win32
Java version: 1.8.0_201

The stack overflow is occurring on all Windows 7 and Windows 10 PCs in the office.

Segger J-link Plus

The stack overflow is occurring with all boards that have MKL26Z256 and MKL16Z256.

Thanks,

Bruce Graham

0 Kudos

65 Views
NXP Employee
NXP Employee

Could you please undo whatever change you previous made to your mucxpressoide.ini file. The supplied one would not normally specify the -Xss option at all.

In addition, please can you delete your existing .launch file and then using the Quickstart Panel's Debug button and letting it recreate  the launch configuration automatically.

Regards,

MCUXpresso IDE Support

0 Kudos

65 Views
Contributor IV

NO DIFFERENCE. Any other ideas?

See repro steps below.

This happens every time I try it.

This happens with every PC at work.

It is SO easy to reproduce, so why can't you folks fix it?

Thanks,

Bruce Graham

Senior Software Engineer
TechnoSoft Innovations, Inc.
bgraham@technosofteng.com

900 Perimeter Park Drive, Suite C
Morrisville, NC 27560
Phone 919-337-0866 Ext 104

Installed 

MCUXpresso IDE v11.0.1 [Build 2563] [2019-09-01]
(c) Copyright 2006-2019 NXP

OS: Windows 7, v.6.1, x86_64 / win32
Java version: 1.8.0_201

Deleted *.launch file.

Compiled Debug configuration.

Using the Quickstart Panel, created new Debug configuration.

Started the debugger.

Stopped the debugger.

Edited some code. 

Compiled.

Started the debugger. See error dialog below.

pastedImage_1.png

0 Kudos

65 Views
NXP Employee
NXP Employee

Thanks for providing the additional background information. However, we still really need to see the .log file that can be found in the .metadata folder in your workspace directory.

[You can attach it to your post by using the "Advanced Editor".]

Regards,

MCUXpresso IDE Support

0 Kudos

65 Views
Contributor IV

I did not find a log file in my project directory.

I exported the "Error Log" window. I will attempt to attach the file.

Thanks,

Bruce

0 Kudos

65 Views
NXP Employee
NXP Employee

Please can you post the .log file that can be found in the .metadata folder in your workspace directory?

Can you also provide more details of your project?

What MCU are you using? Are you using an MCUXpresso SDK, or is its a "preinstalled MCU" ? How big is your project - including the size of the generated AXF as well as the information generated at the end of the build log.

What debug probe are you using?

Do you see the same issue if you build and debug a standard example for your MCU / board?

It might also be interesting to know if opening the IDE with a fresh empty workspace, and then importing your project from the old workspace using "QuickStart Panel -> Import project(s) from file system", still causes you to see the same issue.

Regards,

MCUXpresso IDE Support

0 Kudos

65 Views
Contributor IV

Please can you post the .log file that can be found in the .metadata folder in your workspace directory?

 

Can you also provide more details of your project?

MCUXpresso IDE v11.0.1 [Build 2563] [2019-09-01]

C++ FreeRTOS, SDK

 

What MCU are you using?

MKL16Z256 on the board. MKL26Z256 in the project.

Are you using an MCUXpresso SDK, or is its a "preinstalled MCU" ?

SDK_2.x_MKL26Z256xxx4

How big is your project - including the size of the generated AXF as well as the information generated at the end of the build log.

16:26:53 **** Build of configuration Debug for project MedEquip ****
make -r -j8 all
Building target: MedEquip.axf
Invoking: MCU C++ Linker
arm-none-eabi-c++ -nostdlib -Xlinker -Map="MedEquip.map" -Xlinker --gc-sections -Xlinker -print-memory-usage -mcpu=cortex-m0plus -mthumb -T MedEquip_Debug.ld -o "MedEquip.axf" ./startup/startup_mkl26z4.o ./src/trace/trace.o ./src/WatchDog/CWatchDog.o ./src/UART/uart_rx.o ./src/UART/uart_tx.o ./src/SystemFSM/CSystemFSM.o ./src/SystemFSM/CSystemFSM_FSM.o ./src/SystemFSM/CSystemFSM_MsgQueue.o ./src/SOS_Button/CSosButton.o ./src/SOS_Button/CSosButtonThread.o ./src/LEDs/CLEDs.o ./src/LEDs/LED_modes.o ./src/Cellular_Modem/CCellularModem.o ./src/Cellular_Modem/CCellularModem_Audio.o ./src/Cellular_Modem/CCellularModem_FSM.o ./src/Cellular_Modem/CCellularModem_FSM_CALL.o ./src/Cellular_Modem/CCellularModem_GPS.o ./src/Cellular_Modem/CCellularModem_MsgQueue.o ./src/Cellular_Modem/CCellularModem_Network.o ./src/Cellular_Modem/CCellularModem_Power.o ./src/Cellular_Modem/CCellularModem_SMS.o ./src/Cellular_Modem/CCellularModem_UART.o ./src/Cellular_Modem/CCellularModem_UART_RX.o ./src/Cellular_Modem/CCellularModem_URC.o ./src/Cellular_Modem/CCellularModem_pollNetStatusAndGPS.o ./src/BatteryCharger/CBatteryCharger.o ./src/Accelerometer/CADXL36X.o ./src/Accelerometer/CAccelerometer.o ./src/Accelerometer/CSPI_Controller.o ./src/IRQHandler.o ./src/PowerOnSelfTestError.o ./src/TaskDelayMillisec.o ./src/debug_assert.o ./src/main.o ./src/mtb.o ./src/power_on_self_test.o ./src/prettyFormat.o ./src/system_messages.o ./src/system_power.o ./libPortableUtilities/src/CDateTime.o ./libPortableUtilities/src/CQueue.o ./libPortableUtilities/src/CStringParser.o ./libPortableUtilities/src/CStringPortable.o ./libPortableUtilities/src/CTimeOut.o ./libPortableUtilities/src/CTimeSpanning.o ./libPortableUtilities/src/my_itoa.o ./libPortableUtilities/src/my_vsnprintf.o ./freertos/portable/fsl_tickless_systick.o ./drivers/fsl_adc16.o ./drivers/fsl_clock.o ./drivers/fsl_common.o ./drivers/fsl_cop.o ./drivers/fsl_dma.o ./drivers/fsl_dmamux.o ./drivers/fsl_ftfx_cache.o ./drivers/fsl_ftfx_controller.o ./drivers/fsl_ftfx_flash.o ./drivers/fsl_ftfx_flexnvm.o ./drivers/fsl_gpio.o ./drivers/fsl_llwu.o ./drivers/fsl_lpsci.o ./drivers/fsl_lpsci_dma.o ./drivers/fsl_lptmr.o ./drivers/fsl_pmc.o ./drivers/fsl_rcm.o ./drivers/fsl_sim.o ./drivers/fsl_smc.o ./drivers/fsl_spi.o ./drivers/fsl_spi_dma.o ./drivers/fsl_tpm.o ./drivers/fsl_uart.o ./drivers/fsl_uart_dma.o ./board/board.o ./board/clock_config.o ./board/peripherals.o ./board/pin_mux.o ./amazon-freertos/portable/heap_4.o ./amazon-freertos/FreeRTOS/portable/port.o ./amazon-freertos/FreeRTOS/event_groups.o ./amazon-freertos/FreeRTOS/list.o ./amazon-freertos/FreeRTOS/queue.o ./amazon-freertos/FreeRTOS/stream_buffer.o ./amazon-freertos/FreeRTOS/tasks.o ./amazon-freertos/FreeRTOS/timers.o ./CMSIS/system_MKL26Z4.o
Memory region Used Size Region Size %age Used
PROGRAM_FLASH: 111444 B 256 KB 42.51%
SRAM: 19344 B 32 KB 59.03%
Finished building target: MedEquip.axf

make --no-print-directory post-build
Performing post-build steps
arm-none-eabi-size "MedEquip.axf"; # arm-none-eabi-objcopy -v -O binary "MedEquip.axf" "MedEquip.bin" ; # checksum -p MKL26Z256xxx4 -d "MedEquip.bin";
text data bss dec hex filename
110568 876 18464 129908 1fb74 MedEquip.axf

16:26:53 Build Finished. 0 errors, 0 warnings. (took 529ms)

 

What debug probe are you using?

Sagger j-link Plus

 

Do you see the same issue if you build and debug a standard example for your MCU / board?

Yes

 

It might also be interesting to know if opening the IDE with a fresh empty workspace, and then importing your project from the old workspace using "QuickStart Panel -> Import project(s) from file system", still causes you to see the same issue.

Yes

0 Kudos

65 Views
Senior Contributor III
0 Kudos

65 Views
Contributor IV

No difference. Same error occurs.

0 Kudos