|
List Info
Thread: rev700: WinInfo crashes with ERR=255
|
|
| rev700: WinInfo crashes with ERR=255 |

|
2007-07-02 04:22:57 |
|
Hi,
unfortunately, I discovered, that WinInfo crashes with an ERR=255
whenever a control happens to get a negative size. According to
documentation the width needs to be an integer value. Integer Values
may be negative. So WinInfo shouldn't crash.
Demo:
API!=BBjAPI()
SYSGUI=UNT
OPEN (SYSGUI) "X0"
SysGui!=API!.getSysGui()
X=10, Y=10
WIDTH=400, HEIGHT=200
TITLE$="BBj Window: WinInfo crashes with ERR=255"
Window! = SysGui!.addWindow(X,Y,WIDTH,HEIGHT,TITLE$)
NWIDTH%=-100
? "Setting Width to negative Integer Value: ", NWIDTH%
Edit! = Window!.addEditBox(101,50,100,NWIDTH%,30,"")
Window!.addButton(Window!.getAvailableControlID(),200,200,NWIDTH%,30,"Button",$$)
? "Len of Wininfo is :" +
STR(len(WinInfo(SysGui,Window!.getContextID())))
CALLBACK(ON_CLOSE,APP_CLOSE,SysGui!.getContext())
PROCESS_EVENTS
APP_CLOSE:
RELEASE
RETURN
>RUN
Setting Width to negative Integer Value:
-100
!ERROR=255 (Unexpected
error)
0130 ? "Len of Wininfo is :" +
STR(len(WinInfo(SysGui,Window!.getContextID())))
READY
>From Errlog:
Exception in Interpreter #16 at Mon Jul 02 11:21:08 CEST 2007
com.basis.bbj.client.util.BBjException: Unexpected error
at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.wininfo(ResInfoFacadeHandler.java:286)
at com.basis.bbj.funcs.Wininfo.wininfo(Wininfo.java:5)
at com.basis.bbj.processor.instruction.b.e.a(e.java:300)
at com.basis.bbj.processor.instruction.u.a(u.java:1)
at com.basis.bbj.processor.instruction.d.di.A(di.java:651)
at com.basis.bbj.processor.instruction.d.di.z(di.java:280)
at com.basis.bbj.processor.instruction.d.di.run(di.java:68)
at com.basis.util.common.BasisThread.run(BasisThread.java:7)
Caused by: java.lang.NumberFormatException: Cannot set unsigned to a
signed value: -100
at
com.basis.util.common.Template$Field.setLongValue(Template.java:179)
at com.basis.util.common.Template$Field.setLong(Template.java:36)
at
com.basis.util.common.Template$Field.access$1600(Template.java:345)
at com.basis.util.common.Template.setLong(Template.java:398)
at com.basis.util.common.Template.setLong(Template.java:972)
at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.handleControlFacade(ResInfoFacadeHandler.java:350)
at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.handleFacade(ResInfoFacadeHandler.java:68)
at
com.basis.bbj.iris.facade.BBjEditBoxFacade.dispatch(BBjEditBoxFacade.java:71)
at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.handleFacade(ResInfoFacadeHandler.java:144)
at
com.basis.bbj.iris.facade.BBjTopLevelWindowFacade.dispatch(BBjTopLevelWindowFacade.java:14)
at
com.basis.bbj.iris.facade.FacadeHandler.processFacade(FacadeHandler.java:1)
at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.wininfo(ResInfoFacadeHandler.java:403)
... 7 more
Date: Mon Jul 02 11:21:08 CEST 2007
User: sk
Not Responding: 0
IP: 127.0.0.1
Connected: 02.07.2007 11:21:07
Program: M:/Basis/bbj7-test/err255_with_wininfo_negative_width.bbj
inBackground: false
Thread: #16
INFO(3,0): 16
FID(0): TWEGA
LineNumber: 130
Current Line Listing: 0130 ? "Len of Wininfo is :" +
STR(len(WinInfo(SysGui,Window!.getContextID())))
--
Sincerely,
Stephan Knobloch
KMK Software AG
Englerstraße 24, D-76275 Ettlingen
Tel: 07243/531-0
Fax: 07243/531-100
Vorstand: Stephan Knobloch
Aufsichtsratsvors.: Peter Knobloch
Amtsgericht Karlsruhe HRB 362754 (alt 2754 E)
Steuer-Nummer: 31193/31305
USt.-Identnummer: DE143598818
|
| RE: rev700: WinInfo crashes with
ERR=255 |

