Skip to content

Commit 7494c8d

Browse files
committed
Merge branch 'hotfix/crashonstart'
2 parents 9f33643 + 014d7b4 commit 7494c8d

File tree

11 files changed

+67
-38
lines changed

11 files changed

+67
-38
lines changed

Builds/MacOSX/Info-App.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
<key>CFBundleSignature</key>
1919
<string>????</string>
2020
<key>CFBundleShortVersionString</key>
21-
<string>2.9.0.3</string>
21+
<string>2.9.1.1</string>
2222
<key>CFBundleVersion</key>
23-
<string>2.9.0.3</string>
23+
<string>2.9.1.1</string>
2424
<key>NSHumanReadableCopyright</key>
2525
<string></string>
2626
<key>NSHighResolutionCapable</key>

Builds/MacOSX/MIDI2LR.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@
281281
"U_STATIC_IMPLEMENTATION=1",
282282
"GSL_THROW_ON_CONTRACT_VIOLATION=1",
283283
"JUCER_XCODE_MAC_F6D2F4CF=1",
284-
"JUCE_APP_VERSION=2.9.0.3",
285-
"JUCE_APP_VERSION_HEX=0x2090003",
284+
"JUCE_APP_VERSION=2.9.1.1",
285+
"JUCE_APP_VERSION_HEX=0x2090101",
286286
"JucePlugin_Build_VST=0",
287287
"JucePlugin_Build_VST3=0",
288288
"JucePlugin_Build_AU=0",
@@ -316,8 +316,8 @@
316316
"U_STATIC_IMPLEMENTATION=1",
317317
"GSL_UNENFORCED_ON_CONTRACT_VIOLATION=1",
318318
"JUCER_XCODE_MAC_F6D2F4CF=1",
319-
"JUCE_APP_VERSION=2.9.0.3",
320-
"JUCE_APP_VERSION_HEX=0x2090003",
319+
"JUCE_APP_VERSION=2.9.1.1",
320+
"JUCE_APP_VERSION_HEX=0x2090101",
321321
"JucePlugin_Build_VST=0",
322322
"JucePlugin_Build_VST3=0",
323323
"JucePlugin_Build_AU=0",

Builds/VisualStudio2017/MIDI2LR_App.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
<Optimization>Disabled</Optimization>
7676
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
7777
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;../../;../../icu/source/common/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
78-
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;U_STATIC_IMPLEMENTATION=1;GSL_THROW_ON_CONTRACT_VIOLATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=2.9.0.3;JUCE_APP_VERSION_HEX=0x2090003;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
78+
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;U_STATIC_IMPLEMENTATION=1;GSL_THROW_ON_CONTRACT_VIOLATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=2.9.1.1;JUCE_APP_VERSION_HEX=0x2090101;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
7979
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
8080
<RuntimeTypeInfo>true</RuntimeTypeInfo>
8181
<PrecompiledHeader/>
@@ -116,7 +116,7 @@
116116
<ClCompile>
117117
<Optimization>Full</Optimization>
118118
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;../../;../../icu/source/common/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
119-
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;U_STATIC_IMPLEMENTATION=1;GSL_UNENFORCED_ON_CONTRACT_VIOLATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=2.9.0.3;JUCE_APP_VERSION_HEX=0x2090003;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
119+
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;U_STATIC_IMPLEMENTATION=1;GSL_UNENFORCED_ON_CONTRACT_VIOLATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=2.9.1.1;JUCE_APP_VERSION_HEX=0x2090101;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
120120
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
121121
<RuntimeTypeInfo>true</RuntimeTypeInfo>
122122
<PrecompiledHeader/>

Builds/VisualStudio2017/resources.rc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
#include <windows.h>
88

99
VS_VERSION_INFO VERSIONINFO
10-
FILEVERSION 2,9,0,3
10+
FILEVERSION 2,9,1,1
1111
BEGIN
1212
BLOCK "StringFileInfo"
1313
BEGIN
1414
BLOCK "040904E4"
1515
BEGIN
1616
VALUE "FileDescription", "MIDI2LR\0"
17-
VALUE "FileVersion", "2.9.0.3\0"
17+
VALUE "FileVersion", "2.9.1.1\0"
1818
VALUE "ProductName", "MIDI2LR\0"
19-
VALUE "ProductVersion", "2.9.0.3\0"
19+
VALUE "ProductVersion", "2.9.1.1\0"
2020
END
2121
END
2222

DoxyGen/Midi2lr.Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = MIDI2LR
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 2.9.0.3
41+
PROJECT_NUMBER = 2.9.1.1
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

Installer/MIDI2LR.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<project>
22
<shortName>MIDI2LR</shortName>
33
<fullName>MIDI2LR</fullName>
4-
<version>2.9.0.3</version>
4+
<version>2.9.1.1</version>
55
<readmeFile>../Source/LRPlugin/ReadMe.txt</readmeFile>
66
<licenseFile>../LICENSE.txt</licenseFile>
77
<htmlLicenseFile>LICENSE.html</htmlLicenseFile>

JuceLibraryCode/JuceHeader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
namespace ProjectInfo
3535
{
3636
const char* const projectName = "MIDI2LR";
37-
const char* const versionString = "2.9.0.3";
38-
const int versionNumber = 0x2090003;
37+
const char* const versionString = "2.9.1.1";
38+
const int versionNumber = 0x2090101;
3939
}
4040
#endif

