1. David Naval
  2. Valentina Database ADK
  3. 火, 9月 21 2021, 07:13 AM
  4.  メールで購読
Hi, I made a upgrade from Valentina ADK C++ from version 9 to version 11 to compile my application as Mac universal (x86_64 and arm64).

I just replaced the dylib's and update the serials in my application and I get a crash on call 'ValentinaInit'.

It's necessary any extra init?

Thanks in advanced.
添付ファイル
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Hello David,

Do you copy vcomponents_x64 into your app bundle? Where exactly?
What was the previous version exactly? As I can see in version 9.5, the paths were changed, so now it is expected to be in standard locations: vcomponents_x64 in Frameworks subdirectory, and vresources - in Resources subdirectory. It can be the reason.
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Checked a screenshot again, so it is a Photoshop plugin.
Where do you place vcomponents_x64?
コメント
There are no comments made yet.
Ruslan Zasukhin 承諾済みの回答
Hi David,

I see that serial starts as VR4SDK - this is Reports.
But you sending it to Valentina Init - this is VDB
コメント
There are no comments made yet.
David Naval 承諾済みの回答
Hi David,

I see that serial starts as VR4SDK - this is Reports.
But you sending it to Valentina Init - this is VDB


I made a mistake. I want Valentina DB ADK and I bought Valentina Reports ADK!
There is any way to change my order?
コメント
There are no comments made yet.
David Naval 承諾済みの回答
Checked a screenshot again, so it is a Photoshop plugin.
Where do you place vcomponents_x64?


Sure, it's a Photoshop plugin. The dylib's are in "../PLUGIN_NAME.plugin/Contents/Frameworks/"
添付ファイル
コメント
There are no comments made yet.
David Naval 承諾済みの回答
Hello David,

Do you copy vcomponents_x64 into your app bundle? Where exactly?
What was the previous version exactly? As I can see in version 9.5, the paths were changed, so now it is expected to be in standard locations: vcomponents_x64 in Frameworks subdirectory, and vresources - in Resources subdirectory. It can be the reason.


The dylib's are in the correct directory. I added a copy of 'vresources' in the Resources folder with the same result.
添付ファイル
コメント
There are no comments made yet.
David Naval 承諾済みの回答
Hello David,

Do you copy vcomponents_x64 into your app bundle? Where exactly?
What was the previous version exactly? As I can see in version 9.5, the paths were changed, so now it is expected to be in standard locations: vcomponents_x64 in Frameworks subdirectory, and vresources - in Resources subdirectory. It can be the reason.


I'm sending a crash report from the system if it can help.
添付ファイル
コメント
There are no comments made yet.
Ruslan Zasukhin 承諾済みの回答
Hi David,

please contact by email Lynn Fredricks,
I think you have his email.
コメント
There are no comments made yet.
David Naval 承諾済みの回答
Hi David,

please contact by email Lynn Fredricks,
I think you have his email.


Hi Ruslan.

No, I don't have the email of Lynn Fredricks. Could you send me it?
コメント
There are no comments made yet.
David Naval 承諾済みの回答
Checked a screenshot again, so it is a Photoshop plugin.
Where do you place vcomponents_x64?


I can execute ValentinaInit() in a desktop unit test app, but something produce a conflict in the execution in a Photoshop plugin.
We used Valentina ADK in our Photoshop plugin in previous versions (VDK version 3, 5, 8 and 9) from years.
Libraries are loaded correctly (I tried to call GetKernelVersionString() and IsKernelDLLAvailable() with no problem) but we get a crash on call ValentinaInit().
Any idea how to fix?
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Hi David,


Could you send me it?


1) So previously vcomponents_x64 was inside the Contents folder, right?
Let's try to make it how it was in v.9 - we saved both ways.

2) What if you pass nullptr to ValentinaInit? It should work in demo mode.
コメント
There are no comments made yet.
David Naval 承諾済みの回答
Hi David,


