xtk mesh loading errors - xtk

I'm trying to load several freesurfer files (.pial, .inflated) and the javascript console is recording these errors:
Uncaught RangeError: ArrayBuffer length minus the byteOffset is not a multiple of the element size.
Other things load fine, such as dicom, nifti, .smoothwm, some .pial, etc. I'm using Chrome 25.0.1364.97

Related

binascii hexlify decode TypeError: object with buffer protocol required if I use a list with bytes

So, I got this wired thing when using list with bytes inside on a Raspberry Pi Pico and MicroPython.
If I use binascii.hexlify(data_raw[0]).decode() I got the error TypeError: object with buffer protocol required
The list is like below:
[b'\x02', b'\x88', b'\x84', b'\x80', b'\x80']
Instead, if I use binascii.hexlify(b'\x02').decode() everything works fine
I can't understand the issue

Crash on importing audio after packaging game EXCEPTION_ACCESS_VIOLATION OVRlipsync Plugin UE4

Been working on a lipsync project on UE4.27 and the Oculus OVRlipsync and the project has been working very well on UE editor. Packaging the game to ship it to the client, I started facing issues that is related on cooking frame sequence from WAV files resulting in crash in the packaged app.
The resulted crash log is
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000024bc963002c
OVRLipSync
OVRLipSync
OVRLipSync
OVRLipSync
MyProject_Win64_Shipping!ovrLipSync_ProcessFrameEx() [\software\coretech\src\engines\tracking\facetracking\facewave\ovrlipsyncshim.cpp:389]
MyProject_Win64_Shipping!<lambda_04cfcd2176d25e5a0c33289e1c33f647>::operator()() [D:\Unreal Projects\Lipsync\fix2\MyProject\Plugins\OVRLipSync\Source\OVRLipSync\Private\CreateFrameSequenceAsset.cpp:79]
MyProject_Win64_Shipping!TAsyncRunnable<void>::Run()
MyProject_Win64_Shipping!FRunnableThreadWin::Run()
Tracing the error at CreateFrameSequenceAsset.cpp:79 which was part of the plugin source code I found the following function
context.ProcessFrame(PCMData + offs, ChunkSizeSamples, Visemes, LaughterScore, FrameDelayInMs,NumChannels > 1);
putting efforts back on the declaration and definition of the function found nothing useful, except that I tried looking up the file ovrlipsyncshim.cpp and found nothing so I tried searching my project for ProcessFrameEx() I found another part of it in /ThirdParty/Include/OVRLipSync.h as follows
ovrLipSyncResult ovrLipSync_ProcessFrameEx(
ovrLipSyncContext context,
const void* audioBuffer,
int sampleCount,
ovrLipSyncAudioDataType dataType,
ovrLipSyncFrame* pFrame);
though tracing all this up couldn't find anything useful to handle the exception or tell the cause of it.
Anyone ever faced such a problem or having any experience solving such an issue
I had the same issue. I've changed a line in OvrLipSyncEditorModule.cpp:
From:
UOVRLipSyncContextWrapper context(ovrLipSyncContextProvider_Enhanced, SampleRate, 4096, ModelPath);
To:
UOVRLipSyncContextWrapper context(ovrLipSyncContextProvider_Enhanced, SampleRate, 8192, ModelPath);
(basically I've increased the buffer size)
And I've also added this line:
SoundWave->LoadingBehavior = ESoundWaveLoadingBehavior::ForceInline;
before the call:
DecompressSoundWave(SoundWave);
Now it doesn't crash anymore and it generates a sequence, but when I attach the sequence to the model, it does nothing.. It's weird, it seems to not be a working sequence even though I've checked and the sequence is not empty.

Getting FR_3085 ERROR when working in Informatica

In a lot of the task flow jobs I'm running, I constantly am getting the
FR_3085 ERROR: Row [1]: 2-th character is a null character, which is
not allowed in a text input file
error. These occur usually in data synchronization tasks but I sometimes see this in mapping configurations as well. How do I resolve this error?
This error occurs when you have NULL characters in your flat file.
One way for doing this is using the OS utilities for removing the NULL characters from your flat file automatically and this will depend on what OS you're using.

cascade face detection C++ Opencv 3.0

I am trying to implement face detection mentioned in the tutorial
http://docs.opencv.org/3.0-beta/doc/tutorials/objdetect/cascade_classifier/cascade_classifier.html#cascade-classifier
I am using OpenCV 3.0 on Ubuntu 14.04.
I downloaed the cascade xml files from here
https://github.com/opencv/opencv/tree/master/data/haarcascades
When I compile the code it gives me this error message:
OpenCV Error: Parsing error (/...../haarcascade_frontalcatface.xml(5): Valid XML should start with '<?xml ...?>') in icvXMLParse, file /home/taleb/opencv3/opencv/modules/core/src/persistence.cpp, line 2220
terminate called after throwing an instance of 'cv::Exception'
what(): /home/taleb/opencv3/opencv/modules/core/src/persistence.cpp:2220: error: (-212) /home/taleb/pythonproject/test1/haarcascade_frontalcatface.xml(5): Valid XML should start with '<?xml ...?>' in function icvXMLParse
Any suggestion?
I found a couple of fixes in stack overflow and other websites. They are as follows:
Change the character encoding from UTF-8 to ANSI with Notepad++.
Previous answer:
convert_cascade is for cascades trained by haartraining application and it does not support a format of cascades trained by traincascade application.
To do this with traincascade, just run opencv_traincascade again with
the same "-data" but set "-numStages" to the point you want to
generate up to. The application will load the trained stages, realize
that there is required number of stages, write the result cascade in
xml and finish a work. Interrupting the process during a stage could
result in corrupt data, so if you're best off deleting the stage in
completion.
refrence: https://stackoverflow.com/a/25831423/5671364.
XML Standard states:
if no encoding declaration is present in the XML document (and no
external encoding declaration mechanism such as the HTTP header is
available), the assumed encoding of an XML document depends on the
presence of the Byte-Order-Mark (BOM).
There are 3 ways to fix this:
Let OpenCV just put the ´encoding="ASCII"´ tag into the top root XML
tag.
Leave the top root XML tag, but encode everything as UTF-8
before writing it to file.
Do something else, with Byte-Order-Mark,
but keep it to the standard.
refrence: http://code.opencv.org/issues/976

SDL_RenderCopy() has strange behavior on Raspberry PI

This is driving me up the wall..
I've got a very simple SDL2 program.
It has a array of 3 SDL_Texture pointers.
These textures are filled as follows:
SDL_Texture *myarray[15];
SDL_Surface *surface;
for(int i=0;i<3;i++)
{
char filename[] = "X.bmp";
filename[0] = i + '0';
surface = SDL_LoadBMP(filename);
myarray[i] = SDL_CreateTextureFromSurface(myrenderer,surface);
SDL_FreeSurface(surface);
}
This works, no errors.
In the main loop (which is just a standard event loop waiting for SDL_QUIT, keystrokes and a user-event which a SDL_Timer puts in the event queue every second) I just do (for the timer triggered event):
idx = (idx+1) % 3; // idx is global var initially 0.
SDL_RenderClear(myrenderer);
SDL_RenderCopy(myrenderer, myarray[idx], NULL, NULL);
SDL_RendererPresent(myrenderer);
This works fine for 0.bmp and 1.bmp, but the 3rd image (2.bmp) simply shows as a black field.
This is structural.
If I alternate the first 2 images they are both fine.
If I alternate the 2nd and 3rd image the 3rd image doesn't show.
If I use more than 3 images then 3 and upwards show as black.
Loading order doesn't matter. It starts going wrong with the 3rd image loaded from disk.
All images are properly formatted BMP's.
I even saved 2.bmp back to disk under a different name by using SDL_SaveBMP() after it was loaded to make sure it got loaded in memory OK. The new file is bit for bit identical to the original.
This program, without modifications and the same bmp files, works fine on OSX (XCode5) and Windows (VC++ 2012 Express).
The problem only shows on the Raspberry PI.
I have placed explicit error checks on every call that can leave a result/error-code (not shown in the samples above for brevity) but all of them show "no error".
I have used the latest stable source set of www.libsdl.org and compiled as instructed (configure, make, make install, etc.).
Anybody got any idea what could be going on ?
P.S.
Keyboard input doesn't seem to work either on my PI, but I haven't delved into that yet.
Answering myself as I finally figured it out myself...
I finally went back to the README-raspberrypi.txt that came with the SDL2 sources.
I didn't read it carefully enough the first time around...
Problem 1: I'am running on a FULL-HD display. The PI's default GPU memory is 64MB which is not enough for large displays and double-buffering. As suggested in the README I increased this to 128MB and this solved the black image problem.
Problem 2: Text input wasn't working because my user-account was not in the input group. I had added the default "pi" account to the input group initially, but when I later started using another account I forgot to add that user to the group.
In short: Caught by my own (too) quick skimming of the documentation.