Hello,
I am experiencing a strange issue where I get crash reports from my app running on windows, with Unhandled Exceptions raised from DrawCautionIcon, but I don’t use this method anywhere in my project and also from the stack traces in the crash reports nothing points to something that may use it.
I am not able to reproduce the problem myself but I see some of the user is experiencing it.
Exceptions raised are of two kinds:
-
UnsupportedOperationException with message “Graphics object cannot be used outside its Paint event”. Stack Trace:
RuntimeRaiseException
RuntimeExceptionStack
RuntimeExceptionStack
graphicsDrawCautionIcon
Graphics.DrawCautionIcon%%of8f8
SCProjectAssetsLibraryWidget.SCProjectAssetsLibraryWidget.importDroppedObjects%%o<SCProjectAssetsLibraryWidget.SCProjectAssetsLibraryWidget>o
SCProjectAssetsLibraryWidget.SCProjectAssetsLibraryWidget.Event_DropObject%%o<SCProjectAssetsLibraryWidget.SCProjectAssetsLibraryWidget>oi8
ewcDropObject
EmbeddedWindowControl.Event_DropObject%%ooi8
EmbedWithinInternal
HideMouseCursor
serialClearBreak
selectColor
RevokeActiveObjectExt
NdrSendReceive
Ndr64AsyncServerCallAll
NdrStubCall3
CStdStubBuffer_Invoke
CoWaitForMultipleObjects
CoWaitForMultipleObjects
HSTRING_UserSize
CoGetCurrentLogicalThreadId
CoWaitForMultipleHandles
CoSetErrorInfo
CoGetStandardMarshal
CallWindowProcW
DispatchMessageW
enableMenuItems
Application._CallFunctionWithExceptionHandling%%op
enableMenuItems
RuntimeRun
REALbasic._RuntimeRun
_Main
wWinMain
__tmainCRTStartup
BaseThreadInitThunk
RtlUserThreadStart -
NilObjectException with message “Graphics has no backing, most likely its associated Picture has been destroyed”. Stack Trace:
RuntimeRaiseException
RuntimeExceptionStack
graphicsDrawCautionIcon
Graphics.DrawCautionIcon%%of8f8
SCStage.handleDragOver%%oi8i8oi8
ProjectWinDragCatcherWin.ProjectWinDragCatcherWin.mainStageDragEventsManager_DragOver%b%o<ProjectWinDragCatcherWin.ProjectWinDragCatcherWin>oi8i8oi8
Delegate.IM_Invoke%b%oi8i8i8i8
AddHandler.Stub.7%b%i8i8oi8
EmbedWithinInternal
HideMouseCursor
serialClearBreak
selectColor
RevokeActiveObjectExt
NdrSendReceive
Ndr64AsyncServerCallAll
NdrStubCall3
CStdStubBuffer_Invoke
Ordinal111
Ordinal111
HSTRING_UserSize
StringFromGUID2
RoGetApartmentIdentifier
CoRegisterClassObject
Ordinal87
CallWindowProcW
DispatchMessageW
enableMenuItems
Application._CallFunctionWithExceptionHandling%%op
enableMenuItems
RuntimeRun
REALbasic._RuntimeRun
_Main
wWinMain
__tmainCRTStartup
BaseThreadInitThunk
RtlUserThreadStart
Again, searching my project for “DrawCautionIcon” gives zero results. Also on the Mac, using of course the same code, this never happens.
Any ideas?
App is compiled with Xojo 2020r2.1