Could you send me it?


1) So previously vcomponents_x64 was inside the Contents folder, right?
Let's try to make it how it was in v.9 - we saved both ways.

The place is different because the installation path now is @rpath than /usr/local/vcomponents of the v9.
We load the libraries because we can call other functions as GetKernelVersionString (if the libraries are not in the correct place, we can't run the plugin)

2) What if you pass nullptr to ValentinaInit? It should work in demo mode.


We bought licenses for Mac and Win but I made a mistake in the order, but its not relevant, the crash appears just running the plugin in Photoshop (less than 1 minute).

There is a conflict with this version and our Photoshop plugin in ValentinaInit.
We use some open source as wxWidgets, POCO, libvips..... (I don't know if this can help you)

In the crash log:
0 ??? 000000000000000000 0 + 0
1 libvshared_fat_release_x64.dylib 0x0000000234f23bb6 void std::__1::__call_once_proxy<std::__1::tuple<fbl::Converter_UTF8_Singleton* fbl::SingletonEternal<fbl::Converter_UTF8_Singleton>::GetSingletonPtrHelper<fbl::GetConverter_UTF8()::$_0&>(fbl::GetConverter_UTF8()::$_0&;)::'lambda'()&&> >(void*) + 41
2 libc++.1.dylib 0x00007fff203c0a8a std::__1::__call_once(unsigned long volatile&, void*, void (*)(void*)) + 139
3 libvshared_fat_release_x64.dylib 0x0000000234f22fb2 fbl::GetConverter_UTF8() + 66
4 libvshared_fat_release_x64.dylib 0x0000000234ef2287 fbl::CreateDiskLocationFromFSRef(__CFURL const*) + 79
5 libvkernel_fat_release_x64.dylib 0x0000000235466faf fbl::FindVComponents() + 58
6 libvkernel_fat_release_x64.dylib 0x00000002354670a1 fbl::ValentinaInit_imp(unsigned int, char const*, char const*, char const*) + 49

it seems CreateDiskLocationFromFSRef return a invalid FSRef and GetConverter_UTF8 crashes.
Is trying this functions to open or create a file locally?
It's a localize problem?
コメント
There are no comments made yet.
Ruslan Zasukhin 承諾済みの回答
Hi David,

let's try step by step

* so you work on MAC with Xcode and VSDK v9 -- all right here.

* you place to your computer VSDK v11
you say you have replaced DLLs - where exactly?

* on your mac you have
/usr/local/lib/vcomponents ?
it contains v11 all files?
there is no any v9 files on computer?

* you compile Xcode DEBUG app now?
Does your scripts copy components inside of YourApp.debug.app ?
OR DEBUG app loads them from /usr/local/lib/vcomponents ?


* xcode on start of app shows in the console paths where from DLLs was loaded.
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Also, in version 9, vcomponents where in "Some.plugin/Contents/vcomponents_x64", right?
After checking /usr/local/lib/vcomponents (as Ruslan suggested) - let's leave it here for version 11.

We can continue the conversation in the email.
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
And it is on Apple Silicon Mac, Photoshop is running natively without Rosetta, correct?
コメント
There are no comments made yet.
David Naval 承諾済みの回答
Hi David,

let's try step by step


* so you work on MAC with Xcode and VSDK v9 -- all right here.

Yes

* you place to your computer VSDK v11
you say you have replaced DLLs - where exactly?

v9:
We change /usr/local/lib/vcomponents_x64 by @loader_path using install_name_tool
PLUGIN/Contents/MacOS/VALENTINA.dylibs
v11:
No changes because libraries have @rpath and our plugin resolve ../Frameworks
PLUGIN/Contents/Frameworks/VALENTINA.dylibs

* on your mac you have
/usr/local/lib/vcomponents ?
No
it contains v11 all files?
No
there is no any v9 files on computer?
No

Libraries are inside the Photoshop plugin and we can load and call the functions (as previous versions).

* you compile Xcode DEBUG app now?
Yes.
Does your scripts copy components inside of YourApp.debug.app ?
Yes
OR DEBUG app loads them from /usr/local/lib/vcomponents ?
No

* xcode on start of app shows in the console paths where from DLLs was loaded.

In Mac no, but if the library not found, the message appears in the console and the plugin can't start.
I'm calling:
printf ("VDK kernel version: %s\n", GetKernelVersionString());
and the console shows:
VDK kernel version: 11.4.5
コメント
There are no comments made yet.
David Naval 承諾済みの回答
And it is on Apple Silicon Mac, Photoshop is running natively without Rosetta, correct?


Intel Mac and Apple Silicon Mac (natively) same result
コメント
There are no comments made yet.
David Naval 承諾済みの回答
Also, in version 9, vcomponents where in "Some.plugin/Contents/vcomponents_x64", right?
After checking /usr/local/lib/vcomponents (as Ruslan suggested) - let's leave it here for version 11.

We can continue the conversation in the email:


version 9 : Some.plugin/Contents/MacOS
version 11 : Some.plugin/Contents/Frameworks

and

removed all versions in /usr/local/lib/vcomponents
コメント
There are no comments made yet.
David Naval 承諾済みの回答
Hi,
I made some test in Mac intel with VSDK 11.4.5.

If I make the sdk installation and compile our Photoshop plugin without changes in Valentina libraries (using the original installation path) I can execute ValentinaInit.

David ~ % otool -L /Users/davidnaval/Documents/Proyectes-Git/licensedBinaries/ValentinaADK/macOS/libvclient_fat_release_x64.dylib
/Users/davidnaval/Documents/Proyectes-Git/output/macOS/Debug/Debug/nT_Colorations.plugin/Contents/MacOS/libvclient_fat_release_x64.dylib:
/usr/local/lib/vcomponents_x64/libvclient_fat_release_x64.dylib (compatibility version 11.4.5, current version 11.4.5)
/usr/local/lib/vcomponents_x64/libvshared_fat_release_x64.dylib (compatibility version 11.4.5, current version 11.4.5)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1770.255.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 904.4.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.60.1)


