Xojo Conferences
MBSOct2019CologneDE

Failed assertion on loading resource image (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: MADplug?
Next thread: Stuffit Engine Implementation


Another cross-plattform question   -   Jan Erik Moström <
  Failed assertion on loading resource image   -   Mike B
   Re: Failed assertion on loading resource image   -   Joseph J. Strout

Failed assertion on loading resource image
Date: 30.05.02 19:24 (Thu, 30 May 2002 20:24:22 +0200)
From: Mike B

After running my app in the IDE a few times I get an error, the debug stops
and a small 10 to 12 pixel blank panel shows in the window for the code
below "like the type for an unhandled exception or other error" the code is
a class I built for a canvas to draw some buttons, then after Iclick
somewhere a dialog window with either of the following two text blocks
appear:

Runtime failure. Failed assertion.
Please report what caused this error........

Array.cpp:68

Or

Stringmap.cpp:62

after selecting quit I open Rb and run it in the IDE a few more times ( 4 or
maybe 5 ) then I get the error again, anyone any ideas? Is it my code or is
it RB? the code where the exception arises is below:


dim w,h as integer

theFont="System"
theTextSize

PictureUp = app.resourcefork.getpicture(1001) // Lighter buttons
PictureUpDk = app.resourcefork.getpicture(1002) // Darker buttons
PictureDown = app.resourcefork.getpicture(1003)

if gDarkerButts = true then
theEqPicture = PictureUpDk
elseif gDarkerButts = false then
theEqPicture = PictureUp
end if

w= 28 // Width of the image
h = 38 // Height of the image

me.backdrop=newPicture(w,h,16)
me.backdrop.graphics.drawpicture theEqPicture,0,0

me.backdrop.graphics.forecolor = RGB(0,0,0)
me.backdrop.graphics.textfont = theFont
me.backdrop.graphics.textsize = theTextSize
DrawButtonNumber // Method that draws the text in the button

Thanks
Mike


---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Failed assertion on loading resource image
Date: 30.05.02 21:09 (Thu, 30 May 2002 13:09:18 -0700)
From: Joseph J. Strout
At 8:24 PM +0200 5/30/02, Mike B wrote:

>Runtime failure. Failed assertion.
>Please report what caused this error........
>
>Array.cpp:68
>
>Or
>
>Stringmap.cpp:62

This will happen sometimes when an unhandled exception is raised in
an Open event of a control or window. This is fixed for 4.5;
meanwhile, the work-around is to fix whatever's causing the exception.

HTH,
- Joe