Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

ExceptionResultMessage: Attempted to read or write protected memory.

Afternoon all,
I hope you can assist me.
I am running Microsoft Power BI Desktop Version: 2.123.742.0 64-bit (November 2023).

I am connecting to a ODBC or a Denodo database plug-in (the issue occurs on both options) whereby when attempting to refresh the data, I receive a massive error dump as noted below.

 

I had to dumb the query down from a CTE to a select from a select as BI was not happy with the CTE, but since changing to my revised query, I now receive the following below.

 

I am really new to Power BI, so I might be doing  something wrong, but I would really appreciate any help in this matter.

 

Feedback Type:
Frown (Error)

Error Message:
Error

Stack Trace:
Microsoft.Mashup.Client.UI.Shared.ExceptionResultException
at Microsoft.Mashup.Evaluator.EvaluationHost.OnException(IEngineHost engineHost, IMessageChannel channel, ExceptionMessage message)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.OnMessageWithUnknownChannel(IMessageChannel baseChannel, MessageWithUnknownChannel messageWithUnknownChannel)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.Interface.IMessageChannelExtensions.WaitFor[T](IMessageChannel channel)
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.WaitFor(Func`1 condition, Boolean disposing)
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.get_TableSource()
at Microsoft.Mashup.Evaluator.Interface.TracingPreviewValueSource.get_TableSource()
at Microsoft.Mashup.Host.Document.Analysis.PackageDocumentAnalysisInfo.PackagePartitionAnalysisInfo.SetPreviewValue(EvaluationResult2`1 result, Func`1 getStaleSince, Func`1 getSampled)

Stack Trace Message:
Error

Invocation Stack Trace:
at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
at Microsoft.Mashup.Client.UI.Shared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace, String exceptionMessage)
at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.GetStackTraceInfo(Exception e)
at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass14_0.<HandleException>b__0()
at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
at Microsoft.PowerBI.Client.PowerBIUnexpectedExceptionHandler.HandleException(Exception e)
at Microsoft.Mashup.Client.UI.Shared.DataImporter.HandleImportEvaluationException(ExceptionResult exceptionView, Query query, String sourceID, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor)
at Microsoft.Mashup.Client.UI.Shared.DataImporter.OnGetPreviewResult(PreviewResult preview, Query query, String sourceID, String formulaTitle, Nullable`1 explicitImportDestination, Boolean isNewQuery, Boolean isFromEditor)
at Microsoft.Mashup.Client.UI.Shared.DataImporter.GetPreviewResult(Query query, String sourceID, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor, Nullable`1 explicitImportDestination)
at Microsoft.Mashup.Client.UI.Shared.DataImporter.<>c__DisplayClass89_0.<OnQuerySettingsResolved>b__0()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
at Microsoft.PowerBI.Client.Program.<>c__DisplayClass6_0.<RunApplication>b__0()
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<>c__DisplayClass3_0.<HandleExceptionsWithNestedTasks>b__0()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at Microsoft.PowerBI.Client.Program.RunApplication(String[] args)
at Microsoft.PowerBI.Client.Program.Main(String[] args)


PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.123.742.0","ModuleName":"","Component":"Microsoft.Mashup.Evaluator.EvaluationHost","Error":"Microsoft.Mashup.Client.UI.Shared.ExceptionResultException","MethodDef":"OnException","ErrorOffset":"","ErrorCode":""}

Snapshot Trace Logs:
C:\Users\nb306883\Microsoft\Power BI Desktop Store App\FrownSnapShot0acec4fd-5e3e-4572-9712-b13b68c04814.zip

Model Default Mode:
Empty

Model Version:
PowerBI_V3

Performance Trace Logs:
C:\Users\nb306883\Microsoft\Power BI Desktop Store App\PerformanceTraces.zip

Enabled Preview Features:
PBI_sparklines
PBI_scorecardVisual
PBI_NlToDax
PBI_fieldParametersSuperSwitch
PBI_setLabelOnExportPdf
PBI_dynamicFormatString
PBI_oneDriveSave
PBI_oneDriveShare
PBI_newCard
PBI_buttonSlicerAuthoring

Disabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_SpanishLinguisticsEnabled
PBI_qnaLiveConnect
PBI_b2bExternalDatasetSharing
PBI_enhancedTooltips
PBI_angularRls
PBI_onObject
PBI_backstageUI
PBI_gitIntegration
PBI_modelExplorer
PBI_daxQueryView
PBI_aiNarrativesVisual
PBI_qnaImproveLsdlCopilot

Disabled DirectQuery Options:
TreatHanaAsRelationalSource

Cloud:
GlobalCloud

ExceptionResultMessage:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

PowerBIUserFeedbackServices_IsReported:
True

Formulas:


section Section1;

shared Query1 = let
Source = Value.NativeQuery(Denodo.Contents("DenodoODBCa64", null, []){[Kind="Database"]}[Data], "SELECT MAX (TOTALS_PER_SEC), DATE#(lf)FROM#(lf)(#(lf)SELECT #(lf)#(tab)SUBSTRING (A.TXN_RSP_TMS,0,10) AS DATE#(lf)#(tab),COUNT(*) AS TOTALS_PER_SEC#(lf)FROM#(lf)#(tab)NZ1_CDM_ADMIN.switch_ahrn_msg_dtl_fact A #(lf)#(tab)INNER JOIN NZ1_CDM_ADMIN.switch_ahrn_fact B#(lf)#(tab)#(tab)ON A.SWITCH_AHRN_NO = B.SWITCH_AHRN_NO#(lf)#(tab)#(tab)#(tab)AND A.TM_PRD_ID = B.TM_PRD_ID#(lf)WHERE#(lf)#(tab)(A.TXN_RSP_TMS >= ADDDAY(CURRENT_DATE,-365))#(lf)#(tab)AND B.TXN_SRC_ND_ORIG_NM like ('%CSrc%')#(lf)GROUP BY#(lf)#(tab)A.TXN_RSP_TMS#(lf)ORDER BY#(lf)#(tab)TOTALS_PER_SEC DESC#(lf)) t#(lf) #(lf)GROUP BY DATE#(lf)ORDER BY DATE ASC", null, [EnableFolding=true])
in
Source;

Status: Investigating
Comments
Anonymous
Not applicable

Hi  @TimD 

What is your data source ? Have you ever used ODBC to connect to a data source before? 

 

Best Regards,
Community Support Team _ Ailsa Tao
.

TimD
New Member

Hi @Anonymous 

The data source has been tested in two ways.
Once via the Denodo database plug-in

TimD_0-1702286773650.png

 

And another via the ODBC to the Denodo data source.

 

TimD_1-1702286853636.png

 

Please advise if you need any further information?

 

Thank you.

Anonymous
Not applicable

Hi  @TimD 

Power BI Desktop has been updated to the December version, you can update your Desktop and retest your issue. I've also found documentation on how to connect to Denodo database. You can refer to that.

How to connect to Denodo from Power BI

 

Best Regards,
Community Support Team _ Ailsa Tao