If I use 'install_name_tool' to embed the libraries in plugin 'Contents' (changing '/usr/local/lib/vcomponents_x64' by @rpath (or @loader_path) ValentinaInit crashes

David ~ % otool -L /Users/davidnaval/Documents/Proyectes-Git/licensedBinaries/ValentinaADK/macOS/libvclient_fat_release_x64.dylib
/Users/davidnaval/Documents/Proyectes-Git/licensedBinaries/ValentinaADK/macOS/libvclient_fat_release_x64.dylib:
@rpath/libvclient_fat_release_x64.dylib (compatibility version 11.4.5, current version 11.4.5)
@rpath/libvshared_fat_release_x64.dylib (compatibility version 11.4.5, current version 11.4.5)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1770.255.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 904.4.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.60.1)


There is any internal dlopen with fixed path '/usr/local/lib/vcomponents_x64'?
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Hi David,

Yes, in some sense it is fixed.
Currenlty, ValentinaInit tries to find libraries to perform some internal initialization in the following places:
1. Check APP/Contents/Frameworks/vcomponents_x64
2. Check APP/Contents/vcomponents_x64
3. Check APP/Contents/vresources and if it exists - try to find librabires from APP/Contents/
4. Check /usr/local/lib/vcomponents_x64

But APP in the case of Photoshop plugin is Photoshop.app itself, not a plugin. (The path is returned by CFBundleGetMainBundle)
In version 9.5 we added Check 1, APP was always used as a root for search.

We need to understand how it worked with the previous versions. Maybe you have some working build with version 9 so we can check it?
コメント
There are no comments made yet.
  • ページ :
  • 1
  • 2


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

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories