PDA

View Full Version : Access-Violation 5 at address ... - Limited break mode



Marco
20-Apr-2020, 07:05 PM
Hi

Yes, this is not new to 20, but hopefully this is an easy fix now.

Add a view with this code to a windows project, like order entry:



Use Windows.pkg
Use DFClient.pkg

Deferred_View Activate_oTestView for ;
Object oTestView is a dbView


Set Border_Style to Border_Thick
Set Size to 200 300
Set Location to 2 2
Set Label to "TestView"


Object oComboForm1 is a ComboForm
Set Size to 12 100
Set Location to 13 23
End_Object


Cd_End_Object


Compile, run, open the view, close the view, close the application, boom...

Basically It appears to be a lost focus problem when the first object is a ComboForm.

Would be good to get this fixed... as how do you explain a new developer to not have a combo as the first object otherwise black magic will get you...

Cheers
Marco

Frank Cheng
20-Apr-2020, 07:49 PM
I just added your test view in the order entry example for 16.1, 19.1, 20.0 alpha 1. I did exactly what you described, open app, open view, close view, close app. No crash.
A full blown reproducible sample would be nice.



Use DfAllEnt
Object oMain is a Panel
Object oClient is a ClientArea
Deferred_View Activate_oTestView for ;
Object oTestView is a dbView
Set Border_Style to Border_Thick
Set Size to 200 300
Object oComboForm1 is a ComboForm
Set Size to 12 100
Set Location to 13 23
End_Object // oComboForm1
Cd_End_Object // oTestView
End_Object // oClient
On_Key Key_Ctrl+Key_1 Send Activate_oTestView of oClient
End_Object // oMain
Start_UI


Frank Cheng

Marco
21-Apr-2020, 12:06 AM
Thanks Frank

It happened on this machine on 19.1 and 20a1. And I’ve seen it before.
Will try on another machine and see what’s different.

Cheers
Marco

Vincent Oorsprong
21-Apr-2020, 01:43 AM
Marco,

The system gets stuck when you have a component with controls but none of them wants to accept the focus.

I don't see this in your code but replace the comboform with a textbox and it will happen.

When I reported this a long time ago the developers at that time said it was not possible to do anything against this. I simply had to avoid the situation.

Mike Cooper
21-Apr-2020, 01:43 AM
Hi Marco.

I tried it in 19.0 and 20.0a and no problems here.

Mike Cooper
21-Apr-2020, 01:45 AM
In fairness, in my test, my view had other objects, so what Vincent says makes sense.

Harm Wibier
21-Apr-2020, 03:07 AM
I can reproduce it with a textbox like Vincent reports and will fix that, but I can't reproduce the access violation reported by Marco.

Frank Cheng
21-Apr-2020, 08:03 AM
If you are talking about this, it's really old news. Lol

http://www.frankcheng.com/view_focusable.htm

Frank Cheng

Marco
21-Apr-2020, 07:23 PM
Still happening, here is the full message in case this is useful:
13652
But the call stack is blank:
13653

The lines
Set Auto_Top_Item_State to False
Set Auto_top_View_State to True
do NOT make a difference

Systeminfo


