1. Ferdinand Fischer
  2. Beta Testing
  3. Tuesday, 19 November 2019 22:25 PM UTC

Hello,

i imported the sample c# class into a nvo.

When i try to open the nvo, powerbuilder crashes.

Error in the eventlog:

Name der fehlerhaften Anwendung: PB190.EXE, Version: 19.1.0.2203, Zeitstempel: 0x5da9d5ce
Name des fehlerhaften Moduls: PBUDO190.dll, Version: 19.1.0.2203, Zeitstempel: 0x5da9d786
Ausnahmecode: 0xc000041d
Fehleroffset: 0x00103d46
ID des fehlerhaften Prozesses: 0x2198
Startzeit der fehlerhaften Anwendung: 0x01d59f2642b385ee
Pfad der fehlerhaften Anwendung: C:\Program Files (x86)\Appeon\PowerBuilder 19.0\PB190.EXE
Pfad des fehlerhaften Moduls: C:\Program Files (x86)\Appeon\Shared\PowerBuilder\PBUDO190.dll
Berichtskennung: 368a1a3d-aa3a-4abe-92f5-0fbe5b33795d
Vollständiger Name des fehlerhaften Pakets:
Anwendungs-ID, die relativ zum fehlerhaften Paket ist:

Does some have any idea wha is wrong?

Is there any log that is filled by powerbuilder on crashes?

 

 

Accepted Answer
Ferdinand Fischer Accepted Answer Pending Moderation
  1. Wednesday, 20 November 2019 17:08 PM UTC
  2. Beta Testing
  3. # Permalink

The reinstall did fix my problem.

Comment
  1. Michael Kramer
  2. Wednesday, 20 November 2019 17:09 PM UTC
Happy to hear! Enjoy!

  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 20 November 2019 20:43 PM UTC
Great, but not so great, I still get the feeling it's risky to have multiple installations of PB on the same machine, though others will claim everything works great.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 19 November 2019 22:39 PM UTC
  2. Beta Testing
  3. # 1

Hi Ferdinand,

If you tell me where I can get "the sample C# class", I'll try to do the same thing.

regards,

Comment
  1. Ferdinand Fischer
  2. Tuesday, 19 November 2019 22:46 PM UTC
Hi Miguel,



i used the class from the help.



using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;



namespace PBcSharpTest

{

public class TestCLR1

{

public int m_iTest

{

set;

get;

}

public string m_strTest

{

set;

get;

}



//int argument

public int Add(int iFirst, int iSecond)

{

return iFirst + iSecond;

}



//string argument

public string StringCat(string strFirst, string strSecond)

{

return strFirst + strSecond;

}



//array argument

public void TestByteArray(byte[] bArray)

{

for (int i = 0; i < bArray.Length; i++)

{

}

}



//reference argument

public void TestReference(ref int iTest)

{

iTest = 1;

}

}



}

  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 19 November 2019 23:04 PM UTC
What type of project did you create in C#?

.net standard ?

.net framework ?

.net core ?

Only the first 2 seem to be valid.

Can you post your c# project?

Meanwhile I'll try....
  1. Helpful
  1. Ferdinand Fischer
  2. Tuesday, 19 November 2019 23:17 PM UTC
had to write a new comment to add an attachment.
  1. Helpful
There are no comments made yet.
Ferdinand Fischer Accepted Answer Pending Moderation
  1. Tuesday, 19 November 2019 23:17 PM UTC
  2. Beta Testing
  3. # 2

I used .net framework.

I uploaded my VS-Project.

Attachments (1)
Comment
  1. Mark Lee @Appeon
  2. Wednesday, 20 November 2019 08:15 AM UTC
Hi Ferdinand,

Thanks for reporting this problem.

1. I downloaded the VS-Project you provided but can't reproduce it on our side either.

2. Please use another machine to test and see if the same issue exists.

3. If you can also reproduce it on other machine, I also suggest you report it to our support ticketing system : https://www.appeon.com/standardsupport/newbug

When you report this issue, please also provide a sample PB test case (with PBT / PBL) for us to reproduce it. Thanks in advance.

Regards,
  1. Helpful
  1. Ferdinand Fischer
  2. Wednesday, 20 November 2019 08:28 AM UTC
Hi Mark,



can you tell me what PBUDO190.dll is used for?

That is after all where pwoerbuilder crashes.
  1. Helpful
  1. Mark Lee @Appeon
  2. Thursday, 21 November 2019 03:24 AM UTC
Hi Ferdinand,

When you double-click the nvo object / window on the left panel in PB IDE, the window displayed on the right is implemented based on PBUDO190.dll.

Regards,
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 19 November 2019 23:29 PM UTC
  2. Beta Testing
  3. # 3