|
2007-07-02 08:54:36 |
|
|
Stephan,
The documentation should say that the width must be a
non-negative integer (width >=
0). We shouldn't throw the !ERROR=255 on WININFO(); we should reject
the -100 WIDTH when you create the control.
Hi,
unfortunately, I discovered, that WinInfo crashes with an
ERR=255 whenever a control happens to get a negative size. According to
documentation the width needs to be an integer value. Integer Values may be
negative. So WinInfo shouldn't crash.
Demo:
API!=BBjAPI() SYSGUI=UNT OPEN (SYSGUI)
"X0"
SysGui!=API!.getSysGui()
X=10,
Y=10 WIDTH=400, HEIGHT=200 TITLE$="BBj Window: WinInfo
crashes with ERR=255"
Window! =
SysGui!.addWindow(X,Y,WIDTH,HEIGHT,TITLE$)
NWIDTH%=-100 ?
"Setting Width to negative Integer Value: ", NWIDTH%
Edit! =
Window!.addEditBox(101,50,100,NWIDTH%,30,"") Window!.addButton(Window!.getAvailableControlID(),200,200,NWIDTH%,30,"Button",$$)
?
"Len of Wininfo is :" +
STR(len(WinInfo(SysGui,Window!.getContextID())))
CALLBACK(ON_CLOSE,APP_CLOSE,SysGui!.getContext())
PROCESS_EVENTS
APP_CLOSE: RELEASE RETURN
>RUN
Setting Width to negative Integer Value:
-100
!ERROR=255 (Unexpected
error)
0130 ? "Len of Wininfo is :" +
STR(len(WinInfo(SysGui,Window!.getContextID())))
READY
>From Errlog: Exception in Interpreter #16 at
Mon Jul 02 11:21:08 CEST 2007 com.basis.bbj.client.util.BBjException:
Unexpected error at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.wininfo(ResInfoFacadeHandler.java:286)
at com.basis.bbj.funcs.Wininfo.wininfo(Wininfo.java:5) at
com.basis.bbj.processor.instruction.b.e.a(e.java:300) at
com.basis.bbj.processor.instruction.u.a(u.java:1) at
com.basis.bbj.processor.instruction.d.di.A(di.java:651) at
com.basis.bbj.processor.instruction.d.di.z(di.java:280) at
com.basis.bbj.processor.instruction.d.di.run(di.java:68)
at com.basis.util.common.BasisThread.run(BasisThread.java:7) Caused by:
java.lang.NumberFormatException: Cannot set unsigned to a signed value:
-100 at
com.basis.util.common.Template$Field.setLongValue(Template.java:179)
at
com.basis.util.common.Template$Field.setLong(Template.java:36)
at
com.basis.util.common.Template$Field.access$1600(Template.java:345)
at
com.basis.util.common.Template.setLong(Template.java:398)
at
com.basis.util.common.Template.setLong(Template.java:972)
at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.handleControlFacade(ResInfoFacadeHandler.java:350)
at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.handleFacade(ResInfoFacadeHandler.java:68)
at
com.basis.bbj.iris.facade.BBjEditBoxFacade.dispatch(BBjEditBoxFacade.java:71)
at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.handleFacade(ResInfoFacadeHandler.java:144)
at
com.basis.bbj.iris.facade.BBjTopLevelWindowFacade.dispatch(BBjTopLevelWindowFacade.java:14)
at
com.basis.bbj.iris.facade.FacadeHandler.processFacade(FacadeHandler.java:1)
at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.wininfo(ResInfoFacadeHandler.java:403)
... 7 more Date: Mon Jul 02 11:21:08 CEST 2007 User: sk Not Responding:
0 IP: 127.0.0.1 Connected: 02.07.2007 11:21:07 Program:
M:/Basis/bbj7-test/err255_with_wininfo_negative_width.bbj inBackground:
false Thread: #16 INFO(3,0): 16 FID(0): TWEGA LineNumber:
130 Current Line Listing: 0130 ? "Len of Wininfo is :" +
STR(len(WinInfo(SysGui,Window!.getContextID())))
--
Sincerely,
Stephan Knobloch
KMK Software AG
Englerstraße 24, D-76275 Ettlingen
Tel: 07243/531-0
Fax: 07243/531-100
Vorstand: Stephan Knobloch
Aufsichtsratsvors.: Peter Knobloch
Amtsgericht Karlsruhe HRB 362754 (alt 2754 E)
Steuer-Nummer: 31193/31305
USt.-Identnummer: DE143598818
# Need help using (or leaving) this mailing list? # Email
majordomo basis.com with the command INFO BBJ-DEVELOPER in the message
body.
|
| Re: rev700: WinInfo crashes with
ERR=255 |

