線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1619
推到 Plurk!
推到 Facebook!

Access Violation about IDAPI32.DLL

尚未結案
marker
一般會員


發表:9
回覆:5
積分:2
註冊:2004-11-05

發送簡訊給我
#1 引用回覆 回覆 發表時間:2005-05-09 16:46:04 IP:210.177.xxx.xxx 未訂閱
Hi all, I have an application which have an main form (inherit from TForm) A, another form B (also inherit from TForm) where B contains a dataform C (also inherit from TForm). B will be exist during the program life cycle where C will be created and destroyed when different function is loaded. I have encounter a bug when I open and close from C rapidly without any operation. The error look like "Access violation at address 4BDExxxx in module 'IDAPI32.DLL'. Read of address xxxxxxxx." Is anyone met this error before? How to fix it? Thanks for any help. Mark Leung
scotthsiao
高階會員


發表:13
回覆:324
積分:147
註冊:2005-02-01

發送簡訊給我
#2 引用回覆 回覆 發表時間:2005-05-09 21:35:55 IP:61.230.xxx.xxx 未訂閱
Maybe some data connection exist when you destory form c . Why not keep datamodule form alive ? Close the datamodule when the application had close.
marker
一般會員


發表:9
回覆:5
積分:2
註冊:2004-11-05

發送簡訊給我
#3 引用回覆 回覆 發表時間:2005-05-10 15:47:01 IP:210.177.xxx.xxx 未訂閱
scotthsiao, I know what is your meaning, but form C is actually a place holder for different function. It will lead to memory leakage if I keep them all. I just found that the ordering of the construction of form C may help to fix the error (I hope). And the ordering sequence is as follows in 2 versions (Ver.A is older version). Ver A: 1. create form C 2. disable controls 3. get data from DB 4. enable controls 5. merge form C into form B 6. ShowModal B Ver B: 1. create form C 2. merge form C into form B 3. disable controls 4. get data from DB 5. enable controls 6. ShowModal B Dooes anyone know why Ver B help? Mark Leung
scotthsiao
高階會員


發表:13
回覆:324
積分:147
註冊:2005-02-01

發送簡訊給我
#4 引用回覆 回覆 發表時間:2005-05-10 16:59:30 IP:210.66.xxx.xxx 未訂閱
Sorry, I can not understand what difference from ver A and B. If you do want to fix the problem, just put a datamodule form individual. Place all the data component in the form. Other forms can use the datamodule to open or close the query or table.
系統時間:2024-06-16 10:41:55
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!