testing crash
This commit is contained in:
@@ -24,6 +24,10 @@ std::mutex task_mutex;
|
||||
{
|
||||
NSSharingService *airdrop_service;
|
||||
}
|
||||
- (void)hockeyapp_crash
|
||||
{
|
||||
[[[BITHockeyManager sharedHockeyManager] crashManager] generateTestCrash];
|
||||
}
|
||||
- (void)async_lock
|
||||
{
|
||||
CGLLockContext([glctx CGLContextObj]);
|
||||
|
||||
@@ -26,4 +26,5 @@
|
||||
- (std::string)pick_file:(NSArray<NSString*>*)types;
|
||||
- (std::string)pick_dir;
|
||||
- (void)share_file:(NSString*)file_path;
|
||||
- (void)hockeyapp_crash;
|
||||
@end
|
||||
|
||||
@@ -16,6 +16,6 @@
|
||||
openURL:(NSURL *)url
|
||||
options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options;
|
||||
- (float)sonarpen_pressure;
|
||||
|
||||
- (void)hockeyapp_crash;
|
||||
@end
|
||||
|
||||
|
||||
@@ -27,6 +27,11 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
- (void)hockeyapp_crash
|
||||
{
|
||||
[[[BITHockeyManager sharedHockeyManager] crashManager] generateTestCrash];
|
||||
}
|
||||
|
||||
- (float)sonarpen_pressure
|
||||
{
|
||||
return [sonarpen_driver isPenAttached] ? [sonarpen_driver pressure] : 1.f;
|
||||
@@ -56,7 +61,7 @@
|
||||
[[BITHockeyManager sharedHockeyManager] configureWithIdentifier:@"c2dccca196294ecca8fd5d58af2738cf"];
|
||||
// Do some additional configuration if needed here
|
||||
[[BITHockeyManager sharedHockeyManager] startManager];
|
||||
[[BITHockeyManager sharedHockeyManager].authenticator authenticateInstallation];
|
||||
//[[BITHockeyManager sharedHockeyManager].authenticator authenticateInstallation];
|
||||
// sonarpen_driver = [[WTSonarPenDriver alloc] initWithApplication:application];
|
||||
// [sonarpen_driver start];
|
||||
// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(penStatusChanged) name:WTSonarPenDriverStateChangedNotification object:nil];
|
||||
|
||||
@@ -27,4 +27,5 @@
|
||||
- (void)pick_photo:(std::function<void(std::string)>) callback;
|
||||
- (void)registerForKeyboardNotifications;
|
||||
- (void)unregisterForKeyboardNotifications;
|
||||
- (void)crash;
|
||||
@end
|
||||
|
||||
@@ -42,6 +42,11 @@ NSThread* lock_thread;
|
||||
std::recursive_mutex lock_mutex;
|
||||
|
||||
@implementation GameViewController
|
||||
- (void)crash
|
||||
{
|
||||
AppDelegate* app = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
||||
[app hockeyapp_crash];
|
||||
}
|
||||
- (void)async_lock
|
||||
{
|
||||
lock_mutex.lock();
|
||||
|
||||
@@ -964,6 +964,10 @@ Here's a list of what's available in this release.
|
||||
<icon icon="bug" width="20"/>
|
||||
<text id="menu-label" text="What's new?" margin="0 0 0 5" font-face="arial" font-size="11"/>
|
||||
</button-custom>
|
||||
<button-custom id="about-crash" height="40" align="center" color=".2" pad="0 0 0 10" dir="row">
|
||||
<icon icon="bug" width="20"/>
|
||||
<text id="menu-label" text="Induce crash" margin="0 0 0 5" font-face="arial" font-size="11"/>
|
||||
</button-custom>
|
||||
</popup-menu>
|
||||
</layout>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import re, subprocess, sys
|
||||
branch = check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]).rstrip().decode("utf-8")
|
||||
shorthash = check_output(["git", "log", "--pretty=format:%h", "-n 1"]).rstrip().decode("utf-8")
|
||||
revcount = int(check_output(["git", "rev-list", "--count", "HEAD"]))
|
||||
tag = check_output(["git", "describe", "--tags", "--abbrev=0"]).rstrip().decode("utf-8")
|
||||
tag = check_output(["git", "describe", "--tags", "--abbrev=0"]).rstrip().decode("utf-8").split('-',1)[0]
|
||||
config = sys.argv[2].lower()
|
||||
|
||||
version = "%s.%d (%s-%s-%s)" % (tag, revcount, shorthash, branch, config)
|
||||
|
||||
@@ -7,7 +7,7 @@ import re, subprocess, sys
|
||||
branch = check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]).rstrip().decode("utf-8")
|
||||
shorthash = check_output(["git", "log", "--pretty=format:%h", "-n 1"]).rstrip().decode("utf-8")
|
||||
revcount = int(check_output(["git", "rev-list", "--count", "HEAD"]))
|
||||
tag = check_output(["git", "describe", "--tags", "--abbrev=0"]).rstrip().decode("utf-8")
|
||||
tag = check_output(["git", "describe", "--tags", "--abbrev=0"]).rstrip().decode("utf-8").split('-',1)[0]
|
||||
config = sys.argv[1].lower()
|
||||
|
||||
version = "%s.%d (%s-%s-%s)" % (tag, revcount, shorthash, branch, config)
|
||||
|
||||
@@ -197,6 +197,7 @@ public:
|
||||
int res_from_index(int i);
|
||||
int res_to_index(int res);
|
||||
std::string res_to_string(int res);
|
||||
void crash_test();
|
||||
|
||||
void cmd_convert(std::string pano_path, std::string out_path);
|
||||
};
|
||||
|
||||
@@ -9,6 +9,15 @@ std::string win32_open_file(const char* filter);
|
||||
std::string win32_open_dir();
|
||||
#endif
|
||||
|
||||
void App::crash_test()
|
||||
{
|
||||
#ifdef __IOS__
|
||||
[ios_view crash];
|
||||
#elif __OSX__
|
||||
[osx_view hockeyapp_crash];
|
||||
#elif __ANDROID__
|
||||
#endif
|
||||
}
|
||||
|
||||
void App::tick(float dt)
|
||||
{
|
||||
|
||||
@@ -601,6 +601,12 @@ void App::init_menu_about()
|
||||
popup->destroy();
|
||||
};
|
||||
}
|
||||
|
||||
if (auto b = popup->find<NodeButtonCustom>("about-crash"))
|
||||
b->on_click = [this](Node*) {
|
||||
LOG("crashing");
|
||||
App::I.crash_test();
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user