|
|
@@ -0,0 +1,89 @@
|
|
|
+<!DOCTYPE html> <HTML lang=en> <HEAD> <STYLE>
|
|
|
+body { background-color: #EEFFEE; font-size: 1.0rem; font-family: Arial; max-width: 50rem;
|
|
|
+ color: #000000; margin: 0px;
|
|
|
+ padding-left: 0px; padding-right: 0px; padding-top: 0px; padding-bottom: 0px; }
|
|
|
+H1 { padding-left: 10px; padding-right: 0px; padding-top: 10px; padding-bottom: 10px; font-size: 1.4rem; }
|
|
|
+H2 { padding-left: 10px; padding-right: 0px; padding-top: 10px; padding-bottom: 0px; font-size: 1.2rem; }
|
|
|
+blockquote {
|
|
|
+ color: #FFFFFF; background: #000000;
|
|
|
+ font-size: 1.2rem; font-family: monospace;
|
|
|
+ padding-left: 5px; padding-right: 5px;
|
|
|
+ padding-top: 5px; padding-bottom: 5px;
|
|
|
+}
|
|
|
+P { padding-left: 20px; padding-right: 0px; padding-top: 0px; padding-bottom: 0px; }
|
|
|
+IMG { padding-left: 0px; padding-right: 0px; padding-top: 2px; padding-bottom: 0px;
|
|
|
+ max-width: 100%; }
|
|
|
+A { display: inline; border-radius: 4px;
|
|
|
+ font-size: 1.0rem; font-family: Arial; color: #000044; text-decoration: none;
|
|
|
+ padding-left: 4px; padding-right: 4px; padding-top: 4px; padding-bottom: 4px; }
|
|
|
+A:hover { color: #FFFF00; background: #000044; }
|
|
|
+A:active { color: #FFFFFF; background: #444444; }
|
|
|
+
|
|
|
+</STYLE> </HEAD> <BODY>
|
|
|
+<IMG SRC="Images/Title.png" ALT="Images/Title.png">
|
|
|
+<P>
|
|
|
+<A href="Manual.html">Back to main page</A>
|
|
|
+</P><P>
|
|
|
+</P><H1> Troubleshooting</H1><P>
|
|
|
+</P><P>
|
|
|
+To add a compiler flag when not using an IDE, append it to COMPILER_FLAGS in your build.sh script.
|
|
|
+</P><IMG SRC="Images/Border.png"><P>
|
|
|
+</P><H2> To use or not use an IDE with a built-in debugger</H2><P>
|
|
|
+</P><P>
|
|
|
+<IMG SRC="Images/SmallDot.png">
|
|
|
+If your low-level code is crashing often from advanced optimizations,
|
|
|
+you might need an IDE with a built-in debugger to quickly show where the crash happened.
|
|
|
+The IDE integration can then directly point to the code instead of showing line numbers from a separate debugger.
|
|
|
+
|
|
|
+</P><P>
|
|
|
+<IMG SRC="Images/SmallDot.png">
|
|
|
+If your high-level code only crashes rarely but the amount of pixel data is too much for a debugger,
|
|
|
+create a debug window showing internal images or debug overlays with coordinates on top of the program's existing graphics.
|
|
|
+
|
|
|
+</P><P>
|
|
|
+</P><IMG SRC="Images/Border.png"><P>
|
|
|
+</P><H2> Finding the cause of bugs takes too long.</H2><P>
|
|
|
+</P><P>
|
|
|
+<IMG SRC="Images/SmallDot.png">
|
|
|
+Unless you are profiling, test in debug mode using the -DDEBUG compiler flag.
|
|
|
+This catches bugs earlier with more information about the crash.
|
|
|
+Make sure that the release flag -DNDEBUG is not also active.
|
|
|
+
|
|
|
+</P><P>
|
|
|
+<IMG SRC="Images/SmallDot.png">
|
|
|
+If using raw pointers, you might want to replace them with the SafePointer class to get tighter bound checks in debug mode.
|
|
|
+Debuggers will wait until your bugs write outside of the whole allocation before throwing an error.
|
|
|
+
|
|
|
+</P><P>
|
|
|
+<IMG SRC="Images/SmallDot.png">
|
|
|
+Make sure that all your multi-threading can be turned off easily when finding the root cause.
|
|
|
+
|
|
|
+</P><P>
|
|
|
+<IMG SRC="Images/SmallDot.png">
|
|
|
+Create a basic reference implementation without dangerous optimizations for every advanced feature.
|
|
|
+Both for finding the cause of instability and being able to remove a feature without sending emergency patches in panic with more bugs.
|
|
|
+Image filters are first written using lambdas returning the color of a pixel based on the pixel coordinate and exception-free pixel sampling.
|
|
|
+Then one can make an optimized version using SafePointer and SIMD vectors.
|
|
|
+
|
|
|
+</P><P>
|
|
|
+</P><IMG SRC="Images/Border.png"><P>
|
|
|
+</P><H2> Getting crashes after linking to an external library.</H2><P>
|
|
|
+</P><P>
|
|
|
+<IMG SRC="Images/SmallDot.png">
|
|
|
+Try adding the -DDISABLE_ALLOCATOR compiler flag.
|
|
|
+This will disable the library's memory recycling at DFPSR/base/allocator.cpp in case that another library already has a memory recycler.
|
|
|
+
|
|
|
+</P><P>
|
|
|
+</P><IMG SRC="Images/Border.png"><P>
|
|
|
+
|
|
|
+</P><P>
|
|
|
+</P><H2> Getting linker errors when creating a new project without a window.</H2><P>
|
|
|
+</P><P>
|
|
|
+<IMG SRC="Images/SmallDot.png">
|
|
|
+Linking to a window manager without using it may cause linker errors because the renderer library makes a call to outside of the library.
|
|
|
+The solution is to use WINDOW_MANAGER=NONE in build.sh or include NoWindow.cpp manually in your project instead of the system's actual window manager.
|
|
|
+
|
|
|
+</P><P>
|
|
|
+</P><IMG SRC="Images/Border.png"><P>
|
|
|
+</P>
|
|
|
+</BODY> </HTML>
|