Acknowledged
CIQQA-3220

Illegal Access (Out of Bounds) in Exception.printStackTrace with synchronous onReceive call (SDK 8.1.1)

With SDK 8.1.1, I’ve been encountering Error: Illegal Access (Out of Bounds) exceptions originating from Exception.printStackTrace. These occur both for exceptions thrown by my own code and those triggered by SDK functions.

Below is a log excerpt from one such occurrence. In this instance, the issue arises during a special case where onReceive is called immediately and synchronously from Communications.makeWebRequest. This might be related to the problem. Notably, there is an odd empty line in the stack trace between two function calls, which could be a clue.

8.5.2025 19:08:02: No phone

Exception: No phone  
Stack:  
  - checkResponseCode() at D:\ProjectsLocal\ohg\source\requests\BaseRequest.mc:37 0x100004b3  
  - onReceive() at D:\ProjectsLocal\ohg\source\requests\BaseSitemapRequest.mc:66 0x10000f2a  
  -  at  
  - makeRequest() at D:\ProjectsLocal\ohg\source\requests\BaseSitemapRequest.mc:59 0x10001054  

Error: Illegal Access (Out of Bounds)  
Details: Failed invoking <symbol>  
Stack:  
  - debugException() at D:\ProjectsLocal\ohg\source\helpers\Logger.mc:46 0x1000088a  
  - handleException() at D:\ProjectsLocal\ohg\source\ui\error\ExceptionHandler.mc:29 0x100017c9  
  - onException() at D:\ProjectsLocal\ohg\source\requests\SitemapRequest.mc:59 0x1000239b  
  - onReceive() at D:\ProjectsLocal\ohg\source\requests\BaseSitemapRequest.mc:75 0x10000fa4  
  -  at  

This ultimately results in an application crash.

For reference, here is the source code corresponding to the stack trace, in case it's helpful for identifying the root cause.

https://github.com/TheNinth7/ohg

  • I'll pass this along to development. 

  • Here’s a link to the Logger.mc file. The Illegal Access error appears to originate from line 62, where printStackTrace() is called. It seems to partially work, but then crashes while printing the stack trace.

    github.com/.../Logger.mc

    In general, exception handling seems somewhat unstable. During recent development, I encountered cases where the stack trace consisted only of empty at entries. I didn’t file an issue at the time, as I was focused on progressing with my work, but I’ll make sure to report it properly if I encounter it again.

  • @Richard.ConnectIQ: Unfortunately, I’m still able to reproduce the issue with SDK 8.2.1.

    Here’s the log from the most recent attempt:

    22.6.2025 15:27:55: No phone
    (-104)

    Exception: No phone
    (-104)
    Stack: 
      - checkResponseCode() at D:\GitHub\ohg\source\web-requests\base\BaseRequest.mc:78 0x10006588 
      - onReceive() at D:\GitHub\ohg\source\web-requests\sitemap\SitemapRequest.mc:177 0x10005765 
      -  at 
      - makeRequest() at D:\GitHub\ohg\source\web-requests\sitemap\SitemapRequest.mc:145 0x10005819 

    Error: Illegal Access (Out of Bounds)
    Details: Failed invoking <symbol>
    Stack: 
      - debugException() at D:\GitHub\ohg\source\logging\Logger.mc:62 0x100001f8 
      - handleException() at D:\GitHub\ohg\source\user-interface\error-handling\ExceptionHandler.mc:40 0x10001d56 
      - handleException() at D:\GitHub\ohg\source\web-requests\sitemap\SitemapRequest.mc:114 0x100058d9 
      - onReceive() at D:\GitHub\ohg\source\web-requests\sitemap\SitemapRequest.mc:190 0x100057ba 
      -  at 

    Encountered app crash.
  • Development believes this may have been resolved in SDK 8.2.0. Are you able to check this with the latest SDK 8.2.0 to see if you still encounter this issue?

  • Error: Illegal Access (Out of Bounds)
    Details: Failed invoking <symbol>
    Stack:
      - debugException() at D:\GitHub\ohg\source\logging\Logger.mc:51 0x10000b6a
      - initializeMenu() at D:\GitHub\ohg\source\web-requests\sitemap\WidgetSitemapRequest.mc:37 0x10002f9d
      - getInitialView() at D:\GitHub\ohg\source\OHApp.mc:47 0x10000f0e