Delphi Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreDelphi Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 13th, 2013, 12:51 PM
nightrider43 nightrider43 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2012
Location: São Paulo - Brazil
Posts: 32 nightrider43 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 27 m 20 sec
Reputation Power: 1
Send a message via ICQ to nightrider43 Send a message via MSN to nightrider43 Send a message via Google Talk to nightrider43 Send a message via Skype to nightrider43
Error in class allocation?

Suddenly I became to receive the message:

Project xxxxx.exe raised exception class EResNotFound with message 'Resource TfrmUpt60100 not found'

I respond "break" and the execution seems to stopped in the line

With TFrmUpt60100.Create(Self) do

The declaration of the class is:

TfrmUpt60100 = Class(TForm)

It's important to note that the error appears suddenly. After thousands of executions. I suppose that "Upt60100.dfm" was corrupted in some moment.

The question is:

Is there a way to recover this file? It seems that I will need to do again all modifications since the last back up. And manually.

Some suggestion?

Delphi XE Version 15.0.3890.34076

Greetings from São Paulo - Brazil

Ricardo

Reply With Quote
  #2  
Old February 13th, 2013, 01:13 PM
majlumbo majlumbo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2008
Posts: 253 majlumbo User rank is Lance Corporal (50 - 100 Reputation Level)majlumbo User rank is Lance Corporal (50 - 100 Reputation Level)majlumbo User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 2 Days 23 h 32 m 58 sec
Reputation Power: 5
Maybe you mistakenly deleted

{$R *.dfm}

from your source code, which by default is placed right after the IMPLEMENTATION directive.

Reply With Quote
  #3  
Old February 14th, 2013, 10:32 AM
nightrider43 nightrider43 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2012
Location: São Paulo - Brazil
Posts: 32 nightrider43 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 27 m 20 sec
Reputation Power: 1
Send a message via ICQ to nightrider43 Send a message via MSN to nightrider43 Send a message via Google Talk to nightrider43 Send a message via Skype to nightrider43
Unfortunately this is not the case. See below:
.
.
idSistema: Integer;

implementation

uses UptFunc, Upt60101, UptDTM, Upt60102;

{$R *.DFM}

procedure TFrmUpt60100.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action := caFree;
FrmUpt60100 := nil;
end;
.
.
.
Thank you very much

Reply With Quote
  #4  
Old February 14th, 2013, 01:22 PM
clivew clivew is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2006
Location: Carlsbad, CA
Posts: 2,045 clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 2 h 37 m
Reputation Power: 382
I think you need to remove this:
Code:
FrmUpt60100 := nil;

You are setting the pointer to your object to nil before it has been destroyed.
Comments on this post
Luthfi disagrees: Since it is destroyed, there is no harm to "reset" references to the destroyed object.

Reply With Quote
  #5  
Old February 18th, 2013, 04:06 PM
nightrider43 nightrider43 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2012
Location: São Paulo - Brazil
Posts: 32 nightrider43 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 27 m 20 sec
Reputation Power: 1
Send a message via ICQ to nightrider43 Send a message via MSN to nightrider43 Send a message via Google Talk to nightrider43 Send a message via Skype to nightrider43
The reported error occurs in the first creation of the Form. Then, the OnClose method was not executed.

Cheers

Ricardo

Reply With Quote
  #6  
Old February 18th, 2013, 04:32 PM
clivew clivew is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2006
Location: Carlsbad, CA
Posts: 2,045 clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 2 h 37 m
Reputation Power: 382
Quote:
Originally Posted by clivew
I think you need to remove this:
Code:
FrmUpt60100 := nil;

You are setting the pointer to your object to nil before it has been destroyed.

Comments on this post
Luthfi disagrees: Since it is destroyed, there is no harm to "reset" references to the destroyed object.

Clivew believes Luthfi is wrong.
The form has not been destroyed before the formClose event has returned, so setting the form pointer to nil inside that event is unwise at the very least.

Clive

Reply With Quote
  #7  
Old February 18th, 2013, 04:41 PM
clivew clivew is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2006
Location: Carlsbad, CA
Posts: 2,045 clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 2 h 37 m
Reputation Power: 382
I just noticed that you say that you are creating the form with the Line
Code:
With TFrmUpt60100.Create(self)

In which case, where are you creating it?
To what does self refer?
Is FrmUpt60100 that you are freeing ever actually created?

Clive

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreDelphi Programming > Error in class allocation?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap