Phbot Guide

0 views
Skip to first unread message

Francoise Witsell

unread,
Aug 3, 2024, 3:42:34 PM8/3/24
to timasnaca

Googling doesn't bring up much, but seems to indicate that this is nothing Delphi specific and happens with other apps. It seems to be caused by calling into a 32 bit DLL from a 64 bit app or vice versa.

A load time dependency could not be resolved. The easiest way to debug this is to use Dependency Walker. Use the Profile option to get diagnostics output of the load process. This will identify the point of failure and should guide you to a solution.

I tried all the things specified here and found yet another answer. I had to compile my application with 32-bit DLLs. I had built the libraries both in 32-bit and 64-bit but had my PATH set to 64-bit libraries. After I recompiled my application (with a number of changes in my code as well) I got this dreaded error and struggled for two days. Finally, after trying a number of other things, I changed my PATH to have the 32-bit DLLs before the 64-bit DLLs (they have the same names). And it worked. I am just adding it here for completeness.

It is a missing dll.Possibly, your dll that works with com ports have an unresolved dll dependence. You can use dependency walker and windows debugger. Check all of the mfc library, for example. Also, you can use nrCommlib - it is great components to work with com ports.

It has been mentioned in earlier answers that using dependency walker is the way to go, in my case (my application keeps failing with the error code), dependency walker showed a few dll that are NOT relevant!

Finally figured out that I can run profiling by going to "profile" menu and it will run the application and stop at the exact dll that's cause the problem! I found out a 32bit dll was picked because of path and fixed it.

If you used Visual Studio to develop the app, you must make sure the new (i.e. the computer that the software was not developed on) has the appropriate Microsoft Visual C++ Redistributable Package. By appropriate, you need the right year and bit version (i.e. x86 for 32 bit and x64 for 64 bit) of the Visual C++ Redistributable Package.

Actually this error indicates to an invalid image format. However, why this is happening and what the error code usually means? Actually this could be appear when you are trying to run a program that is made for or intended to work with a 64 bit Windows operating system, but your computer is running on 32 bit Operating system.

This may be a case where debugging the debugger might be useful. Essentially if you follow the instructions here you can run two ide's and one will debug into the other. If you un your application in one, you can sometimes catch errors that you otherwise miss. Its worth a try.

In my case the error occurred when I renamed a DLL after building it (using Visual Studio 2015), so that it fits the name expected by an executable, which depended on the DLL. After the renaming the list of exported symbols displayed by Dependency Walker was empty, and the said error message "The application was unable to start correctly" was displayed.

