How do you use datapad defined controls in groups on a window?

Tags: #<Tag:0x00007f2256b29c90>

So got some controls, byte fields using check boxes (true=1, false= 0) inside a group defined using the data pad.

Problem is, the controls when added to the window cause the window to crash at runtime and kill the app without throwing any error messages.

Track the problem down to ThisWindow.Init SELF.Open(Window) in the debugger and it throws up an error message, which using a Bing powered search engine gives links to the oleauto.dll.

So looking in OLEAuto.h Oleauto.h header - Win32 apps | Microsoft Docs I cant see any obvious reason why these check boxes would be needing the OLEauto.dll, especially as they work when defined as a stand alone byte field using a check box in the datapad.

Obviously not used NationalSecurityAgency/Ghidra · GitHub yet to reverse engineer this problem.

All these USE variable variations in the window designer Properties pad cause the app to crash and disappear without throwing any errors. I also get no compiler errors when using the below in the USE variable in the property pad.



Anyone else see this, is it a bug thats gone in later versions of C11, or is it just my machine?

Edit. I should add these are just local defined check boxes in a single procedure in a module. Not tried the above from a dct file/table.

One byte field was a Bstring, now it works.

So in-secure these computers!


Whats also interesting is you dont get the runtime windows popping up presenting you with the 4 buttons to handle the exception, like close the app, close the thread etc etc, its just kills the app without any warning what so ever so you get forced into the debugger whether you like it or not.

Posting your Code (in this case Data Declarations and Window Controls) is likely to allow helping you more than a long description. Often reviewing the code you’ll see the problem yourself.

Format Code using the </> button to make it in a fixed font so easily readable and identifiable as code, as I did in Quoting your post above.

Fairs points, but would you expect a Bstring using a Check box to crash the app and disappear without any warning?

I know the help docs say

BSTRINGs were designed for use in API functions; they are not suitable for usage as USE variables.

but even so, I wouldnt have expected a crash and app disappearance like that.

Anyway, more digging,

Loc:TestBstring BSTRING
Window Window
CHECK(‘Loc : Test Bstring:’),AT(31,426),USE(Loc:TestBstring),VALUE(‘1’,‘0’)

No code to reference the control.
Tried every control going:

No crash and app disappearance.

Added the 1 to True and 0 to False in the validity checks.

No crash and app disappearance.

Added the variable to group. Repeat above

No crash and app disappearance.

So far, only changing this byte variable in a group causes the crash and app to disappear.

This is what causes a crash and disappear.

Loc:SidNameUse       GROUP,PRE(SNU)                        ! 
SidTypeUser          BSTRING                               ! 
SidTypeGroup         BYTE                                  ! 
SidTypeDomain        BYTE                                  ! 
SidTypeAlias         BYTE                                  ! 
SidTypeWellKnownGroup BYTE                                 ! 
SidTypeDeletedAccount BYTE                                 ! 
SidTypeInvalid       BYTE                                  ! 
SidTypeUnknown       BYTE                                  ! 
SidTypeComputer      BYTE                                  ! 
SidTypeLabel         BYTE                                  ! 
SidTypeLogonSession  BYTE                                  ! 

GROUP('Sid Type (Use)'),AT(357,234,318,83),USE(?grpSidTypeUse),BOXED
                             CHECK('Sid Type User (1):'),AT(373,246),USE(SNU:SidTypeUser),VALUE('1','0')
                             CHECK('Sid Type Group (2):'),AT(373,257),USE(SNU:SidTypeGroup),VALUE('1','0')
                             CHECK('Sid Type Domain (3):'),AT(373,268),USE(SNU:SidTypeDomain),VALUE('1','0')
                             CHECK('Sid Type Alias (4):'),AT(373,279),USE(SNU:SidTypeAlias),VALUE('1','0')
                             CHECK('Sid Type Well Known Group (5):'),AT(373,291),USE(SNU:SidTypeWellKnownGroup,,?SNU:SidTypeWellKnownGroup:2), |
                             CHECK('Sid Type Deleted Account (6):'),AT(521,246),USE(SNU:SidTypeDeletedAccount),VALUE('1', |
                             CHECK('Sid Type Invalid (7):'),AT(521,257),USE(SNU:SidTypeInvalid),VALUE('1','0')
                             CHECK('Sid Type Unknown (8):'),AT(521,268),USE(SNU:SidTypeUnknown),VALUE('1','0')
                             CHECK('Sid Type Computer (9):'),AT(521,279),USE(SNU:SidTypeComputer),VALUE('1','0')
                             CHECK('Sid Type Label (10):'),AT(521,291),USE(SNU:SidTypeLabel),VALUE('1','0')
                             CHECK('Sid Type Logon Session (11):'),AT(521,302),USE(SNU:SidTypeLogonSession),VALUE('1','0')

The only code that refers to the variable and thus control.

IF Loc:UseSidType = 1; SNU:SidTypeUser = 1 Else SNU:SidTypeUser = 0; End

A few minutes ago whilst writing this out, the bstring check box would not even go into the window groupbox, it would go before or after the group box but not in it. But after a procedure exit, CTRL+R and then back into the procedure for a second attempt, it will go into the window group box as a bstring checkbox.

This is the only instance where I can reproduce this local group bstring in window group box as a checkbox crashing the app and it disappearing!

Is that esoteric?

Edit. There just under a 1000 lines of declarations in this one procedure, vars, equates, and the window with a control for nearly every variable. It is a little more complicated than a simple proc, not that it should matter, but you can see what I’ve already tried above to isolate this weirdo of a bug!

So one of the other things I’ve noticed with the window designer is if I drag a var from the datapad onto the screen, I have to save & exit the procedure and then go back into it before I can see the control in the tab order.

Some controls dont like going onto specific tabs either which is why I have to go into the tab order pad to relocate them properly., this is how I found this problem.

And the tab order pad sometimes will show a horizontal scroll bar and other times it doesnt.
Intermittent and havent worked out the steps that cause it to not appear.

And for some reason, controls sometimes appear as ?somecontrol:2 in the screen, as you can see in the code in the previous post.

I havent tracked down why thats happening yet in order to avoid the steps that cause it, but its a nuisance.

Its almost like and I dont think this is related specifically to clarion, but its almost like certains chunks of code get paused or fail to be called, maybe some window messages or events are not being fired?

Now I dont know if MS are messing around with some AI in their Windows Defender stuff, but like I say, its like events, Windows Messages or chunks of code are just not being called in some weird instances and there is only a few logical explanations for that to happen.