comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: fatal error : double free or corruption (!prev)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: fatal error : double free or corruption (!prev) [message #79092 is a reply to message #79091] Thu, 26 January 2012 10:52 Go to previous message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Hey guys,

I found the problem. The problem occurs when I have 2 IDLgrModels
referencing the same object using the keyword ALIAS. If I change the
viewport of the view that contains the models, the clipboard cannot
save the content of the window. It is a little bit complicated to
explain but you can follow my example below.

Am I missing something here or this is a BUG ?

Thank you,
nata

PS I am under Linux. And I can reproduce the problem under IDL 7,
7.1.1 and 8.1

PRO CRASH_IDL, file

file = FILEPATH('IDLPoweredBy.jpg', $
SUBDIRECTORY = ['examples', 'mjpeg2000'])

image=READ_IMAGE(file)
sz=SIZE(image,/DIM)

base=WIDGET_BASE(/COLUMN,TITLE=title, TLB_FRAME_ATTR=15)

draw=WIDGET_DRAW(base,XSIZE=sz[1],YSIZE=sz[2],GRAPHICS_LEVEL =2,RETAIN=0,RENDERER=1)


oview=OBJ_NEW('IDLgrView',VIEWPLANE_RECT=[0,0,sz[1],sz[2]],L OCATION=[0,0],DIMENSIONS=[sz[1],sz[2]])
omodel1=OBJ_NEW('IDLgrModel')
omodel2=OBJ_NEW('IDLgrModel')
oview->Add, omodel1
oview->Add, omodel2


oimage=OBJ_NEW('IDLgrImage',DIMENSIONS=[sz[1],sz[2]],LOCATIO N=[0,0],DATA=image)
omodel1->Add, oimage, /ALIAS
omodel2->Add, oimage, /ALIAS

WIDGET_CONTROL, base, /REALIZE

WIDGET_CONTROL, draw, GET_VALUE=owind
owind->SetProperty, QUALITY=2
owind->Draw, oview

oclipboard=OBJ_NEW('IDLgrClipboard',DIMENSIONS=[sz[1],sz[2]] )
oclipboard->Draw, oview, /POSTSCRIPT, /VECTOR, FILENAME='./test1.ps'


;; Change view viewport
viewplane=[sz[1]/4.,sz[2]/6,sz[1]*2/3.,sz[2]*2/3.]
oview->SetProperty, VIEWPLANE_RECT=viewplane

PRINT, viewplane

owind->Draw, oview
WAIT, 2
oclipboard->Draw, oview, /POSTSCRIPT, /VECTOR, FILENAME='./test2.ps'

OBJ_DESTROY, [oclipboard,owind,omodel1,omodel2,oimage,oview]
WIDGET_CONTROL, base, /DESTROY

END
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Another IDL bug ? fatal error : double free or corruption (!prev)
Next Topic: ENVI

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 13:00:11 PDT 2025

Total time taken to generate the page: 1.52077 seconds