|
2007-07-02 09:28:51 |
|
Thanks for your answer, Jim,
The problem with resizeable windows is, that the application has no
control on the size of a window.
We see windows report a height of -7 when the user resizes them to
minimum size. We can't set a minimum size in BBj, nor can we
effectively reject this in the event handler for the resize event.
While the program passes the checks for minimum height successfully in
the resize routine, the user continues to shrink the window and when
the program reaches the wininfo it crashes.
We need that wininfo does not crash or make this error catchable by an
error handler. It is not acceptable, that resizeable windows crash our
applications. All our windows are resizeable.
Check the program below and try to minimize it to zero height:
API!=BBjAPI()
SYSGUI=UNT
OPEN (SYSGUI) "X0"
SysGui!=API!.getSysGui()
X=10, Y=10
WIDTH=400, HEIGHT=200
TITLE$="BBj Window: WinInfo crashes with ERR=255"
Window! = SysGui!.addWindow(X,Y,WIDTH,HEIGHT,TITLE$,$00000801$)
NWIDTH%=-100
rem '? "Setting Width to negative Integer Value: ", NWIDTH%
rem 'Edit! = Window!.addEditBox(101,50,100,NWIDTH%,30,"")
rem
'Window!.addButton(Window!.getAvailableControlID(),200,200,NWIDTH%,30,"Button",$$)
? "Len of Wininfo is :" +
STR(len(WinInfo(SysGui,Window!.getContextID(),err=Fehler)))
setCallback:
CALLBACK(ON_CLOSE,APP_CLOSE,SysGui!.getContext())
CALLBACK(ON_RESIZE,APP_RESIZE,SysGui!.getContext())
PROCESS_EVENTS
APP_RESIZE:
? "Len of Wininfo is :" +
STR(len(WinInfo(SysGui,Window!.getContextID(),err=Fehler)))
RETURN
APP_CLOSE:
RELEASE
RETURN
Fehler:
? "Fehler!!!!",err
? errmes(-1)
goto setCallback
Sincerely,
Stephan Knobloch
KMK Software AG
Englerstraße 24, D-76275 Ettlingen
Tel: 07243/531-0
Fax: 07243/531-100
Vorstand: Stephan Knobloch
Aufsichtsratsvors.: Peter Knobloch
Amtsgericht Karlsruhe HRB 362754 (alt 2754 E)
Steuer-Nummer: 31193/31305
USt.-Identnummer: DE143598818
Jim Douglas schrieb:
scooby" type="cite">
Stephan,
The documentation should say
that the width must be a non-negative
integer (width >= 0). We shouldn't throw the !ERROR=255 on
WININFO(); we should reject the -100 WIDTH when you create the control.
Hi,
unfortunately, I discovered, that WinInfo crashes with an ERR=255
whenever a control happens to get a negative size. According to
documentation the width needs to be an integer value. Integer Values
may be negative. So WinInfo shouldn't crash.
Demo:
API!=BBjAPI()
SYSGUI=UNT
OPEN (SYSGUI) "X0"
SysGui!=API!.getSysGui()
X=10, Y=10
WIDTH=400, HEIGHT=200
TITLE$="BBj Window: WinInfo crashes with ERR=255"
Window! = SysGui!.addWindow(X,Y,WIDTH,HEIGHT,TITLE$)
NWIDTH%=-100
? "Setting Width to negative Integer Value: ", NWIDTH%
Edit! = Window!.addEditBox(101,50,100,NWIDTH%,30,"")
Window!.addButton(Window!.getAvailableControlID(),200,200,NWIDTH%,30,"Button",$$)
? "Len of Wininfo is :" +
STR(len(WinInfo(SysGui,Window!.getContextID())))
CALLBACK(ON_CLOSE,APP_CLOSE,SysGui!.getContext())
PROCESS_EVENTS
APP_CLOSE:
RELEASE
RETURN
>RUN
Setting Width to negative Integer Value:
-100
!ERROR=255 (Unexpected
error)
0130 ? "Len of Wininfo is :" +
STR(len(WinInfo(SysGui,Window!.getContextID())))
READY
>From Errlog:
Exception in Interpreter #16 at Mon Jul 02 11:21:08 CEST 2007
com.basis.bbj.client.util.BBjException: Unexpected error
at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.wininfo(ResInfoFacadeHandler.java:286)
at com.basis.bbj.funcs.Wininfo.wininfo(Wininfo.java:5)
at com.basis.bbj.processor.instruction.b.e.a(e.java:300)
at com.basis.bbj.processor.instruction.u.a(u.java:1)
at com.basis.bbj.processor.instruction.d.di.A(di.java:651)
at com.basis.bbj.processor.instruction.d.di.z(di.java:280)
at com.basis.bbj.processor.instruction.d.di.run(di.java:68)
at com.basis.util.common.BasisThread.run(BasisThread.java:7)
Caused by: java.lang.NumberFormatException: Cannot set unsigned to a
signed value: -100
at
com.basis.util.common.Template$Field.setLongValue(Template.java:179)
at com.basis.util.common.Template$Field.setLong(Template.java:36)
at
com.basis.util.common.Template$Field.access$1600(Template.java:345)
at com.basis.util.common.Template.setLong(Template.java:398)
at com.basis.util.common.Template.setLong(Template.java:972)
at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.handleControlFacade(ResInfoFacadeHandler.java:350)
at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.handleFacade(ResInfoFacadeHandler.java:68)
at
com.basis.bbj.iris.facade.BBjEditBoxFacade.dispatch(BBjEditBoxFacade.java:71)
at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.handleFacade(ResInfoFacadeHandler.java:144)
at
com.basis.bbj.iris.facade.BBjTopLevelWindowFacade.dispatch(BBjTopLevelWindowFacade.java:14)
at
com.basis.bbj.iris.facade.FacadeHandler.processFacade(FacadeHandler.java:1)
at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.wininfo(ResInfoFacadeHandler.java:403)
... 7 more
Date: Mon Jul 02 11:21:08 CEST 2007
User: sk
Not Responding: 0
IP: 127.0.0.1
Connected: 02.07.2007 11:21:07
Program: M:/Basis/bbj7-test/err255_with_wininfo_negative_width.bbj
inBackground: false
Thread: #16
INFO(3,0): 16
FID(0): TWEGA
LineNumber: 130
Current Line Listing: 0130 ? "Len of Wininfo is :" +
STR(len(WinInfo(SysGui,Window!.getContextID())))
--
Sincerely,
Stephan Knobloch
KMK Software AG
Englerstraße 24, D-76275 Ettlingen
Tel: 07243/531-0
Fax: 07243/531-100
Vorstand: Stephan Knobloch
Aufsichtsratsvors.: Peter Knobloch
Amtsgericht Karlsruhe HRB 362754 (alt 2754 E)
Steuer-Nummer: 31193/31305
USt.-Identnummer: DE143598818
# Need help using (or leaving) this mailing list? # Email
basis.com">majordomo basis.com with the command INFO BBJ-DEVELOPER in the message
body.
|
| RE: rev700: WinInfo crashes with
ERR=255 |

