https://freedomdefined.org/api.php?action=feedcontributions&user=2603%3A6011%3AC804%3ACF96%3A9508%3A8E93%3AD372%3AEC65&feedformat=atomDefinition of Free Cultural Works - User contributions [en]2024-03-29T01:50:21ZUser contributionsMediaWiki 1.38.4https://freedomdefined.org/index.php?title=Logo_contest&diff=24662Logo contest2021-05-18T20:46:26Z<p>2603:6011:C804:CF96:9508:8E93:D372:EC65: Added content to your first email</p>
<hr />
<div>We need a "Free Content" logo that can be attached to works covered by licenses which meet the conditions defined in the [[Definition|Free Content Definition]]. This logo should consist of:<br />
<br />
* a symbol or sign that is the same for both logos (minor variations allowed)<br />
* a label, probably "Free Content"<br />
<br />
Logos '''must''' have a vector graphics source (SVG preferred), but '''must''' be uploaded in any format (PNG preferred). A good, free software vector graphics application which can handle SVG and PNG exports is [http://www.inkscape.org/ inkscape]. The dimensions are up to you as long as the images scale well. In order for your logo to be used, the logo itself must be free content with a reduced attribution requirement, but we can work this out with you once we have picked your Debugging Inkscape<br />
To get debug symbols for Inkscape, you'll probably need to recompile it. We use cmake and it has a Debug mode which produces debugging symbols:<br />
<br />
cmake -DCMAKE_BUILD_TYPE=Debug ../<br />
This assumes that you're building everything in a build folder and the repository root is the parent directory.<br />
<br />
If you're looking an older non-cmake version, you'll need to enable the CXXFLAGS manually.<br />
<br />
Debugging with GDB<br />
To start debugging Inkscape with GDB, load it up:<br />
<br />
gdb path/to/inkscape<br />
If you want Inkscape to start right away and your version of GDB is new enough, you can start it with<br />
<br />
gdb path/to/inkscape -ex r<br />
To keep gdb from paginating (splitting output from commands into pages, makes creating backtraces for bug reports more difficult) you can put this in ~/.gdbinit:<br />
<br />
set pagination off<br />
To use GDB's text UI, you can run gdb -tui or gdbtui.<br />
<br />
When the program crashes you might see something like this:<br />
<br />
Program received signal SIGSEGV, Segmentation fault.<br />
0x0000000000000000 in ??<br />
(gdb)<br />
To find out where the crash occurred (you might not always be able to), you should run:<br />
<br />
(gdb) backtrace<br />
or<br />
<br />
(gdb) where<br />
or<br />
<br />
(gdb) bt<br />
Each does the same thing, and refers to the command backtrace.<br />
<br />
More advanced debugging with GDB<br />
When you run bt, you get a list of frames:<br />
<br />
Program receieved signal SIGTRAP, Trace/breakpoint trap.<br />
0x0000000000aa849f in SPDesktopWidget::createInstance (namedview=0x33a57a0) at ../../src/widgets/desktop-widget.cpp:1708<br />
1708 UXManager::getInstance()->connectToDesktop( toolboxes, dtw->desktop );<br />
(gdb) bt<br />
#0 0x0000000000aa849f in SPDesktopWidget::createInstance (namedview=0x33a57a0) at ../../src/widgets/desktop-widget.cpp:1708<br />
#1 0x0000000000aa8065 in sp_desktop_widget_new (namedview=0x33a57a0) at ../../src/widgets/desktop-widget.cpp:1659<br />
#2 0x000000000052430d in sp_file_new (templ=...) at ../../src/file.cpp:155<br />
#3 0x00000000005249ba in sp_file_new_default () at ../../src/file.cpp:226<br />
#4 0x000000000048865e in sp_main_gui (argc=1, argv=0x7fffffffe0b8) at ../../src/main.cpp:1071<br />
#5 0x0000000000487fab in main (argc=1, argv=0x7fffffffe0b8) at ../../src/main.cpp:789<br />
(gdb)<br />
These frames are all selectable:<br />
<br />
(gdb) frame 2<br />
#2 0x000000000052430d in sp_file_new (templ=...) at ../../src/file.cpp:155<br />
(If you have the same crash in a debugger better suited to your platform, you can use select frame to specify the address if GDB cannot find it.)<br />
<br />
Now you have activated frame 2. You can see the state of the processor registers in frame 2 and any local variables that the compiler has embedded in the debug symbols.<br />
<br />
(gdb) info locals<br />
doc = 0x27fbea0<br />
myRoot = 0x27f8850<br />
nodeToRemove = 0x0<br />
olddesktop = 0x0<br />
dtw = 0x7fffffffdd30<br />
desktop = 0x33a0710<br />
<br />
(gdb) print templ<br />
$1 = (const std::string &) @0x7fffffffddb8: {static npos = 18446744073709551615, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x339fdd8 "/usr/local/share/inkscape/templates/default.svg"}}<br />
Stepping execution and breakpoints<br />
Sometimes, you would like to be in control of program execution instead of just letting it run wildly.<br />
<br />
You can tell GDB to stop when it reaches a certain function, upon a certain condition, or when a value in memory changes. These are known as breakpoints and watchpoints.<br />
<br />
Stopping when a function is called:<br />
<br />
(gdb) break Inkscape::UI::Tools::SelectTool::root_handler<br />
Breakpoint 1 at 0xf64ab7: file ../../src/ui/tools/select-tool.cpp, line 460.<br />
Stopping if any exception is thrown:<br />
<br />
(gdb) catch throw<br />
Catchpoint 2 (throw)<br />
Stopping if a condition is met:<br />
<br />
(gdb) break ../../src/ui/tools/select-tool.cpp:629 if group_at_point == 0<br />
Breakpoint 3 at 0xf657a5: file ../../src/ui/tools/select-tool.cpp, line 629.<br />
Stopping when a memory value changes:<br />
<br />
(gdb) print desktop<br />
$2 = (SPDesktop *) 0x33a0710<br />
(gdb) awatch *0x33a0710<br />
Hardware access (read/write) watchpoint 4: *0x33a0710<br />
Listing breakpoints:<br />
<br />
(gdb) info break<br />
Num Type Disp Enb Address What<br />
1 breakpoint keep y 0x0000000000f64ab7 in Inkscape::UI::Tools::SelectTool::root_handler(_GdkEvent*) at ../../src/ui/tools/select-tool.cpp:460<br />
2 breakpoint keep y 0x00007ffff03a4a30 exception throw<br />
3 breakpoint keep y 0x0000000000f657a5 in Inkscape::UI::Tools::SelectTool::root_handler(_GdkEvent*) at ../../src/ui/tools/select-tool.cpp:629<br />
stop only if group_at_point == 0<br />
4 acc watchpoint keep y *0x33a0710<br />
Disabling breakpoints:<br />
<br />
(gdb) disable 4<br />
Deleting breakpoints:<br />
<br />
(gdb) delete 3<br />
Creating breakpoints that will only be stopped on once:<br />
<br />
(gdb) tbreak foo::bar<br />
(gdb) tcatch throw<br />
Evaluating expressions<br />
If GDB can figure out what you are talking about, it can print pretty much anything. GDB also is immune to the private boundary of a class.<br />
<br />
(gdb) print arc_context->arc<br />
$3 = (SPGenericEllipse *) 0x3afb610<br />
A handy feature to try to determine if a heap object still exists (hasn't been delete()d yet) is to use the new GDB command info vtbl:<br />
<br />
(gdb) print UXManager::getInstance()<br />
$4 = (Inkscape::UI::UXManager *) 0x3b6f1d0<br />
(gdb) info vtbl $4<br />
vtable for 'Inkscape::UI::UXManager' @ 0x136e500 (subobject @ 0x3b6f1d0):<br />
[0]: 0xbc7720 <Inkscape::UI::UXManagerImpl::~UXManagerImpl()><br />
[1]: 0xbc7740 <Inkscape::UI::UXManagerImpl::~UXManagerImpl()><br />
[2]: 0xbc81e0 <Inkscape::UI::UXManagerImpl::addTrack(SPDesktopWidget*)><br />
…<br />
Here's what a delete()d object's vtable might look like:<br />
<br />
(gdb) call 'operator delete'($4)<br />
(gdb) info vtbl $4<br />
vtable for 'Inkscape::UI::UXManager' @ 0x3f27f80 (subobject @ 0x3b6f1d0):<br />
[0]: 0x190<br />
[1]: 0x20<br />
[2]: 0x3d91db0<br />
[3]: 0x0<br />
[4]: 0x448d40 <g_free@plt><br />
…</div>2603:6011:C804:CF96:9508:8E93:D372:EC65https://freedomdefined.org/index.php?title=Logo_contest&diff=24661Logo contest2021-05-18T20:44:37Z<p>2603:6011:C804:CF96:9508:8E93:D372:EC65: (I succeeded my wife)</p>
<hr />
<div>We need a "Free Content" logo that can be attached to works covered by licenses which meet the conditions defined in the [[Definition|Free Content Definition]]. This logo should consist of:<br />
<br />
* a symbol or sign that is the same for both logos (minor variations allowed)<br />
* a label, probably "Free Content"<br />
<br />
Logos '''must''' have a vector graphics source (SVG preferred), but '''must''' be uploaded in any format (PNG preferred). A good, free software vector graphics application which can handle SVG and PNG exports is [http://www.inkscape.org/ inkscape]. The dimensions are up to you as long as the images scale well. In order for your logo to be used, the logo itself must be free content with a reduced attribution requirement, but we can work this out with you once we have picked your logo.</div>2603:6011:C804:CF96:9508:8E93:D372:EC65