That can happen if for some reason a x86 resource is loaded from a x64 machine. To avoid that explicitly, add this preprocessor directive to stdafx.h (of course, in my example the problematic resource is Windows Common Controls DLL.

You can have this if you are trying to manifest your application that it has a dependancy on the Microsoft.Windows.Common-Controls assembly. You do this when you want to load Version 6 of the common controls library - so that visual styles are applied to common controls.

The main problem, of course, is that a DLL file is missing, or, even more likely, corrupt. If this is the case, then I have some pretty good ideas (especially if you've downloaded and installed a DLL manually!)...

This solution of copying/pasting missing DLL's into system32, etc., used to work since I can remember in the 1990's, but it doesn't seem to work anymore (2020). So if you run into this problem recently, I suggest:

Just solved this problem for my personal project (thanks to Dries for that). For me it was because the project path was too long. After saving the .sln to a shorter path (C:/MyProjects) and compiling from there it ran without the error.

It is possible that you have multiple versions of the dll(s) on your system. You can search your system to find out. The issue may be solved by simply changing the order of the directories in your path. This was my issue. (Cannot run Qt Creator GUI outside of Qt. "The application was unable to start correctly (0xc000007b)" error)

I ran into this issue when fetching code from my repository and compiling on a new machine. Copying over the entire repository and then compiling resulted in an executable which worked. Turns out a 32bit DLL accidentally wasn't checked in. As the people above state, use "Dependency Walker" to figure out where it goes wrong.

To make it more clear what to look for see the below screenshot, with in the background the exe trying to load the wrong DLL (notice the '64') resulting in "the application was unable to start correctly 0xc00007b" and in the foreground the exe which was simply copied over (which included the correct DLL).

Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Liquid formulations are ubiquitous yet have lengthy product development cycles owing to the complex physical interactions between ingredients making it difficult to tune formulations to customer-defined property targets. Interpolative ML models can accelerate liquid formulations design but are typically trained on limited sets of ingredients and without any structural information, which limits their out-of-training predictive capacity. To address this challenge, we selected eighteen formulation ingredients covering a diverse chemical space to prepare an open experimental dataset for training ML models for rinse-off formulations development. The resulting design space has an over 50-fold increase in dimensionality compared to our previous work. Here, we present a dataset of 812 formulations, including 294 stable samples, which cover the entire design space, with phase stability, turbidity, and high-fidelity rheology measurements generated on our semi-automated, ML-driven liquid formulations workflow. Our dataset has the unique attribute of sample-specific uncertainty measurements to train predictive surrogate models.

Liquid formulations are ubiquitous in everyday lives and are produced across several industries, such as cosmetics, food, pharmaceuticals, and agrochemicals1,2. Increasingly, there is demand for a switch to eco-friendly products3. For example, there is a push to replace polymers in liquid formulations (PLFs), which are often made from fossil-derived monomers, with natural polymers, or those derived from bio-feedstocks4,5. Since designing liquid-formulated products that meet multiple customer-defined property targets is a time-, resource- and labour-intensive process6, changing the carefully optimised formulation recipes is a difficult proposition. In this respect, developing accurate predictive models, either through computational approaches like machine learning (ML)7,8,9,10,11 or molecular modelling simulations12,13,14, can aid in accelerating formulation design.

In an earlier study, some of us have developed interpolative ML models, trained on a relatively small dataset of liquid formulations7. This earlier study showed the potential of ML models to learn complex interactions within a formulation and the use-case within a workflow of formulations design. However, the models, trained on a limited set of formulation ingredients and without structural information about said ingredients in the input features, are rather limited in scope and cannot be generalised to new formulations without re-training the model on a new experimental dataset. For developing statistical-ML models, availability of experimental data to train or validate the models is the most critical factor3,15,16.

In this study, we aim to create an open dataset for training machine learning models in the liquid formulations domain. Our chosen liquid formulation system is shampoo, similar to the previous study by Cao et al.7 We selected twelve surfactants covering anionic, non-ionic, amphoteric, and cationic types17, four conditioning polymers, and two thickeners. From these we chose a binary mixture of surfactants, polymer, and thickener in any given formulation. These ingredients are also more broadly used in rinse-off product applications. Due to the combinatorial nature of formulation design, our set of ingredients lead to 528 distinct combinations, an over 50-fold increase in dimensionality compared to our previous study8. Further to the choice of ingredients, we investigated a diverse range of ingredient concentrations.

Automation brings along several benefits: increased efficiency, reproducibility, and safety; but not everything can be integrated into an automated workflow, in particular, certain analysis techniques represent the bottleneck24. As an alternative, if a particular characterisation instrument cannot be integrated with the synthesis set-up, samples can be brought to the analytical instruments, as in the case of the mobile chemist robot developed in the Materials Innovation Factory (MIF) at the University of Liverpool25. However, there is a very significant capital investment, both monetary and human, required to setting up such a laboratory. Instead, this work favours the approach of flexible, modular automation by breaking down the process of preparing and characterising formulation samples into unit operations which we aimed to automate with independent stations for liquid handling, pH adjustment, analysis etc21,23,26.

There are a couple of interesting commercial formulation bots such as GEOFF by Labman Automation27 (located at the University of Liverpool, with industrial backing from Unilever) and FORMAX by ChemSpeed Technologies28. One option we had was to buy time on an already available bespoke robotic platform, for example within the MIF at Liverpool. The alternative was to develop a workflow that demonstrates how any organisation with a not-too-large, dedicated lab automation budget, could make use of their existing stand-alone systems and complement them with lower-cost robotics/automation.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages