Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #9584 > unrolled thread

Strange crash in a screen Init

Started byMartin <Martin@spam.spam>
First post2016-08-08 17:24 +0100
Last post2016-08-09 12:06 +0100
Articles 9 — 5 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Strange crash in a screen Init Martin <Martin@spam.spam> - 2016-08-08 17:24 +0100
    Re: Strange crash in a screen Init D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2016-08-08 23:10 +0200
      Re: Strange crash in a screen Init Martin <Martin@spam.spam> - 2016-08-08 23:46 +0100
      Re: Strange crash in a screen Init Martin <Martin@spam.spam> - 2016-08-09 09:04 +0100
        Re: Strange crash in a screen Init Robert van der Hulst <rjvanderhulst@gmail.com> - 2016-08-09 02:08 -0700
          Re: Strange crash in a screen Init "Jamal" <noooospam@example.com> - 2016-08-11 00:35 -0400
            Re: Strange crash in a screen Init Martin <Martin@spam.spam> - 2016-08-11 14:48 +0100
    Re: Strange crash in a screen Init "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-08-09 08:00 +0200
      Re: Strange crash in a screen Init Martin <Martin@spam.spam> - 2016-08-09 12:06 +0100

#9584 — Strange crash in a screen Init

FromMartin <Martin@spam.spam>
Date2016-08-08 17:24 +0100
SubjectStrange crash in a screen Init
Message-ID<noabne$c41$2@dont-email.me>
I added a couple of browses to a screen and new it is crashing on Init()

Anyone have any ideas please?

Error Detail
Arg:             #PUSHBUTTON:
ArgNum:          0
ArgType:         OBJECT
ArgTypeReq:      NIL
CallFuncSym:
CanDefault:      .T.
CanRetry:        .F.
CanSubstitute:   .F.
Description:     Control creation failed
FileHandle:      0
FileName:
FuncPtr:         0x00000000
FuncSym:         CONTROL:CREATE
GenCode:         0 : Waiting...
MaxSize:         0
MethodSelf:      {(0x0000)0x00000000} CLASS
Operation:
OsCode:          0 : Successful completion
SubCode:         0
SubCodeText:
SubstituteType:  NIL
SubSystem:       GUI Classes
Tries:           1


ACTIVATION:               12
CLASSCOUNT:               3073
COLLECT:                  0
COLLECTCOUNT:             10
CS:                       0
CS_SIZE:                  0
DB_DS:                    0
DB_DS_SIZE:               0
DS:                       0
DS_SIZE:                  0
DYNINFOFREE:              128266936
DYNINFOMAX:               134217728
DYNINFOSIZE:              512
DYNINFOUSED:              5950972
FUNCTIONCOUNT:            677
GLOBALSEL:                0
MAXATOM:                  48704
MEMTOTAL:                 36227267
PRIVAT:                   0
PUBLIC:                   0
REGCOLLNOTIFYEND_COUNT:   0
REGCOLLNOTIFYSTART_COUNT: 0
REGISTERAXIT:             2519
REGISTEREXIT_COUNT:       5
REGISTERKID:              1043
RT_DGROUP:                0
RT_DS:                    0
SEQUENCE:                 0
SP:                       1631776
SS:                       0
STACK_FREE:               1009172
STACK_SIZE:               1015808
STACKKID:                 40
SYSTEM_FREE:              4293058560
SYSTEM_MAX:               929968128
WINDOWS_SYSTEMRESOURCES:  84
WINDOWS_GDIRESOURCES:     0
WINDOWS_SYSTEMRESOURCES:  0


Thanks

Martin

[toc] | [next] | [standalone]


#9585

FromD.J.W. van Kooten <vankooten@removethis.ic2.com>
Date2016-08-08 23:10 +0200
Message-ID<71thqbdfpprbtj21vlou9rojbdnmhup53m@4ax.com>
In reply to#9584
Replying on message of Mon, 8 Aug 2016 17:24:18 +0100 from Martin:


 Hello Martin,

>I added a couple of browses to a screen and new it is crashing on Init()
>
>Anyone have any ideas please?