Host Name: xxx
OS Name: Microsoft Windows Server 2016 Datacenter
OS Version: 10.0.14393 N/A Build 14393
OS Manufacturer: Microsoft Corporation
OS Configuration: Member Server
OS Build Type: Multiprocessor Free
Registered Owner: Windows User
Registered Organization:
Product ID: 00376-xxxxx-xxxxx-AA139
Original Install Date: 9/05/2018, 12:34:30 AM
System Boot Time: 21/04/2020, 3:18:15 AM
System Manufacturer: VMware, Inc.
System Model: VMware Virtual Platform
System Type: x64-based PC
Processor(s): 2 Processor(s) Installed.
[01]: Intel64 Family 6 Model 63 Stepping 0 GenuineIntel ~2400 Mhz
[02]: Intel64 Family 6 Model 63 Stepping 0 GenuineIntel ~2400 Mhz
BIOS Version: Phoenix Technologies LTD 6.00, 3/07/2018
Windows Directory: C:\Windows
System Directory: C:\Windows\system32
Boot Device: \Device\HarddiskVolume1
System Locale: en-au;English (Australia)
Input Locale: en-us;English (United States)
Time Zone: (UTC+09:30) Adelaide
Total Physical Memory: 8,191 MB
Available Physical Memory: 565 MB
Virtual Memory: Max Size: 16,383 MB
Virtual Memory: Available: 7,417 MB
Virtual Memory: In Use: 8,966 MB
Page File Location(s): C:\pagefile.sys
Domain: xxx.local
Logon Server: \\xxxxx
Hotfix(s): 16 Hotfix(s) Installed.
[01]: KB3199986
[02]: KB4093137
[03]: KB4132216
[04]: KB4465659
[05]: KB4485447
[06]: KB4494175
[07]: KB4498947
[08]: KB4503537
[09]: KB4509091
[10]: KB4512574
[11]: KB4520724
[12]: KB4521858
[13]: KB4524244
[14]: KB4540723
[15]: KB4550994
[16]: KB4550929
Network Card(s): 1 NIC(s) Installed.
[01]: vmxnet3 Ethernet Adapter
Connection Name: Ethernet0
DHCP Enabled: No
IP address(es)
[01]: 172.30.0.73
Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed.



Hope this is helpful.

wila
22-Apr-2020, 04:43 AM
Marco,

Your app is trying to access data from a null pointer that's crashing your app.
Are you sure it is not a problem in the app where you are adding the view?
Is it the official order entry workspace, or did you play with other things in that workspace earlier on?

Basically have the same config here.
VMware VM, Windows Server 2016, 2 cores, DF2020 (TP2)

Added your view to the Order Entry, compiled 64 bit, ran the app, opened the view, closed the view, closed the app.
No problems to be seen.
(FWIW already tested in on 19.1 using Frank's code example and no problem there either)
--
Wil

Marco
22-Apr-2020, 05:14 AM
Stock order entry in 20a1

After seeing the problem again in 19.1 complex workspace on the same (virtual) machine.

wila
22-Apr-2020, 06:50 AM
Marco,


Stock order entry in 20a1

After seeing the problem again in 19.1 complex workspace on the same (virtual) machine.

OK, I just upgraded to 20a1 and still cannot reproduce it, so something is different.. the question is what.
Is there an antivirus product installed in the VM?

One thing I would try in your case is to try and run a trace while shutting down.
That might give a better idea on where it is happening as there's no stack trace in your limited break mode.
--
Wil

Marco
22-Apr-2020, 07:30 AM
Hi Wil

Thanks for your interest in this. Different machine all is fine.
Trace from all good, to close new view, close app is attached zipped up.
13654

ps Dennis, trc and txt files can only be 488.3Kb on the forum... that seems too low?!?

Hope that is helpful

Cheers
Marco

wila
22-Apr-2020, 08:17 AM
Marco,

The last five lines in the trace are:



msg_destroy_object -> oobject(1018) at [93238]
..msg_delete_data -> oobject(1018) at [runtime]
msg_destroy_object -> oobject(1019) at [93238]
..msg_delete_data -> oobject(1019) at [runtime]
msg_destroy_object -> desktop(2) at [93238]


Is that destroy_object at desktop already executed when you are getting the crash?

--
Wil

Dennis Piccioni
22-Apr-2020, 08:47 AM
Try it now Marco, I increased the allowed size.

Marco
22-Apr-2020, 10:36 AM
Hi Wil

Yes this save is immediately after the error and when in the limited debugger.

And thanks Dennis!

wila
22-Apr-2020, 10:58 AM
Hi Wil

Yes this save is immediately after the error and when in the limited debugger.

Smells like it is in the runtime somehow, as you can't debug that and as nobody, but you, can reproduce this, you'll have to find another way for clues.

Looks like the last item you can put a breakpoint before the crash is in method "Kill_All_Timers" in package Dftimer.pkg

Then try and step from there. Does it still crash?
Good (well ... for being able to reproduce and troubleshoot it is)

I was about to suggest trying something with dfSplat, but it does not have DF20 support so far.
You mentioned it also happens with DF19.x and you can use dfSplat there.

In dfSplat I would take a look at the object panel just before it crashes to see if all objects, but the desktop one, are indeed already destroyed.

edit: Probably not your problem, but just in case. You don't have a expression open in the watch window when this happens?
--
Wil