MIDI2LR.jucer

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<JUCERPROJECT id="jqaeel" name="MIDI2LR" projectType="guiapp" version="2.9.0.3"
3+
<JUCERPROJECT id="jqaeel" name="MIDI2LR" projectType="guiapp" version="2.9.1.1"
44
bundleIdentifier="com.rsjaffe.MIDI2LR" includeBinaryInAppConfig="1"
55
jucerVersion="5.2.1" companyWebsite="http://rsjaffe.github.io/MIDI2LR/"
66
companyEmail="rsjaffe@gmail.com" displaySplashScreen="0" reportAppUsage="0"

Source/DebugInfo.cpp

Lines changed: 49 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ MIDI2LR. If not, see <http://www.gnu.org/licenses/>.
3131
// https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-language-pack-default-values
3232
namespace {
3333
#pragma warning(suppress : 26426)
34-
std::unordered_map<int, std::string> keyboard_names{{0x0000041c, "Albanian"},
35-
{0x00000401, "Arabic (101)"}, {0x00010401, "Arabic (102)"},
34+
static const std::unordered_map<unsigned long int, std::string> keyboard_names{
35+
{0x0000041c, "Albanian"}, {0x00000401, "Arabic (101)"}, {0x00010401, "Arabic (102)"},
3636
{0x00020401, "Arabic (102) AZERTY"}, {0x0000042b, "Armenian Eastern"},
3737
{0x0002042b, "Armenian Phonetic"}, {0x0003042b, "Armenian Typewriter"},
3838
{0x0001042b, "Armenian Western"}, {0x0000044d, "Assamese - Inscript"},
@@ -128,31 +128,60 @@ std::string rsj::GetKeyboardLayout()
128128
static_assert(sizeof(CHAR) == sizeof(char), "Windows CHAR and char different sizes.");
129129
std::array<CHAR, KL_NAMELENGTH> klid_ascii{};
130130
if (GetKeyboardLayoutNameA(klid_ascii.data())) {
131-
size_t pos{0};
132-
const auto klid{std::stoi(std::string(klid_ascii.data()), &pos, 16)};
133-
if (const auto f = keyboard_names.find(klid); f != keyboard_names.end())
134-
return f->second;
135-
return "KLID 0x"s + klid_ascii.data() + " not found in list of names"s;
131+
try {
132+
size_t pos{0};
133+
const auto klid{std::stoul(std::string(klid_ascii.data()), &pos, 16)};
134+
if (const auto f = keyboard_names.find(klid); f != keyboard_names.end())
135+
return f->second;
136+
return "KLID not in keyboard_names: 0x"s + klid_ascii.data();
137+
}
138+
catch (...) {
139+
return "Exception when finding KLID name. KLID: 0x"s + klid_ascii.data();
140+
}
136141
}
137-
return "unable to get KLID"s;
142+
return "Unable to get KLID. Error "s + std::to_string(GetLastError()) + "."s;
138143
}
139144
#endif
140145

141146
DebugInfo::DebugInfo() noexcept
142147
{
143-
using namespace std::string_literals;
144-
info_.emplace_back("System language "s + juce::SystemStats::getDisplayLanguage().toStdString());
145-
info_.emplace_back("Version "s + ProjectInfo::versionString);
146-
info_.emplace_back("App path "s
147-
+ juce::File::getSpecialLocation(juce::File::currentApplicationFile)
148-
.getFullPathName()
149-
.toStdString());
150-
info_.emplace_back("Keyboard type "s + rsj::GetKeyboardLayout());
148+
try {
149+
using namespace std::string_literals;
150+
info_.emplace_back(
151+
"System language "s + juce::SystemStats::getDisplayLanguage().toStdString());
152+
info_.emplace_back("Version "s + ProjectInfo::versionString);
153+
info_.emplace_back("App path "s
154+
+ juce::File::getSpecialLocation(juce::File::currentApplicationFile)
155+
.getFullPathName()
156+
.toStdString());
157+
info_.emplace_back("Keyboard type "s + rsj::GetKeyboardLayout());
158+
}
159+
catch (...) {
160+
try {
161+
info_.emplace_back("Failed to obtain app info. Exception.");
162+
}
163+
catch (...) {
164+
}
165+
}
151166
}
167+
namespace {
168+
// placing kErrorNotice here instead of in exception handler so that handler doesn't have any
169+
// chance of throwing another exception
170+
static const std::string kErrorNotice{"Exception in GetInfo."};
171+
} // namespace
152172

153-
std::string const* DebugInfo::GetInfo()
173+
const std::string* DebugInfo::GetInfo() noexcept
154174
{
155-
if (iterate_ >= info_.size())
156-
return nullptr;
157-
return &info_.at(iterate_++);
175+
try {
176+
if (iterate_ >= info_.size())
177+
return nullptr;
178+
return &info_.at(iterate_++);
179+
}
180+
catch (...) {
181+
static auto second_time{false};
182+
if (second_time)
183+
return nullptr;
184+
second_time = true;
185+
return &kErrorNotice;
186+
}
158187
}

Source/DebugInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class DebugInfo {
3333
{
3434
iterate_ = 0;
3535
}
36-
std::string const* GetInfo();
36+
const std::string* GetInfo() noexcept;
3737

3838
private:
3939
std::vector<std::string> info_;

Source/LRPlugin/MIDI2LR.lrplugin/Info.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ return {
7070
},
7171

7272
},
73-
VERSION = { major=2, minor=9, revision=0, build=2}
73+
VERSION = { major=2, minor=9, revision=1, build=1}
7474
}

0 commit comments

Comments
 (0)