I haven't seen that one for years. Actually I mentioned having that
problem in a disucssion in this NG about that problem - in 2008. So I
assumed it was gone with newer Windows versions. Do you have this
problem on an old Windows by any chance?

Below is what I found, maybe one of these helps you?

Dick
===============

Karl Wochele wrote on 6-10-2008:

there is a limit of 10000 GUI-Objects in Windows. Above this limit
your 
app will crash. You can check the amount of objects with

nObjects := GetGuiResources(GetCurrentProcess(),GR_GDIOBJECTS))

_DLL FUNC GetGuiResources(hProcess AS PTR,uiFlags AS DWORD) AS DWORD 
PASCAL:USER32.GetGuiResources
DEFINE GR_GDIOBJECTS	:= 0
DEFINE GR_USEROBJECTS	:= 1

If this number is growing, you have a leak somewhere in your code,
such 
as icons, bitmaps or device contexts which are not released.

(and the suspect was the RTF control).

On 31-3-2003, Don Carslaw  wrote:

The only reliable workround I could come up with was to error-wrap the
dialog Init() and catch the error.
// this is just parts of the code
oOldErrorHandler := ErrorBlock({|o| _Break(o)})
BEGIN SEQUENCE
	// there is sometimes the following error here:
	// "Description     :Dialog creation from resource failed"
	oDlg := MainTabDialog{SELF}
RECOVER USING oError
	IF oError:Description = "Dialog creation from resource failed"
//
non-exact !!!
		cMsg := oError:description + CRLF + ;
		"Your workstation may be low on resources." + CRLF + ;
		"Please try again after closing some applications." +
CRLF + ;
		"Please contact support if problem persists." + CRLF +
CRLF + ;
		"This application will now shut down" + CRLF
	ENDIF
// Then display cMsg and bail out!
END SEQUENCE

--- news://freenews.netfront.net/ - complaints: news@netfront.net ---

[toc] | [prev] | [next] | [standalone]


#9586

FromMartin <Martin@spam.spam>
Date2016-08-08 23:46 +0100
Message-ID<nob24e$v06$1@dont-email.me>
In reply to#9585
Latest decent version of Windows

7 64 bit

On 08/08/2016 22:10, D.J.W. van Kooten wrote:
> Replying on message of Mon, 8 Aug 2016 17:24:18 +0100 from Martin:
>
>
>  Hello Martin,
>
>> I added a couple of browses to a screen and new it is crashing on Init()
>>
>> Anyone have any ideas please?
>
>
> I haven't seen that one for years. Actually I mentioned having that
> problem in a disucssion in this NG about that problem - in 2008. So I
> assumed it was gone with newer Windows versions. Do you have this
> problem on an old Windows by any chance?
>
> Below is what I found, maybe one of these helps you?
>
> Dick
> ===============
>
> Karl Wochele wrote on 6-10-2008:
>
> there is a limit of 10000 GUI-Objects in Windows. Above this limit
> your
> app will crash. You can check the amount of objects with
>
> nObjects := GetGuiResources(GetCurrentProcess(),GR_GDIOBJECTS))
>
> _DLL FUNC GetGuiResources(hProcess AS PTR,uiFlags AS DWORD) AS DWORD
> PASCAL:USER32.GetGuiResources
> DEFINE GR_GDIOBJECTS	:= 0
> DEFINE GR_USEROBJECTS	:= 1
>
> If this number is growing, you have a leak somewhere in your code,
> such
> as icons, bitmaps or device contexts which are not released.
>
> (and the suspect was the RTF control).
>
> On 31-3-2003, Don Carslaw  wrote:
>
> The only reliable workround I could come up with was to error-wrap the
> dialog Init() and catch the error.
> // this is just parts of the code
> oOldErrorHandler := ErrorBlock({|o| _Break(o)})
> BEGIN SEQUENCE
> 	// there is sometimes the following error here:
> 	// "Description     :Dialog creation from resource failed"
> 	oDlg := MainTabDialog{SELF}
> RECOVER USING oError
> 	IF oError:Description = "Dialog creation from resource failed"
> //
> non-exact !!!
> 		cMsg := oError:description + CRLF + ;
> 		"Your workstation may be low on resources." + CRLF + ;
> 		"Please try again after closing some applications." +
> CRLF + ;
> 		"Please contact support if problem persists." + CRLF +
> CRLF + ;
> 		"This application will now shut down" + CRLF
> 	ENDIF
> // Then display cMsg and bail out!
> END SEQUENCE
>
> --- news://freenews.netfront.net/ - complaints: news@netfront.net ---
>

