I recently made some minor changes within my c++-builder-project-settings to distribute a built application, however now some kind of initialisation seems to be missing.
Before I was using this (worked properly):
TPngImage *img=new TPngImage;
img->LoadFromFile(pfad);
Image1->Picture->Assign(img);
However, suddenly I get the error: access-violation... access to 0x0000000.
I checked and noticed that Image1->Picture is Null.
Image1 is of course a TImage-Object added per designer.
I'm using embarcaderos XE2 16 c++-Builder.
Is there a setting for this or could you tell me, what I have to do?
I thought of Image1->Picture=new TPicture(); already, but that is also Null...
It seems that it was my settings...
Somehow I messed some setting up.
I exported the settings of a new project, copied my include-paths, overwrote the settings with the exported one and inserted the includes.
Now everything works again.
Related
My setup is: ROS melodic, Ubuntu: 18.04
I want simulate turtlebot3 moving with my own global planner and have been following this tutorial to get started: http://wiki.ros.org/navigation/Tutorials/Writing%20A%20Global%20Path%20Planner%20As%20Plugin%20in%20ROS#Running_the_Plugin_on_the_Turtlebot. The tutorial seem to be made for ROS hydro, but as it was the best source of guidance I could find I hoped it would work.
The error I'm having is:
Failed to create the global_planner/GlobalPlanner planner, are you sure it is properly registered and that the containing library is built? Exception: MultiLibraryClassLoader: Could not create object of class type global_planner::GlobalPlanner as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary()
To my knowledge I've followed the tutorial as much as possible with a only a few things done differently because I wanted to test it, couldn't do as the tutorial asked, or because I thought it wouldn't impact the results. What I have done differently is:
I use the carrot_planner.h and carrot_planner.cpp files in the tutorial section 1 to test that it works before trying with my own code to avoid confusion about where possible errors come from. It's not 'different' from the tutorial to my knowledge, but figured I'd mention it. They are placed in catkin_ws/src/carrot_planner/src/global_planner/
The ros package I'm working from is in catkin_ws/src and is called the carrot_planner. In the tutorial step 1.3 I use add_library(global_planner_lib src/global_planner/carrot_planner.cpp). Would not imagine it affects the results either.
In section 3 of the tutorial it mentions that 'First, you need to copy the package that contains your global planner (in our case global_planner) into the catkin workspace of your Turtlebot (e.g. catkin_ws).' Since my package was already in catkin_ws/src/ I haven't moved it since I guess I didn't need to.
I've altered the 'move_base.launch' file in '/opt/ros/melodic/share/turtlebot3_navigation/launch/' instead of the 'move_base.launch.xml' in '/opt/ros/hydro/share/turtlebot_navigation/launch/includes/' as there doesn't seem to be a destination '...turtlebot3_navigation/launch/includes/'. There are files in launch, but no includes folder. Maybe that a difference from Hydro to Melodic, I don't know. There may be a whole lot of things that need to be done differently from the tutorial when using Melodic, or with turtlebot3, but I don't know.
I haven't made my own launch file for bringup of the turtlebot, but have instead followed this tutorial (https://emanual.robotis.com/docs/en/platform/turtlebot3/nav_simulation/) to guide me with turtlebot3. After finishing this step in the global planner tutorial 'Save and close the move_base.launch.xml. Note that the name of the planner is global_planner/GlobalPlanner the same specified in global_planner_plugin.xml. Now, you are ready to use your new planner' I tested whether it worked by running: 'roslaunch turtlebot3_gazebo turtlebot3_world.launch' and then I tried running: 'roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=$HOME/map.yaml' which led to the error I showed above. I have created the map-yaml, so there's no misunderstanding whether that's missing.
I would be very glad for any help, thank you ^^
Edit: My system only had 'navfn' on it, not 'global_planner' or 'carrot_planner', if that makes a difference.
After looking over the code I found a solution. It doesn't make everything work perfectly yet, but seems to solve the immediate problem.
The problem was that in my 'global_planner_plugin.xml' I just used the code provided in the tutorial:
<library path="lib/libglobal_planner_lib">
<class name="global_planner/GlobalPlanner" type="global_planner::GlobalPlanner" base_class_type="nav_core::BaseGlobalPlanner">
<description>This is a global planner plugin by iroboapp project.</description>
</class>
</library>
But in the carrot_planner.cpp file it says:
PLUGINLIB_EXPORT_CLASS(carrot_planner::CarrotPlanner, nav_core::BaseGlobalPlanner)
Changing type="global_planner::GlobalPlanner to type="carrot_planner::CarrotPlanner and then launching turtlebot3 doesn't give the same error anymore.
I have already synced sp-io in all of the cargo.toml to same file and also tried cargo clean and deleting cargo.lock but still getting the same error. Can someone please help me.
This is the screenshot containing the error
This error means that you are leaking the standard library twice somewhere in a dependency. This usually translates to: for some pallet x, where pallet x has feature std, you have forgotten to add x/std somewhere.
Recall that all FRAME crates need to be imported with default-features = false, and their std feature enabled in the top crate's std.
I have read this blogpost http://www.ics.com/blog/qt-tips-and-tricks-part-1 and tried to enable plugin debugging as described.
I've put this line in my main.cpp:
qputenv(QT_DEBUG_PLUGINS, 1);
But if I try to compile I'm getting this error:
.../src/main.cpp:14: error: 'QT_DEBUG_PLUGINS' was not declared in this scope
qputenv(QT_DEBUG_PLUGINS, -1);
What is the problem here and how do I have to do it right?
qputenv("QT_DEBUG_PLUGINS", QByteArray("1"));
But I don't get any additional output.
I'm using Qt5.5.1 with QtCreator 3.6 under KUbuntu 15.10.
You're supposed to set env variable from outside your program, not from inside! It's very likely the plugin loading you're interested into already happened by the time you reach that line. Try putting it before creating a Q*Application object.
– peppe
That's it. It was definitely set before plugin loading, but it seems to be important to set it before creating Q*Application as you wrote. Thank you.
– avb
I am facing a weird error within my codebase currently. You can see the full ZF2s project code on my github right here. <- there's a link
I'm having a Module set up with two Entities (X and Y). Entity_X contains a reference to Entity_Y via (targetEntity="Entity_Y"). The Error persist with the FQCN or just the CN itself.
Entity_X:
id int PK,
id_Y int FK,
text varchar
Entity_Y:
id int PK,
text varchar
When loading Entity_Y first and then Entity_X everything is working fine. This remains true for both StandardAutoloader and ClassMapAutoloader. However: when loading Entity_X first with ClassMapAutoloader present, i will be seeing the following error:
Fatal error: Cannot redeclare class Kennzahlen\Entity\Referenzwert (Entity_Y)
in \module\Kennzahlen\src\Kennzahlen\Entity\Referenzwert.php
on line 13
Loading Entity_X first with StandardAutoloader works without any problems, too.
Update
The Problem appears to be within ZF2s ClassMapAutoloader (or Autoloading-Mechanism in General). My Module used the ClassMapAutoloader and using this i've gotten the above mentioned error. When removing the ClassMapAutoloader and simply using the StandardAutoloader, the error vanished into thin air. Thanks to #ocramius and all others i've botheres with this :)
I'm writing a failing test case to try and solve this in doctrine/common. The problem seems to be that silent autoloaders (as explained by #Xerkus) are not compatible with doctrine/common itself. To solve that, use a StandardAutoloader from ZF2 (or from composer) instead of using the ClassMapAutoloader. This will solve the issue until a patch is ready.
Update: patch is being suggested at doctrine/common#216
i have no knowledge of doctrine, but i browsed through source and i think i found issue:
https://github.com/doctrine/common/blob/master/lib/Doctrine/Common/ClassLoader.php#L224
here, this code expects that autoloader will return value evaluated to true, but that is not requirement of spl autoload mechanism, therefore autoloader can return NULL,
To check if i am correct, in in your project in doctrine replace line 224 in Doctrine/Common/ClassLoader.php
} else if ($loader[0]->{$loader[1]}($className)) {
with
} else if ($loader[0]->{$loader[1]}($className) && class_exists($className, false)) {
Ans see if issue is fixed, if i am correct - then report bug to doctrine project
I can compile the solution with no errors, but when I'll try to run it, I get a crash window:
An unhandled exception of type
'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll
Additional information: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "<myformname>.resources" was corerctly embedded or linked into assembly "<myprojectname>" at compile time, or that all the satellite assemblies required are loaded and fully signed.
And after I press Break it throws me to the line:
this->Icon = (cli::safe_cast<System::Drawing::Icon^ >(resources->GetObject(L"$this.Icon")));
If I comment this line out, everything works just fine, but my program doesn't have icon.
Anyone else had this problem? Found a solution? I couldn't find anything clear enough for me to understand, problem is really annoying me, only solution I found was to declare my form class before any other classes, but I don't even have any other classes in my solution?
I also have only one project in this solution, ms support said something about having multiple projects, which I don't have, so it was no use either.
Take a look here :
http://www.mztools.com/articles/2005/MZ2005007.aspx
The exception is thrown because your icon cannot be located. You will probably need to compiles your resources under one .dll and put this under en-US subfolder on your project output. It did the trick for me at least. There are probably other solutions to your problem too.
Do not panic like I did. The root cause of the problem is that the compiled resource file is different from the one that is asked to load at runtime. This happens because the underlying build-script cannot detect the filename or namespace changes made after the form is created.
For example, At first we started a project named x . And our $(RootNamespace) becomes x. And we created a form named y. So our XML resource file y.resx gets compiled into x.y.resource . At this point the icon change works.
Now somehow we changed the project name or the namespace to z. But our $(RootNamespace) remains the x. While at compile-time it wrongly generates old x.y.resource, but at links-time it links z.y.resource. And at this point the icon change does not work.
It can also happen if the form is under some nested namespace which is not known in the project file.
It can be fixed by changing the compilation output of the y.resx file . It can be done by right-clicking the resource and changing the Resource Logical Name to $(RootNamespace).%(Filename).resources .
I will also make sure that ProjectName,AssemblyName and RootNamespace are the same in the .vcxproj file. Somehow if the form is declared under a nested namespace like RootNamespace.gui , then the output file of the resource should be $(RootNamespace).gui.%(Filename).resources .