Under "About C# Assembly" in the help, .Net Framework 4.7.1 is not listed:


The C# assembly supported by PowerBuilder must be developed on .NET Framework 4.0 or later or .NET Standard 1.0 or later. And the assembly DLL file will require the corresponding version of .NET Framework to run, especially if the DLL file is a .NET Standard class library. Please check the Microsoft website or the following table for the compatible versions between .NET Standard and .NET Framework.

Nevertheless, I'm downloading 4.7.1 to give it a try, please hold on a few mintues:

 

The C# assembly supported by PowerBuilder must be developed on .NET Framework 4.0 or later or .NET Standard 1.0 or later. And the assembly DLL file will require the corresponding version of .NET Framework to run, especially if the DLL file is a .NET Standard class library. Please check the Microsoft website or the following table for the compatible versions between .NET Standard and .NET Framework.

 

.NET Standard 1.0 1.1 1.2 1.3 1.4 1.5 1.6 2.0
.NET Framework 4.5 4.5 4.5.1 4.6 4.6.1 4.7.2 4.7.2 4.7.2
Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 19 November 2019 23:43 PM UTC
  2. Beta Testing
  3. # 4

Hi again,

I've downloaded your test sample, downloaded and installed .net framework 4.7.1 and compiled it with VS 2019 Community.

Then imported the DLL from the debug folder with all checked in advanced options.

Double click on the nvo from the library painter, all okay.

Did the same thing for the DLL in the release folder, with prefix "nvo_release_" , but without the "encapsulate a CsharpAssembly object ....." checked.

Same result, all okay.

So ... what's different? I'm on W10.

 

I've attached my result in zip format, see if you can open the nvo's.

Attachments (1)
Comment
  1. Ferdinand Fischer
  2. Tuesday, 19 November 2019 23:58 PM UTC
I'll try it tomorow/ later today.
  1. Helpful
  1. Ferdinand Fischer
  2. Wednesday, 20 November 2019 07:50 AM UTC
I tried it with your target and didnt work either.



Im also on W10.
  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 20 November 2019 07:59 AM UTC
Okay, so that indicates it might be something on your system. Can you try on a different PC or VM?

Do you have more than one PB version installed on same PC?

I'm out of options., sorry
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 19 November 2019 23:52 PM UTC
  2. Beta Testing
  3. # 5

Maybe powerbuilder needs another .Net Framework to be installed (even though you can compile in C# with 4.7.1)?

This is all the stuff that's on my pc:

Comment
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Wednesday, 20 November 2019 08:52 AM UTC
  2. Beta Testing
  3. # 6

Hi Ferdinand,

I downloaded your project and attempted to open your .DLL with C# Class Importer. However, I got this error:

Could not load file or assembly 'file …\PBcSharpTest.dll' or one of its dependencies.
Operation is not supported. (Exception from HRESULT 0x80131515)

So, I opened your C# solution in SnapDevelop, recompiled without ANY changes to code, project setup, or solution. Simply recompile. This version I have no issues opening.

I can generate the proxy (CSharpObject descendant). I can open the generated proxy object. All seems fine.

I have NO idea what is different. So I have uploaded your project once more. This time with my compiled version in the DEBUG subfolder. Maybe someone else will have fun comparing files to see where the difference is. I have to focus on my day job rest of today.

/Michael

Attachments (1)
Comment
  1. Miguel Leeuwe
  2. Wednesday, 20 November 2019 09:02 AM UTC
hmm that reminds me: we haven't tested yet (or at least "I") whether this dll import will work on a 'clean' machine. When we compile the dll's with VS, there might be some stuff on GAC (don't know, I'm a noob). So that will be my next test: test from powerbuilder, once we have imported a dll, on a different machine, where the dll has NOT been compiled ...

:)
  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 20 November 2019 09:03 AM UTC
but now I'm crashing for a few hours, what I night, lucky I'm on a holiday.
  1. Helpful
There are no comments made yet.
Ferdinand Fischer Accepted Answer Pending Moderation
  1. Wednesday, 20 November 2019 13:25 PM UTC
  2. Beta Testing
  3. # 7

Hi,

 

i think the crash has nothing to do with the c# sharp importer.

 

I get the crash on every object, that i try to open.

I can not even create any object.

As soon as i try to create something with the painter the powerbuilder crashs.

Ill try to reinst to see if that fixes my problem.

Comment
  1. Michael Kramer
  2. Wednesday, 20 November 2019 13:50 PM UTC
Sounds like reinstall is a good idea. Consider uninstall; then reboot; then install once more. Just to minimize risk of some leftovers mess up the new install.
  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 20 November 2019 14:23 PM UTC
That´s great news ! I was going to ask you if you could open any object, but I forgot .... :(
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


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