[toc] | [prev] | [next] | [standalone]


#9588

FromMartin <Martin@spam.spam>
Date2016-08-09 09:04 +0100
Message-ID<noc2pb$hj1$1@dont-email.me>
In reply to#9585
I completely remodelledthe screen

Followed the old layout still

Push button names on group boxes

So created a new dialog, ctrl C V onto the new screen

sub classedback to original now OK

On 08/08/2016 22:10, D.J.W. van Kooten wrote:
> Replying on message of Mon, 8 Aug 2016 17:24:18 +0100 from Martin:
>
>
>  Hello Martin,
>
>> I added a couple of browses to a screen and new it is crashing on Init()
>>
>> Anyone have any ideas please?
>
>
> I haven't seen that one for years. Actually I mentioned having that
> problem in a disucssion in this NG about that problem - in 2008. So I
> assumed it was gone with newer Windows versions. Do you have this
> problem on an old Windows by any chance?
>
> Below is what I found, maybe one of these helps you?
>
> Dick
> ===============
>
> Karl Wochele wrote on 6-10-2008:
>
> there is a limit of 10000 GUI-Objects in Windows. Above this limit
> your
> app will crash. You can check the amount of objects with
>
> nObjects := GetGuiResources(GetCurrentProcess(),GR_GDIOBJECTS))
>
> _DLL FUNC GetGuiResources(hProcess AS PTR,uiFlags AS DWORD) AS DWORD
> PASCAL:USER32.GetGuiResources
> DEFINE GR_GDIOBJECTS	:= 0
> DEFINE GR_USEROBJECTS	:= 1
>
> If this number is growing, you have a leak somewhere in your code,
> such
> as icons, bitmaps or device contexts which are not released.
>
> (and the suspect was the RTF control).
>
> On 31-3-2003, Don Carslaw  wrote:
>
> The only reliable workround I could come up with was to error-wrap the
> dialog Init() and catch the error.
> // this is just parts of the code
> oOldErrorHandler := ErrorBlock({|o| _Break(o)})
> BEGIN SEQUENCE
> 	// there is sometimes the following error here:
> 	// "Description     :Dialog creation from resource failed"
> 	oDlg := MainTabDialog{SELF}
> RECOVER USING oError
> 	IF oError:Description = "Dialog creation from resource failed"
> //
> non-exact !!!
> 		cMsg := oError:description + CRLF + ;
> 		"Your workstation may be low on resources." + CRLF + ;
> 		"Please try again after closing some applications." +
> CRLF + ;
> 		"Please contact support if problem persists." + CRLF +
> CRLF + ;
> 		"This application will now shut down" + CRLF
> 	ENDIF
> // Then display cMsg and bail out!
> END SEQUENCE
>
> --- news://freenews.netfront.net/ - complaints: news@netfront.net ---
>

[toc] | [prev] | [next] | [standalone]


#9589

FromRobert van der Hulst <rjvanderhulst@gmail.com>
Date2016-08-09 02:08 -0700
Message-ID<d5f64b38-222a-4135-a728-669f841f70cf@googlegroups.com>
In reply to#9588
Martin,

I am glad that it works now.
However I agree with Wolfgang that it does not really help to post questions here without showing us your source code.
That is like going to the doctor but now allowing him to examine you...

Robert

