Announcement

Collapse
No announcement yet.

[Plugin] Myo

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Originally posted by Atutahi View Post
    Hello again !

    I've spotted another problem : once packaged, my game crashed on startup. So I tried debugging the exe through VisualStudio (in DebugGame configuration), and there's an unhandled exception thrown here :

    File : Hub_impl.hpp
    Code:
    Hub::Hub(const std::string& applicationIdentifier)
    : _hub(0)
    , _myos()
    , _listeners()
    {
    	libmyo_error_details_t _error;
    	libmyo_init_hub(&_hub, applicationIdentifier.c_str(), &_error);
    
    	switch (libmyo_error_kind(_error)) {
    		case libmyo_error:
    		case libmyo_error_runtime:
    		case libmyo_error_invalid_argument:
    		{
    			lastInitCausedError = true;
    			break;
    		}
    		case libmyo_success:
    		{
    			lastInitCausedError = false;
    			break;
    		}
    	}
    }
    It turns out libmyo_init_hub, even through returning libmyo_success, was leaving _error uninitialized, quite strange...From there I added a check to know if the function executed successfully and now the packaged game works like a charm !
    Code:
    	libmyo_result_t res = libmyo_init_hub(&_hub, applicationIdentifier.c_str(), &_error);
    	
    	if (res == libmyo_success) {
    		lastInitCausedError = false;
    	}
    	else {
    		switch (libmyo_error_kind(_error)) {
                            /* ... */
    		}
    	}
    When searching about the issue I stumbled upon this topic where you discussed this part of the code. I suppose we should notify Thalmic devs about this as they seem unaware of it.


    About my previous issue (compiling a blueprint with a MyoComponent causes UE Editor to crash), I managed to compile after quitting MyoConnect. I can then restart MyoConnect and it works as intended. But if I try to recompile or even move the blueprint instance in the level, the crash comes back. My log file ends abruplty after quite a struggle it seems :


    I don't know if it's possible to debug a crash in the Editor, so I'm a little stuck. I'll see want I can do !
    Interesting issues, GJ on debugging things. To debug editor, just press F5 on your C++ project solution and it will compile and run the editor in debug mode. Then it will catch the stack when you hit an error.

    Will be looking into the myo plugin again around the time 4.11 comes out in the meantime if you find solutions post pull requests on github and I'll merge them.

    Leave a comment:


  • replied
    Hello again !

    I've spotted another problem : once packaged, my game crashed on startup. So I tried debugging the exe through VisualStudio (in DebugGame configuration), and there's an unhandled exception thrown here :

    File : Hub_impl.hpp
    Code:
    Hub::Hub(const std::string& applicationIdentifier)
    : _hub(0)
    , _myos()
    , _listeners()
    {
    	libmyo_error_details_t _error;
    	libmyo_init_hub(&_hub, applicationIdentifier.c_str(), &_error);
    
    	switch (libmyo_error_kind(_error)) {
    		case libmyo_error:
    		case libmyo_error_runtime:
    		case libmyo_error_invalid_argument:
    		{
    			lastInitCausedError = true;
    			break;
    		}
    		case libmyo_success:
    		{
    			lastInitCausedError = false;
    			break;
    		}
    	}
    }
    It turns out libmyo_init_hub, even through returning libmyo_success, was leaving _error uninitialized, quite strange...From there I added a check to know if the function executed successfully and now the packaged game works like a charm !
    Code:
    	libmyo_result_t res = libmyo_init_hub(&_hub, applicationIdentifier.c_str(), &_error);
    	
    	if (res == libmyo_success) {
    		lastInitCausedError = false;
    	}
    	else {
    		switch (libmyo_error_kind(_error)) {
                            /* ... */
    		}
    	}
    When searching about the issue I stumbled upon this topic where you discussed this part of the code. I suppose we should notify Thalmic devs about this as they seem unaware of it.


    About my previous issue (compiling a blueprint with a MyoComponent causes UE Editor to crash), I managed to compile after quitting MyoConnect. I can then restart MyoConnect and it works as intended. But if I try to recompile or even move the blueprint instance in the level, the crash comes back. My log file ends abruplty after quite a struggle it seems :
    [2016.03.21-16.06.05:168][778]LogEditorViewport: Clicking on Actor (LMB): BPMyoManager_C (BPMyoManager)
    [2016.03.21-16.06.06:267][906]MyoPluginLog: Myo Hub Shutdown.
    [2016.03.21-16.06.06:267][906]LogClass: InterfaceDelegate passed: BPMyoManager_41
    [2016.03.21-16.06.06:268][906]MyoPluginLog: Myo Hub Initialized.
    [2016.03.21-16.06.06:269][906]MyoPluginLog: Myo Delegate Set (should only be called once per begin play or you have duplicates).
    [2016.03.21-16.06.06:270][906]MyoPluginLog: Myo Hub Shutdown.
    [2016.03.21-16.06.06:270][906]LogClass: InterfaceDelegate passed: BPMyoManager_41
    [2016.03.21-16.06.06:271][906]MyoPluginLog: Myo Hub Initialized.
    [2016.03.21-16.06.06:271][906]MyoPluginLog: Myo Delegate Set (should only be called once per begin play or you have duplicates).
    [2016.03.21-16.06.06:286][908]MyoPluginLog: Myo Hub Shutdown.
    [2016.03.21-16.06.06:287][908]LogClass: InterfaceDelegate passed: BPMyoManager_41
    [2016.03.21-16.06.06:288][908]MyoPluginLog: Myo Hub Initialized.
    [2016.03.21-16.06.06:288][908]MyoPluginLog: Myo Delegate Set (should only be called once per begin play or you have duplicates).
    [2016.03.21-16.06.06:289][908]MyoPluginLog: Myo Hub Shutdown.
    [2016.03.21-16.06.06:
    I don't know if it's possible to debug a crash in the Editor, so I'm a little stuck. I'll see want I can do !
    Last edited by Atutahi; 03-21-2016, 12:23 PM.

    Leave a comment:


  • replied
    Hi there !
    The plugin is working really well, I'm having tons of fun with this, thanks for that ! However I can't compile Blueprints that have a Myo Component attached. I tried to compile the same Blueprint after quitting MyoConnect and it seems to work. Any idea what could cause this ?

    Leave a comment:


  • replied
    Originally posted by BlueZink View Post
    Hello Community and thank you getnamo for this plugin!

    Currently i'm studing Interactiondesign and working on an invention project. We want to use Unreal for a little prototype and want to use a Myo to interact with. But we have some problems with the "Myo Orientation Roll". We want to use it to change the angle of an UMG image to navigate through a radial Interface. But the input value jumps random to another value. We can't fix it yet so we decided to ask you guys if there is same hope. (We've tested it with the Mouse input and it works fine).

    Thank you all!

    [ATTACH=CONFIG]75150[/ATTACH]
    Your roll may be defined by the space you're sampling it from (Myo space) and may have the -180->180 flip at the wrong point. Consider using the Calibrate Myo function which will calibrate all your input based on where you specify your forward direction. Optionally just use difference values.

    Leave a comment:


  • replied
    Hello Community and thank you getnamo for this plugin!

    Currently i'm studing Interactiondesign and working on an invention project. We want to use Unreal for a little prototype and want to use a Myo to interact with. But we have some problems with the "Myo Orientation Roll". We want to use it to change the angle of an UMG image to navigate through a radial Interface. But the input value jumps random to another value. We can't fix it yet so we decided to ask you guys if there is same hope. (We've tested it with the Mouse input and it works fine).

    Thank you all!

    Click image for larger version

Name:	myoProblem.PNG
Views:	1
Size:	173.8 KB
ID:	1099077

    Leave a comment:


  • replied
    Update to 0.7.14
    -Synced binaries with UE4.10

    Re-architecture pushed til later, Enjoy the update!

    Leave a comment:


  • replied
    Originally posted by sarkawt909 View Post
    will it be a compiled version for 4.10
    The plugin is overdue for a light overhaul, but I might be able to squeeze in a simple recompile during the week.

    Leave a comment:


  • replied
    will it be a compiled version for 4.10

    Leave a comment:


  • replied
    Update to 0.7.13
    -Updated to work with myo connect 1.0. The pitch/roll are now correctly
    reversed
    -Code fixes for UE4.9 compile

    Originally posted by AlessioMorosini View Post
    Hi getnamo,
    first I thank you for all these plugins!
    I have just downloaded the new version of Unreal, the 4.9.2....and clearly plugin doesn't work.
    Do you think you will fix it?
    'cause I'm kind of doing the thesis on it, and I need to know..
    otherwise I will just use Unreal 4.8

    Thanks so much

    LauraF
    Just pushed a 4.9 update, find it in the usual place. Note that you always have the source and can recompile the plugin yourself at any time.

    Originally posted by savantguarde View Post
    Still getting this one with all latest. Any ideas or anyone managed to get packaged builds to work?
    Haven't had a chance to look at these issues, will have a look at them + architecture change and Motion Controller support after mid november.

    Leave a comment:


  • replied
    Hi getnamo,
    first I thank you for all these plugins!
    I have just downloaded the new version of Unreal, the 4.9.2....and clearly plugin doesn't work.
    Do you think you will fix it?
    'cause I'm kind of doing the thesis on it, and I need to know..
    otherwise I will just use Unreal 4.8

    Thanks so much

    LauraF

    Leave a comment:


  • replied
    Still getting this error with all latest.

    Originally posted by Cupit View Post
    I use this plugin in 4.8 ,just by blueprint .It runs ok in editor But can not run after package . Crashed !Anyone can help me ?
    Fatal error!



    myo64.dll {0x000007fecac41ae0} + 0 bytes
    myoPluginTest.exe!DataCollector::Startup() {0x0000000141fef41e} + 138 bytes [d:\users\wujiankun\documents\unreal projects\myoplugintest\pl
    myoPluginTest.exe!FMyoPlugin::SetDelegate() {0x0000000141feef9a} + 0 bytes [d:\users\wujiankun\documents\unreal projects\myoplugintest\pl
    myoPluginTest.exe!MyoDelegate::MyoStartup() {0x0000000141ff707d} + 0 bytes [d:\users\wujiankun\documents\unreal projects\myoplugintest\pl
    myoPluginTest.exe!MyoDelegateBlueprint::MyoStartup() {0x0000000141ff8222} + 0 bytes [d:\users\wujiankun\documents\unreal projects\myoplugintest\pl
    myoPluginTest.exe!AWorldSettings::NotifyBeginPlay() {0x000000013fd027fd} + 0 bytes
    myoPluginTest.exe!AGameMode::HandleMatchHasStarted() {0x000000013fe68032} + 0 bytes
    myoPluginTest.exe!AGameMode::SetMatchState() {0x000000013fe83be0} + 0 bytes
    myoPluginTest.exe!UWorld::BeginPlay() {0x000000013fcdc0ce} + 0 bytes
    myoPluginTest.exe!UEngine::LoadMap() {0x000000013fbe70a8} + 0 bytes
    myoPluginTest.exe!UEngine::Browse() {0x000000013fb8cd6e} + 0 bytes
    myoPluginTest.exe!UGameInstance::StartGameInstance() {0x000000013fe87683} + 0 bytes
    myoPluginTest.exe!UGameEngine::Init() {0x000000013fe69b0b} + 0 bytes
    myoPluginTest.exe!FEngineLoop::Init() {0x000000013f280b15} + 0 bytes
    myoPluginTest.exe!GuardedMain() {0x000000013f27fed8} + 0 bytes
    myoPluginTest.exe!GuardedMainWrapper() {0x000000013f28020a} + 0 bytes
    myoPluginTest.exe!WinMain() {0x000000013f2930e9} + 0 bytes
    myoPluginTest.exe!__tmainCRTStartup() {0x0000000142300c95} + 21 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]
    kernel32.dll {0x00000000774b59cd} + 0 bytes
    ntdll.dll {0x00000000775eb981} + 0 bytes
    ntdll.dll {0x00000000775eb981} + 0 bytes

    Still getting this one with all latest. Any ideas or anyone managed to get packaged builds to work?

    Leave a comment:


  • replied
    Originally posted by Cupit View Post
    I use this plugin in 4.8 ,just by blueprint .It runs ok in editor But can not run after package . Crashed !Anyone can help me ?
    Fatal error!



    myo64.dll {0x000007fecac41ae0} + 0 bytes
    myoPluginTest.exe!DataCollector::Startup() {0x0000000141fef41e} + 138 bytes [d:\users\wujiankun\documents\unreal projects\myoplugintest\pl
    myoPluginTest.exe!FMyoPlugin::SetDelegate() {0x0000000141feef9a} + 0 bytes [d:\users\wujiankun\documents\unreal projects\myoplugintest\pl
    myoPluginTest.exe!MyoDelegate::MyoStartup() {0x0000000141ff707d} + 0 bytes [d:\users\wujiankun\documents\unreal projects\myoplugintest\pl
    myoPluginTest.exe!MyoDelegateBlueprint::MyoStartup() {0x0000000141ff8222} + 0 bytes [d:\users\wujiankun\documents\unreal projects\myoplugintest\pl
    myoPluginTest.exe!AWorldSettings::NotifyBeginPlay() {0x000000013fd027fd} + 0 bytes
    myoPluginTest.exe!AGameMode::HandleMatchHasStarted() {0x000000013fe68032} + 0 bytes
    myoPluginTest.exe!AGameMode::SetMatchState() {0x000000013fe83be0} + 0 bytes
    myoPluginTest.exe!UWorld::BeginPlay() {0x000000013fcdc0ce} + 0 bytes
    myoPluginTest.exe!UEngine::LoadMap() {0x000000013fbe70a8} + 0 bytes
    myoPluginTest.exe!UEngine::Browse() {0x000000013fb8cd6e} + 0 bytes
    myoPluginTest.exe!UGameInstance::StartGameInstance() {0x000000013fe87683} + 0 bytes
    myoPluginTest.exe!UGameEngine::Init() {0x000000013fe69b0b} + 0 bytes
    myoPluginTest.exe!FEngineLoop::Init() {0x000000013f280b15} + 0 bytes
    myoPluginTest.exe!GuardedMain() {0x000000013f27fed8} + 0 bytes
    myoPluginTest.exe!GuardedMainWrapper() {0x000000013f28020a} + 0 bytes
    myoPluginTest.exe!WinMain() {0x000000013f2930e9} + 0 bytes
    myoPluginTest.exe!__tmainCRTStartup() {0x0000000142300c95} + 21 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]
    kernel32.dll {0x00000000774b59cd} + 0 bytes
    ntdll.dll {0x00000000775eb981} + 0 bytes
    ntdll.dll {0x00000000775eb981} + 0 bytes

    @getnamo:

    Still seeing this same issue with a Windows 64-bit packaged build using MyoPlugin 0.7.12, latest MyoConnect (0.15.0) and latest Myo firmware (1.4.1670). Built UE4 executable crashes on startup. The stack trace is identical to the above quoted post. Myo Connect is running and PIE (Play in Editor) works fine.

    I followed the steps on Shipping/Packaged Builds. One thing that is unclear is whether to copy the Binaries folder from the root of the plugin distribution files or from <UE4 Project>\Plugins\MyoPlugin\Binaries after doing a build. I assume it is the former rather than the latter. In other words, I assume the point of this step is to get the dependencies myo32.dll and myo64.dll into <deployment folder>\WindowsNoEditor\<project name>\Binaries\WinXX\ where XX is 32 or 64, respectively.



    @Cupit: what did you do to get your packaged build working?
    Last edited by kzoink; 08-14-2015, 05:14 PM.

    Leave a comment:


  • replied
    Hello Getnamo,
    Thanks for the awesome work, got a little issue with the plugin though: I am running 4.8.2 and the latest version of Myo Connect and firmware.
    I got an that error either when I try to add a MyoComponent to a BP or play while having an interface implemented in one of my Blueprint:

    Unhandled exception at 0x00007FFC1D551AE0 (myo64.dll) in UE4Editor.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.

    About the call statck the error is getting triggered in FMyoPluggin.cpp line 514 : hub = new myo::Hub("com.example.unrealengine4");
    Then : Hub_impl.hpp line 26 : switch (libmyo_error_kind(_error)) {

    The error is not occurring if I turn off MyoConnect.
    Last edited by Tryso; 08-06-2015, 07:56 AM.

    Leave a comment:


  • replied
    thanks lot it runs OK now!!!!!

    Leave a comment:


  • replied
    Originally posted by coreyx View Post
    The current version of the Myo plugin (0.7.11) is still crashing the UE4 editor when Myo Connect is not running.

    I've traced this crash to an assert in a function being called after plugin startup.

    The actual error is:

    Code:
    "Assertion failed: O != NULL [File:C:\Users\<user>\Desktop\<project>\Plugins\MyoPlugin\Intermediate\Build\Win64\UE4Editor\Inc\MyoPlugin\MyoPlugin.generated."
    
    UE4Editor_Core!FDebug::AssertFailed() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\misc\outputdevice.cpp:355]
    UE4Editor_MyoPlugin!IMyoInterface::Execute_DeviceDisabled() [c:\users\<user>\desktop\<project>\plugins\myoplugin\intermediate\build\win64\ue4editor\inc\myoplugin\myoplugin.generated.cpp:196]
    UE4Editor_MyoPlugin!FMyoPlugin::SetDelegate() [c:\users\<user>\desktop\<project>\plugins\myoplugin\source\myoplugin\private\fmyoplugin.cpp:814]
    UE4Editor_MyoPlugin!MyoDelegate::MyoStartup() [c:\users\<user>\desktop\<project>\plugins\myoplugin\source\myoplugin\private\myodelegate.cpp:206]
    Here's what's happening...
    You are my hero, it seems there were cases where you could have Null set as the interface delegate and it would emit MyoDisabled all other cases are guarded by valid Myo Id. This means your recommended fix only needed to be applied to that one event.

    Code:
    void MyoDelegateBlueprint::MyoDisabled()
    {
    	if (IsValidDelegate())
    		IMyoInterface::Execute_DeviceDisabled(_interfaceDelegate);
    }
    Thanks a lot for finding this! Gotta say that I'm also happy I commented my code earlier...

    Originally posted by Cupit
    I use this plugin in 4.8 ,just by blueprint .It runs ok in editor But can not run after package . Crashed !Anyone can help me ?
    Fatal error!
    This may be the same error see if the latest (0.7.12) didn't fix that for you and that you've followed the packaging instructions found on github. If there is still a problem, post or pm me your logs from the crash found under saved/logs.


    Update to 0.7.12
    -Should no longer crash in the cases where Myo Disabled is emitted but no
    delegate is set.

    Leave a comment:

Working...
X