Skip to content
Snippets Groups Projects
  1. Jul 21, 2020
  2. Mar 25, 2020
  3. Sep 07, 2018
  4. Sep 05, 2018
  5. May 21, 2018
  6. Nov 30, 2016
  7. Nov 23, 2016
  8. Nov 17, 2016
  9. Nov 03, 2016
  10. Sep 07, 2016
  11. Aug 17, 2016
    • Nat Goodspeed's avatar
      MAINT-5011: Catch kdu_exception (aka int) in case it leaks out. · 0eac1f41
      Nat Goodspeed authored
      KDU internally throws kdu_exception, which is a typedef for int. It's possible
      that such an exception might leak out.
      
      Our usual strategy for unknown exceptions is to catch (...) and let
      boost::current_exception_diagnostic_information() handle them. However, for
      int (or a class not derived from std::exception), that function will only
      shrug and report no information available.
      
      Besides, we want to format kdu_exception specially anyway. First, the KDU
      #defines are in hex, so we should report the value in hex. But on inspection,
      certain of those hex values are actually multibyte ASCII literals in disguise
      -- so also report the byte string value.
      0eac1f41
    • Nat Goodspeed's avatar
      MAINT-5011: Derive image-load exceptions from LLContinueError. · 83eb9600
      Nat Goodspeed authored
      Failure to load an image shouldn't crash the whole viewer.
      83eb9600
    • Nat Goodspeed's avatar
      MAINT-5011: Try to enrich catch (...) logging throughout viewer. · 993f54f6
      Nat Goodspeed authored
      Turns out we have a surprising number of catch (...) clauses in the viewer
      code base. If all we currently do is
      
          LL_ERRS() << "unknown exception" << LL_ENDL;
      
      then call CRASH_ON_UNHANDLED_EXCEPTION() instead. If what we do is
      
          LL_WARNS() << "unknown exception" << LL_ENDL;
      
      then call LOG_UNHANDLED_EXCEPTION() instead.
      
      Since many places need LOG_UNHANDLED_EXCEPTION() and nobody catches
      LLContinueError yet, eliminate LLContinueError& parameter from
      LOG_UNHANDLED_EXCEPTION(). This permits us to use the same log message as
      CRASH_ON_UNHANDLED_EXCEPTION(), just with a different severity level.
      
      Where a catch (...) clause actually provides contextual information, or makes
      an error string, add boost::current_exception_diagnostic_information() to try
      to figure out actual exception class and message.
      993f54f6
    • Nat Goodspeed's avatar
    • Nat Goodspeed's avatar
      MAINT-5011: Use LLTHROW() instead of plain BOOST_THROW_EXCEPTION(). · 5e9d2f57
      Nat Goodspeed authored
      A level of preprocessor indirection lets us later change the implementation if
      desired.
      5e9d2f57
  12. Aug 06, 2016
    • Nat Goodspeed's avatar
      MAINT-6584: Don't crash on inconsistent dims in a JPEG-2000 image. · 1773f44b
      Nat Goodspeed authored
      Previous code would crump with LL_ERRS. But a bad image file should fail only
      the image load -- not crash the viewer.
      
      While at it, validate all components present, not just 0, 1, 2.
      
      While at it, make the failure message report which component and what the
      mismatched dimensions are, not just "Components don't have matching
      dimensions!"
      1773f44b
  13. Aug 05, 2016
  14. Aug 04, 2016
    • Nat Goodspeed's avatar
      MAINT-6584: Comment out completely unused LLImageJ2CKDU code. · 2ce38c3c
      Nat Goodspeed authored
      The only call to the findDiscardLevelsBoundaries() method was commented out
      inside initDecode(), with a comment:
              // Merov : Test!! DO NOT COMMIT!!
      
      This was the only caller of copy_tile(), which was the only caller of
      copy_block(). Commented out all three of these (biggish!) functions, since I
      have no idea what any of them were supposed to do or when it might be useful
      to call them. In other words, I can't yet rule out the possibility that I
      might have to uncomment them.
      2ce38c3c
  15. Jul 26, 2016
  16. Aug 03, 2016
    • Nat Goodspeed's avatar
      MAINT-6584: Use RAII classes to manage helper object lifespans. · 03bff896
      Nat Goodspeed authored
      Use boost::scoped_ptr instead of raw pointers to LLKDUMemSource,
      LLKDUDecodeState, kdu_coords and kdu_dims so cleanup is simpler, and automated
      on destruction of LLImageJ2CKDU.
      
      Replace pointer to kdu_codestream with a custom RAII class. kdu_codestream is
      itself an opaque handle, so we don't need to add another layer of indirection.
      Just wrap it to ensure its destroy() method is reliably called when needed.
      
      Make static instances of LLKDUMessageWarning and LLKDUMessageError
      self-register, eliminating the companion static bool and explicit checks in
      code.
      03bff896
  17. Jul 22, 2016
  18. Jul 21, 2016
    • Nat Goodspeed's avatar
      MAINT-6584: Streamline static LLImageJ2C implementation API. · 71b593e8
      Nat Goodspeed authored
      Specifically, remove unused function pointer types CreateLLImageJ2CFunction,
      DestroyLLImageJ2CFunction and EngineInfoLLImageJ2CFunction.
      
      Also eliminate static fallbackDestroyLLImageJ2CImpl() and
      fallbackEngineInfoLLImageJ2CImpl(), leaving only static
      fallbackCreateLLImageJ2CImpl().
      
      We do need a factory function to instantiate the appropriate LLImageJ2CImpl
      subclass, so leave the fallbackCreateLLImageJ2CImpl() link seam in place.
      
      However, given that every known LLImageJ2CImpl subclass is cheap to
      instantiate, make getEngineInfo() a pure virtual method on that subclass: the
      static LLImageJ2C::getEngineInfo() method can temporarily construct an
      instance to query. While we're at it, make getEngineInfo() return std::string
      like LLImageJ2C::getEngineInfo(). It's ridiculous that
      fallbackEngineInfoLLImageJ2CImpl() implementations constructed a static
      std::string and returned its c_str(), only to have LLImageJ2C::getEngineInfo()
      construct ANOTHER std::string from the returned const char*.
      
      fallbackDestroyLLImageJ2CImpl() never did anything useful: it merely deleted
      the passed LLImageJ2CImpl subclass pointer as the specific subclass type. But
      since LLImageJ2CImpl's destructor is virtual, LLImageJ2C's destructor could
      simply delete the stored LLImageJ2CImpl*. In fact, make mImpl a
      boost::scoped_ptr<LLImageJ2CImpl> so we don't even have to delete it manually.
      71b593e8
    • Nat Goodspeed's avatar
      DRTVWR-427: Remove engineInfoLLImageJ2CKDU(), createLLImageJ2CKDU(), · f09a92f1
      Nat Goodspeed authored
      destroyLLImageJ2CKDU().
      
      These were apparently intended as simple C-style DLL entry points. But as
      nobody calls them, and as we decided against building the viewer from DLLs,
      they only clutter the code.
      f09a92f1
  19. Jul 19, 2016
    • Nat Goodspeed's avatar
      MAINT-5011: Introduce LLException base class for viewer exceptions. · 9c49a6c9
      Nat Goodspeed authored
      This also introduces LLContinueError for exceptions which should interrupt
      some part of viewer processing (e.g. the current coroutine) but should attempt
      to let the viewer session proceed.
      
      Derive all existing viewer exception classes from LLException rather than from
      std::runtime_error or std::logic_error.
      
      Use BOOST_THROW_EXCEPTION() rather than plain 'throw' to enrich the thrown
      exception with source file, line number and containing function.
      9c49a6c9
  20. Jul 14, 2016
  21. Jul 13, 2016
  22. May 05, 2016
  23. Apr 26, 2016
  24. Apr 25, 2016
    • Nat Goodspeed's avatar
      DRTVWR-418: Fix indra/llkdu wrapper for changes in KDU 7.8 API. · a0052fac
      Nat Goodspeed authored
      KDU 7.8 introduces a number of changes to its API, most notably by moving
      public symbols into a variety of kdu_something namespaces. While this is
      laudable in a general sense, it does require quite a bit of diagnostic
      building and patching to update legacy code.
      
      Since llimagej2ckdu_test.cpp lamentably stubs out pretty much the entire KDU
      API, we must also fix those stubs for signature changes even to functions we
      don't otherwise reference.
      
      NOTE: This commit still leaves four symbols undefined. Below I have taken the
      liberty of juxtaposing the error line with the output from dumpbin /exports
      build-vc120/packages/lib/release/kdu.lib. I see no differences.
      
      unresolved symbol (?kdu_convert_ycc_to_rgb_rev16@kdu_core@@3P6AXPAF00H@ZA)   "void (__cdecl* kdu_core::kdu_convert_ycc_to_rgb_rev16)(short *,short *,short *,int)"
                         ?kdu_convert_ycc_to_rgb_rev16@kdu_core@@3P6AXPAF00H@ZA    (void (__cdecl* kdu_core::kdu_convert_ycc_to_rgb_rev16)(short *,short *,short *,int))
      unresolved symbol (?kdu_convert_ycc_to_rgb_irrev16@kdu_core@@3P6AXPAF00H@ZA) "void (__cdecl* kdu_core::kdu_convert_ycc_to_rgb_irrev16)(short *,short *,short *,int)"
                         ?kdu_convert_ycc_to_rgb_irrev16@kdu_core@@3P6AXPAF00H@ZA  (void (__cdecl* kdu_core::kdu_convert_ycc_to_rgb_irrev16)(short *,short *,short *,int))
      unresolved symbol (?kdu_convert_ycc_to_rgb_rev32@kdu_core@@3P6AXPAH00H@ZA)   "void (__cdecl* kdu_core::kdu_convert_ycc_to_rgb_rev32)(int *,int *,int *,int)"
                         ?kdu_convert_ycc_to_rgb_rev32@kdu_core@@3P6AXPAH00H@ZA    (void (__cdecl* kdu_core::kdu_convert_ycc_to_rgb_rev32)(int *,int *,int *,int))
      unresolved symbol (?kdu_convert_ycc_to_rgb_irrev32@kdu_core@@3P6AXPAM00H@ZA) "void (__cdecl* kdu_core::kdu_convert_ycc_to_rgb_irrev32)(float *,float *,float *,int)"
                         ?kdu_convert_ycc_to_rgb_irrev32@kdu_core@@3P6AXPAM00H@ZA  (void (__cdecl* kdu_core::kdu_convert_ycc_to_rgb_irrev32)(float *,float *,float *,int))
      24>C:\Users\Nat\linden\viewer64\build-vc120\newview\RelWithDebInfo\secondlife-bin.exe : fatal error LNK1120: 4 unresolved externals
      a0052fac
  25. Apr 14, 2016
  26. Apr 12, 2016
  27. Apr 08, 2016
  28. Apr 07, 2016
  29. Nov 10, 2015
Loading