> I completely remodelledthe screen
> 
> Followed the old layout still
> 
> Push button names on group boxes
> 
> So created a new dialog, ctrl C V onto the new screen
> 
> sub classedback to original now OK
> 
> On 08/08/2016 22:10, D.J.W. van Kooten wrote:
> > Replying on message of Mon, 8 Aug 2016 17:24:18 +0100 from Martin:
> >
> >
> >  Hello Martin,
> >
> >> I added a couple of browses to a screen and new it is crashing on Init()
> >>
> >> Anyone have any ideas please?
> >
> >
> > I haven't seen that one for years. Actually I mentioned having that
> > problem in a disucssion in this NG about that problem - in 2008. So I
> > assumed it was gone with newer Windows versions. Do you have this
> > problem on an old Windows by any chance?
> >
> > Below is what I found, maybe one of these helps you?
> >
> > Dick
> > ===============
> >
> > Karl Wochele wrote on 6-10-2008:
> >
> > there is a limit of 10000 GUI-Objects in Windows. Above this limit
> > your
> > app will crash. You can check the amount of objects with
> >
> > nObjects := GetGuiResources(GetCurrentProcess(),GR_GDIOBJECTS))
> >
> > _DLL FUNC GetGuiResources(hProcess AS PTR,uiFlags AS DWORD) AS DWORD
> > PASCAL:USER32.GetGuiResources
> > DEFINE GR_GDIOBJECTS	:= 0
> > DEFINE GR_USEROBJECTS	:= 1
> >
> > If this number is growing, you have a leak somewhere in your code,
> > such
> > as icons, bitmaps or device contexts which are not released.
> >
> > (and the suspect was the RTF control).
> >
> > On 31-3-2003, Don Carslaw  wrote:
> >
> > The only reliable workround I could come up with was to error-wrap the
> > dialog Init() and catch the error.
> > // this is just parts of the code
> > oOldErrorHandler := ErrorBlock({|o| _Break(o)})
> > BEGIN SEQUENCE
> > 	// there is sometimes the following error here:
> > 	// "Description     :Dialog creation from resource failed"
> > 	oDlg := MainTabDialog{SELF}
> > RECOVER USING oError
> > 	IF oError:Description = "Dialog creation from resource failed"
> > //
> > non-exact !!!
> > 		cMsg := oError:description + CRLF + ;
> > 		"Your workstation may be low on resources." + CRLF + ;
> > 		"Please try again after closing some applications." +
> > CRLF + ;
> > 		"Please contact support if problem persists." + CRLF +
> > CRLF + ;
> > 		"This application will now shut down" + CRLF
> > 	ENDIF
> > // Then display cMsg and bail out!
> > END SEQUENCE
> >
> > --- news://freenews.netfront.net/ - complaints: news@netfront.net ---
> >

[toc] | [prev] | [next] | [standalone]


#9603

From"Jamal" <noooospam@example.com>
Date2016-08-11 00:35 -0400
Message-ID<nogvae$o3e$1@news.albasani.net>
In reply to#9589
Robert,

May be he think people here are fortunetellers that can read his mind! And 
if that does not work, he'll blame the 'other' mysterious developer as in 
the 'Wrong Field Specification" thread!

Jamal

"Robert van der Hulst"  wrote in message 
news:d5f64b38-222a-4135-a728-669f841f70cf@googlegroups.com...

Martin,

I am glad that it works now.
However I agree with Wolfgang that it does not really help to post questions 
here without showing us your source code.
That is like going to the doctor but now allowing him to examine you...

Robert

