1. Julian _
  2. PowerBuilder
  3. Monday, 07 October 2019
Hello,

We have migrated our application from PB7 to PB19 (Build 2082). We have pcs in W7 and W10. 
The application seemed to be working fine, but for some weeks some users reports random
Windows errors "App.exe stopped working." This is the report on Windows Application events:

Nombre de la aplicación con errores: planning.exe, versión: 11.0.0.0, marca de tiempo: 0x5ce82bed

Nombre del módulo con errores: unknown, versión: 0.0.0.0, marca de tiempo: 0x00000000

Código de excepción: 0xc0000005

Desplazamiento de errores: 0x1daaf9e0

Id. del proceso con errores: 0x11f8

Hora de inicio de la aplicación con errores: 0x01d57ce545c8e526

Ruta de acceso de la aplicación con errores: C:\Planning\planning.exe

Ruta de acceso del módulo con errores: unknown

Id. del informe: 539791cf-e8db-11e9-8d82-4ccc6aa14b4b

 

 

- http://schemas.microsoft.com/win/2004/08/events/event">

-

 

  1000

 2

 100

 0x80000000000000

 

 75449

 Application

 xxxx

 

 

-

 planning.exe

 11.0.0.0

 5ce82bed

 unknown

 0.0.0.0

 00000000

 c0000005

 1daaf9e0

 11f8

 01d57ce545c8e526

 C:\Planning\planning.exe

 unknown

 539791cf-e8db-11e9-8d82-4ccc6aa14b4b

 

 

 

We have optimized and full build libraries, but random errors continue

Any Idea?

Thanks.

 

Julian _ Accepted Answer Pending Moderation
0
Votes
Undo
Thanks everyone for your help.
Now we have to get down to work and make the changes you suggest.

- Review "ANSI" Windows API calls
- Update PFCs
Regards.
 
Comment
Hi Julian;

Just an FYI on the PFC's. They are basically like they were back in the PB 12.0 (or even slightly older) days and have been mostly migrated forward "as is" into PB 12.6 => PB2017. Thus, you may still find lots of "ANSI" API calls, no newer alignment for W10 features and definitely no support for all the new features in PB12.6 (64 bit, Dockable Windows), PB2017Rx (lots) and PB2019 (lots). There is also no PB2019 version yet as well that I can see on the PFC website. Food for thought as you migrate.

Regards ... Chris
  1. Chris Pollach
  2. Wednesday, 9 October 2019
There are no comments made yet.
  1. Wednesday, 9 October 2019
  2. PowerBuilder
  3. # 1
Julian _ Accepted Answer Pending Moderation
0
Votes
Undo

Hi Roland,

I have look for ";Ansi" on project libraries and I have found same functions declarated with ";ANSI" (in our own libraries and in PFC libraries). Could this be the problem?

Regards.

Comment
;Ansi tells the PB runtime to convert all strings from Unicode to Ansi. The Ansi string is then passed into the function. Any by reference string arguments are converted from Ansi to Unicode. Normally this should work, it is something to check. Many times external functions abort because a by reference string argument isn't pre-allocated (using the Space function). If the pre-allocation isn't big enough to hold the result, an abort can occur.
  1. Roland Smith
  2. Tuesday, 8 October 2019
The thing with using Ansi external functions is that the PB runtime converts the string from Unicode to Ansi, then the 'A' version of the function converts the string from Ansi to Unicode and passes it to the 'W' version. Then if you have a by ref string, the 'W" version passes that to the 'A' version which converts it from Unicode to Ansi. The Ansi string is then converted to Unicode by the PB runtime. As you can see, using the Ansi version of a function causes a bunch of unnecessary work.
  1. Roland Smith
  2. Tuesday, 8 October 2019
Hi Julian;

Looks like your App is using the PFC. Did you download the latest PFC that matches your PB IDE version?

FYI: https://github.com/OpenSourcePFCLibraries

Regards ... Chris
  1. Chris Pollach
  2. Tuesday, 8 October 2019
There are no comments made yet.
  1. Tuesday, 8 October 2019
  2. PowerBuilder
  3. # 2
Roland Smith Accepted Answer Pending Moderation
1
Votes
Undo

PB7 uses ANSI (single byte) strings while PB10 and higher use Unicode (double byte) strings.

I would check for Windows API functions that might be causing it to abort.

Some functions that take a string also have a length argument. Some are character length and some are byte length so you have to review the documentation for the function to make sure it is correct. Also, make sure you are using the W version of functions instead of the A version. The conversion process adds ";ANSI" to the end of external function declarations. That won't be needed if you use the W version.

 

Comment
There are no comments made yet.
  1. Tuesday, 8 October 2019
  2. PowerBuilder
  3. # 3
Julian _ Accepted Answer Pending Moderation
0
Votes
Undo

Thanks for the answers.

We are going to test executing the application in the compatibility mode proposed by windows.


I keep you informed.
Regards.
 

 

Comment
Glad we could help.
There are no comments made yet.
  1. Tuesday, 8 October 2019
  2. PowerBuilder
  3. # 4
Chris Pollach Accepted Answer Pending Moderation
0
Votes
Undo

Hi Julian;

  FYI: https://social.technet.microsoft.com/Forums/windows/en-US/9e83c5fc-caa4-4d64-82a2-342bda0b8673/exception-code-0xc0000005?forum=w7itproappcompat

  FWIW: Try using the RHMB on your PB App's EXE and using W10's "Troubleshoot compatibility" option.

Regards ... Chris

Comment
There are no comments made yet.
  1. Monday, 7 October 2019
  2. PowerBuilder
  3. # 5
Chris Pollach Accepted Answer Pending Moderation
0
Votes
Undo

Hi Julian;

   I wonder if the cause of these random "not responding" errors are due to either a network or more likely DB resource issue. For example, a long table / area lock that is not getting released? Anything suspicious in the O/S event and/or DB logs around the time this happens?

Regards ... Chris

Comment
I'm not sure he said "not responding", but "Stopped Working", I found this...



“Application.exe has stopped working” is a Windows error that shows up when a particular program crashes. This issue might occur on any versions of the operating system. However, recently we received a bunch of questions from Windows 10 users. So, it seems that the latest version of the OS is most affected by this error.



Typically, the pop-up warning shows up when a program stops running and needs to shut down by force. Numerous reasons can cause “Application.exe has stopped working” error. It might be related to:



malware attack,[1]

problems with compatibility settings,

issues with temporary files,

corrupted Windows registry[2] entries,

damaged system files.



As Chris said, it sounds like it's more environmental.

Cheers

David
There are no comments made yet.
  1. Monday, 7 October 2019
  2. PowerBuilder
  3. # 6
Julian _ Accepted Answer Pending Moderation
0
Votes
Undo

Hello David:

We run Powerbuilder Runtime Packager, export the dlls in a new folder and copy it to pc user in the app directory.

 

Comment
It was worth checking.

Next question, what is the application trying to do when it stopped / crashes.
There are no comments made yet.
  1. Monday, 7 October 2019
  2. PowerBuilder
  3. # 7
0
Votes
Undo

How are you building your exe?

Do you have the same version of PB runtime DLLs deployed as used on the build machine?

 

Comment
There are no comments made yet.
  1. Monday, 7 October 2019
  2. PowerBuilder
  3. # 8
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.