|
2007-07-02 15:09:04 |
|
|
Ahh, I see -- WININFO is calculating a window client height
< 0. Thanks for the report, Stephan; this will be fixed in the next
nightly build of BBj 7.10.
Thanks for your answer, Jim,
The problem with resizeable
windows is, that the application has no control on the size of a
window.
We see windows report a height of -7 when the user resizes them
to minimum size. We can't set a minimum size in BBj, nor can we effectively
reject this in the event handler for the resize event. While the program passes
the checks for minimum height successfully in the resize routine, the user
continues to shrink the window and when the program reaches the wininfo it
crashes.
We need that wininfo does not crash or make this error catchable
by an error handler. It is not acceptable, that resizeable windows crash our
applications. All our windows are resizeable.
Check the program below and
try to minimize it to zero
height:
API!=BBjAPI() SYSGUI=UNT OPEN (SYSGUI)
"X0"
SysGui!=API!.getSysGui()
X=10, Y=10 WIDTH=400,
HEIGHT=200 TITLE$="BBj Window: WinInfo crashes with ERR=255"
Window! =
SysGui!.addWindow(X,Y,WIDTH,HEIGHT,TITLE$,$00000801$)
NWIDTH%=-100 rem
'? "Setting Width to negative Integer Value: ", NWIDTH%
rem 'Edit! =
Window!.addEditBox(101,50,100,NWIDTH%,30,"") rem
'Window!.addButton(Window!.getAvailableControlID(),200,200,NWIDTH%,30,"Button",$$)
?
"Len of Wininfo is :" +
STR(len(WinInfo(SysGui,Window!.getContextID(),err=Fehler)))
setCallback: CALLBACK(ON_CLOSE,APP_CLOSE,SysGui!.getContext()) CALLBACK(ON_RESIZE,APP_RESIZE,SysGui!.getContext())
PROCESS_EVENTS
APP_RESIZE: ?
"Len of Wininfo is :" +
STR(len(WinInfo(SysGui,Window!.getContextID(),err=Fehler))) RETURN
APP_CLOSE: RELEASE RETURN
Fehler: ? "Fehler!!!!",err ?
errmes(-1)
goto setCallback
Sincerely,
Stephan Knobloch
KMK Software AG
Englerstraße 24, D-76275 Ettlingen
Tel: 07243/531-0
Fax: 07243/531-100
Vorstand: Stephan Knobloch
Aufsichtsratsvors.: Peter Knobloch
Amtsgericht Karlsruhe HRB 362754 (alt 2754 E)
Steuer-Nummer: 31193/31305
USt.-Identnummer: DE143598818
Jim Douglas schrieb:
scooby
type="cite">
Stephan,
The documentation should say that the width must be a
non-negative integer (width >=
0). We shouldn't throw the !ERROR=255 on WININFO(); we should
reject the -100 WIDTH when you create the control.
Hi,
unfortunately, I discovered, that
WinInfo crashes with an ERR=255 whenever a control happens to get a negative
size. According to documentation the width needs to be an integer value.
Integer Values may be negative. So WinInfo shouldn't crash.
Demo:
API!=BBjAPI() SYSGUI=UNT OPEN
(SYSGUI) "X0"
SysGui!=API!.getSysGui()
X=10,
Y=10 WIDTH=400, HEIGHT=200 TITLE$="BBj Window:
WinInfo crashes with ERR=255"
Window! =
SysGui!.addWindow(X,Y,WIDTH,HEIGHT,TITLE$)
NWIDTH%=-100 ?
"Setting Width to negative Integer Value: ", NWIDTH%
Edit! =
Window!.addEditBox(101,50,100,NWIDTH%,30,"") Window!.addButton(Window!.getAvailableControlID(),200,200,NWIDTH%,30,"Button",$$)
?
"Len of Wininfo is :" +
STR(len(WinInfo(SysGui,Window!.getContextID())))
CALLBACK(ON_CLOSE,APP_CLOSE,SysGui!.getContext())
PROCESS_EVENTS
APP_CLOSE: RELEASE RETURN
>RUN
Setting Width to negative Integer Value:
-100
!ERROR=255 (Unexpected
error)
0130 ? "Len of Wininfo is :" +
STR(len(WinInfo(SysGui,Window!.getContextID())))
READY
>From Errlog: Exception in Interpreter #16
at Mon Jul 02 11:21:08 CEST 2007 com.basis.bbj.client.util.BBjException:
Unexpected error at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.wininfo(ResInfoFacadeHandler.java:286)
at com.basis.bbj.funcs.Wininfo.wininfo(Wininfo.java:5)
at com.basis.bbj.processor.instruction.b.e.a(e.java:300)
at com.basis.bbj.processor.instruction.u.a(u.java:1) at
com.basis.bbj.processor.instruction.d.di.A(di.java:651)
at
com.basis.bbj.processor.instruction.d.di.z(di.java:280)
at
com.basis.bbj.processor.instruction.d.di.run(di.java:68)
at com.basis.util.common.BasisThread.run(BasisThread.java:7) Caused by:
java.lang.NumberFormatException: Cannot set unsigned to a signed value:
-100 at
com.basis.util.common.Template$Field.setLongValue(Template.java:179)
at
com.basis.util.common.Template$Field.setLong(Template.java:36)
at
com.basis.util.common.Template$Field.access$1600(Template.java:345)
at
com.basis.util.common.Template.setLong(Template.java:398)
at
com.basis.util.common.Template.setLong(Template.java:972)
at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.handleControlFacade(ResInfoFacadeHandler.java:350)
at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.handleFacade(ResInfoFacadeHandler.java:68)
at
com.basis.bbj.iris.facade.BBjEditBoxFacade.dispatch(BBjEditBoxFacade.java:71)
at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.handleFacade(ResInfoFacadeHandler.java:144)
at
com.basis.bbj.iris.facade.BBjTopLevelWindowFacade.dispatch(BBjTopLevelWindowFacade.java:14)
at
com.basis.bbj.iris.facade.FacadeHandler.processFacade(FacadeHandler.java:1)
at
com.basis.bbj.iris.resource.ResInfoFacadeHandler.wininfo(ResInfoFacadeHandler.java:403)
... 7 more Date: Mon Jul 02 11:21:08 CEST 2007 User: sk Not
Responding: 0 IP: 127.0.0.1 Connected: 02.07.2007 11:21:07 Program:
M:/Basis/bbj7-test/err255_with_wininfo_negative_width.bbj inBackground:
false Thread: #16 INFO(3,0): 16 FID(0): TWEGA LineNumber:
130 Current Line Listing: 0130 ? "Len of Wininfo is :" +
STR(len(WinInfo(SysGui,Window!.getContextID())))
--
Sincerely,
Stephan Knobloch
KMK Software AG
Englerstraße 24, D-76275 Ettlingen
Tel: 07243/531-0
Fax: 07243/531-100
Vorstand: Stephan Knobloch
Aufsichtsratsvors.: Peter Knobloch
Amtsgericht Karlsruhe HRB 362754 (alt 2754 E)
Steuer-Nummer: 31193/31305
USt.-Identnummer: DE143598818
|
[1-4]
|
|