> I completely remodelledthe screen
>
> Followed the old layout still
>
> Push button names on group boxes
>
> So created a new dialog, ctrl C V onto the new screen
>
> sub classedback to original now OK
>
> On 08/08/2016 22:10, D.J.W. van Kooten wrote:
> > Replying on message of Mon, 8 Aug 2016 17:24:18 +0100 from Martin:
> >
> >
> >  Hello Martin,
> >
> >> I added a couple of browses to a screen and new it is crashing on 
> >> Init()
> >>
> >> Anyone have any ideas please?
> >
> >
> > I haven't seen that one for years. Actually I mentioned having that
> > problem in a disucssion in this NG about that problem - in 2008. So I
> > assumed it was gone with newer Windows versions. Do you have this
> > problem on an old Windows by any chance?
> >
> > Below is what I found, maybe one of these helps you?
> >
> > Dick
> > ===============
> >
> > Karl Wochele wrote on 6-10-2008:
> >
> > there is a limit of 10000 GUI-Objects in Windows. Above this limit
> > your
> > app will crash. You can check the amount of objects with
> >
> > nObjects := GetGuiResources(GetCurrentProcess(),GR_GDIOBJECTS))
> >
> > _DLL FUNC GetGuiResources(hProcess AS PTR,uiFlags AS DWORD) AS DWORD
> > PASCAL:USER32.GetGuiResources
> > DEFINE GR_GDIOBJECTS := 0
> > DEFINE GR_USEROBJECTS := 1
> >
> > If this number is growing, you have a leak somewhere in your code,
> > such
> > as icons, bitmaps or device contexts which are not released.
> >
> > (and the suspect was the RTF control).
> >
> > On 31-3-2003, Don Carslaw  wrote:
> >
> > The only reliable workround I could come up with was to error-wrap the
> > dialog Init() and catch the error.
> > // this is just parts of the code
> > oOldErrorHandler := ErrorBlock({|o| _Break(o)})
> > BEGIN SEQUENCE
> > // there is sometimes the following error here:
> > // "Description     :Dialog creation from resource failed"
> > oDlg := MainTabDialog{SELF}
> > RECOVER USING oError
> > IF oError:Description = "Dialog creation from resource failed"
> > //
> > non-exact !!!
> > cMsg := oError:description + CRLF + ;
> > "Your workstation may be low on resources." + CRLF + ;
> > "Please try again after closing some applications." +
> > CRLF + ;
> > "Please contact support if problem persists." + CRLF +
> > CRLF + ;
> > "This application will now shut down" + CRLF
> > ENDIF
> > // Then display cMsg and bail out!
> > END SEQUENCE
> >
> > --- news://freenews.netfront.net/ - complaints: news@netfront.net ---
> > 

[toc] | [prev] | [next] | [standalone]


#9607

FromMartin <Martin@spam.spam>
Date2016-08-11 14:48 +0100
Message-ID<nohvn0$qem$2@dont-email.me>
In reply to#9603
I do have a minion here, he is just not yellow and small!

On 11/08/2016 05:35, Jamal wrote:
> Robert,
>
> May be he think people here are fortunetellers that can read his mind!
> And if that does not work, he'll blame the 'other' mysterious developer
> as in the 'Wrong Field Specification" thread!
>
> Jamal
>
> "Robert van der Hulst"  wrote in message
> news:d5f64b38-222a-4135-a728-669f841f70cf@googlegroups.com...
>
> Martin,
>
> I am glad that it works now.
> However I agree with Wolfgang that it does not really help to post
> questions here without showing us your source code.
> That is like going to the doctor but now allowing him to examine you...
>
> Robert
>
>> I completely remodelledthe screen
>>
>> Followed the old layout still
>>
>> Push button names on group boxes
>>
>> So created a new dialog, ctrl C V onto the new screen
>>
>> sub classedback to original now OK
>>
>> On 08/08/2016 22:10, D.J.W. van Kooten wrote:
>> > Replying on message of Mon, 8 Aug 2016 17:24:18 +0100 from Martin:
>> >
>> >
>> >  Hello Martin,
>> >
>> >> I added a couple of browses to a screen and new it is crashing on
>> >> Init()
>> >>
>> >> Anyone have any ideas please?
>> >
>> >
>> > I haven't seen that one for years. Actually I mentioned having that
>> > problem in a disucssion in this NG about that problem - in 2008. So I
>> > assumed it was gone with newer Windows versions. Do you have this
>> > problem on an old Windows by any chance?
>> >
>> > Below is what I found, maybe one of these helps you?
>> >
>> > Dick
>> > ===============
>> >
>> > Karl Wochele wrote on 6-10-2008:
>> >
>> > there is a limit of 10000 GUI-Objects in Windows. Above this limit
>> > your
>> > app will crash. You can check the amount of objects with
>> >
>> > nObjects := GetGuiResources(GetCurrentProcess(),GR_GDIOBJECTS))
>> >
>> > _DLL FUNC GetGuiResources(hProcess AS PTR,uiFlags AS DWORD) AS DWORD
>> > PASCAL:USER32.GetGuiResources
>> > DEFINE GR_GDIOBJECTS := 0
>> > DEFINE GR_USEROBJECTS := 1
>> >
>> > If this number is growing, you have a leak somewhere in your code,
>> > such
>> > as icons, bitmaps or device contexts which are not released.
>> >
>> > (and the suspect was the RTF control).
>> >
>> > On 31-3-2003, Don Carslaw  wrote:
>> >
>> > The only reliable workround I could come up with was to error-wrap the
>> > dialog Init() and catch the error.
>> > // this is just parts of the code
>> > oOldErrorHandler := ErrorBlock({|o| _Break(o)})
>> > BEGIN SEQUENCE
>> > // there is sometimes the following error here:
>> > // "Description     :Dialog creation from resource failed"
>> > oDlg := MainTabDialog{SELF}
>> > RECOVER USING oError
>> > IF oError:Description = "Dialog creation from resource failed"
>> > //
>> > non-exact !!!
>> > cMsg := oError:description + CRLF + ;
>> > "Your workstation may be low on resources." + CRLF + ;
>> > "Please try again after closing some applications." +
>> > CRLF + ;
>> > "Please contact support if problem persists." + CRLF +
>> > CRLF + ;
>> > "This application will now shut down" + CRLF
>> > ENDIF
>> > // Then display cMsg and bail out!
>> > END SEQUENCE
>> >
>> > --- news://freenews.netfront.net/ - complaints: news@netfront.net ---
>> >
>

[toc] | [prev] | [next] | [standalone]


#9587

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2016-08-09 08:00 +0200
Message-ID<e0t9rdF4q3hU1@mid.individual.net>
In reply to#9584
Hi Martin,

> I added a couple of browses to a screen and new it is crashing on
> Init()
> 
> Anyone have any ideas please?

as always, you are giving very good indications about your code (and as
always in your posts you are assuming that your code has no error, but
it is the upstream code that fails - GUI classes, RDD classes).

When I have learned something in my work, then it is that I'm the one
that fails most of the time - very rarely it is upstream code that
fails because it is much more tested than my own code.

But in this case I suspect that either you don't have a call to
super:Init() in the window class or you try to add the button before
the call to super:Init(), so you try to add a pushbutton to a
non-initialized window. If argument 0 is the error, it is the class on
which you call a method that is null_object.

But since you don't show the offending code line, we can only imaginate
where your problem lies.

Wolfgang

[toc] | [prev] | [next] | [standalone]


#9590

FromMartin <Martin@spam.spam>
Date2016-08-09 12:06 +0100
Message-ID<nocdfc$jr5$1@dont-email.me>
In reply to#9587
It would have meant posting up hundreds of lines of code, also moving 
object order changed the crash.

I rebuilt the screen from scratch.

Thanks

Martin

On 09/08/2016 07:00, Wolfgang Riedmann wrote:
> Hi Martin,
>
>> I added a couple of browses to a screen and new it is crashing on
>> Init()
>>
>> Anyone have any ideas please?
>
> as always, you are giving very good indications about your code (and as
> always in your posts you are assuming that your code has no error, but
> it is the upstream code that fails - GUI classes, RDD classes).
>
> When I have learned something in my work, then it is that I'm the one
> that fails most of the time - very rarely it is upstream code that
> fails because it is much more tested than my own code.
>
> But in this case I suspect that either you don't have a call to
> super:Init() in the window class or you try to add the button before
> the call to super:Init(), so you try to add a pushbutton to a
> non-initialized window. If argument 0 is the error, it is the class on
> which you call a method that is null_object.
>
> But since you don't show the offending code line, we can only imaginate
> where your problem lies.
>
> Wolfgang
>

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web