Add JSON requests instead of URI requests

Modern REST-APIs do not use URI requests, meaning that an URI is appended by PHP-Flags. As URIs are almost always somehow logged and users tend to use HTTP over HTTPS any confidential data would be visible to anyone on the same network, this is no longer the as-is-Standard. Instead, a call should be made by calling an Endpoint with the correct payload, containing a JSON object specifying anything relevant to the endpoint.
This brings several nice and easy features:

Security
Ease of Expansion (i.e. new features in an endpoint only need appending the JSON)
Developing requests in Websites, Plugins or even other programs is done by following standards for making REST-calls

Please consider this before adding authentication for services like requested in #8

I didn't know GET supported JSON payloads.

Sorry what? I don't understand what you're getting at. GET is a standard part of REST....

@md-5 of course, it is a standard Request Word of HTTP. The current API version requires to add parameters as part of the URI though instead of sending them in the request body as a JSON-object. This is considered best practice because of reasons mentioned in the issue.

GET doesn't have a request body, I have no idea what you're on about
https://stackoverflow.com/questions/978061/http-get-with-request-body

Having no semantics does not mean it is impossible, but it means that some services may have done the wrong thing in the past. As the Answer on Stack Overflow shows very good, the first RFC said you don't need a body, some developers read it as they can't have bodies, which was revised in the latest RFC 7231:

A payload within a GET request message has no defined semantics;
sending a payload body on a GET request might cause some existing
implementations to reject the request.

That's why you can and should use a GET body. If you use nginx or Apache2 or IIS in the latest versions, you can handle them and most common languages like java or Python3 can handle them, too. The only usecase where this could be satisfying not to use is if a person would like to use the API in their browsers. However, that's what the website is for.

@dorsax Can you provide some literature supporting the claim that when using the standard GET request method that we should be using request bodies (which have no semantic meaning to GET) over GET parameters (the known standard)?
If you can provide these, we can have a more productive discussion. As of right now, all I am able to ascertain is that this is a style suggestion and not an actual nod to a new standard (please correct me if this isn't right).

A payload within a GET request message has no defined semantics;
sending a payload body on a GET request might cause some existing
implementations to reject the request.

Sorry, but this doesn't do it for me. The first clause says there are no semantics, and the second clause supports the first by saying that sending a request body may cause the service to reject the request.
They'd reject the request because the request was not following the semantic definition of GET (which is that request bodies have no semantic meaning to GET). That makes sense to me. It does not seem to suggest that we should be moving toward handling request bodies while using GET.
As previously mentioned, we will (without question) use request bodies and proper standards while handling any private information. That said, however, for API keys there are numerous examples in the real world of those being accepted via URI. However, more likely, we will require it as an HTTP header. This would not go into the request body. Any other parameters are for reading only, and do not/would not represent any private information so we would be using GET + Header.
Like I said, get back to me if you wish to continue discussing this. I'm open to hear your side, but I'm not convinced at the moment.

Hey @simpleauthority
I had a deep dig into my past projects where I called different REST APIs to get a better personal overview because I started to doubt myself. In my "study" I got the following results:

any API w/o authentication uses GET with URI parameters
any API with authentication uses  POST request with JSON bodies
mixed APIs apply the URI parameters in GET, POST uses JSON body

I have to admit I was biased from the beginning and I know now why. First, the latest project I am working on uses a closed source API (documentation isn't publicly available, too), where even GET uses a request body. Second, almost any APIs I used in the past year had authentication, and I almost exclusively worked with those parts. It seems like I assumed that a Request Body was the de facto standard because of this bias.
I also want to admit that I came here with the authentication part in mind and didn't explicitly wanted GET with a request body. I just assumed it was a standard, which I have now proved myself to be wrong. Somehow I was triggered after the first message of @md-5 because it wasn't very constructive but rather destructive to me. I want to apology for the mess. Thank you for your work on an API, all devs can benefit from that :)

None of the apis in this project have authentication....


Search box broken

Adding the spectral plot seems to have also broken the search box! Javascript console gives an error because it doesn't think autocomplete is a function...

@laurabzz has fixed this...


unsupported audio format

I am using the Speech to text REST
According to the docs, ogg and wav files are supported. However, after uploading required format: wav 16KHZ pcm, I've received the error: {"Message":"Unsupported audio format"}.
I'm using Javascript for the development.

can you share the audio file with us?

I'm using the resource from this link: http://www.lapis-semi.com/en/semicon/speech/sample.html
the PCM 16 bit 16KHZ

Or maybe you can provide me some sample files to test

This site only offers .mp3 files for download, which are not supported. Either convert them to a supported format, for example using Audacity, or use our sample file to test.

The sample file offered also fail.

Can you provide more details about how you are making the request to the REST interface? I got a proper result with the example file using this request (set your key and region accordingly):
curl \
    --header "Ocp-Apim-Subscription-Key: ${SPEECHSDK_SPEECH_KEY}" \
    --header "Content-type: audio/wav; codecs=audio/pcm; samplerate=16000" \
    -X POST \
    --data-binary @whatstheweatherlike.wav \
   "https://${SPEECHSDK_SPEECH_REGION}.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US" -v

Please also refer to these docs on the REST interface.

handleUpload = ( ) => {
let fd = new FormData();
let upLoadFile = this.state.audioFile[0];
fd.append("audio", upLoadFile);
fetch(
"https://westeurope.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US",
{
method: "POST",
headers: {
"content-type": "audio/ogg; codecs=audio/opus; samplerate=16000",
"Ocp-Apim-Subscription-Key": "2c11c96a0b1e435d989be40c4f6ab3dd",
"Transfer-Encoding": "chunked"
},
body: fd
}
).then(res => console.log(res));
};

Please don't post subscription keys. I would suggest to edit the message to remove the key and regenerate your key from the speech resource in the Azure portal.

handleUpload = () => {
let fd = new FormData();
let upLoadFile = this.state.audioFile[0];
fd.append("audio", upLoadFile);
fetch(
"https://westeurope.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US",
{
method: "POST",
headers: {
"content-type": "audio/ogg; codecs=audio/opus; samplerate=16000",
"Ocp-Apim-Subscription-Key": "my_key",
"Transfer-Encoding": "chunked"
},
body: fd
}
).then(res => console.log(res));
};

This looks ok if you are uploading an ogg file. For a wav file, use "Content-type": "audio/wav; codecs=audio/pcm; samplerate=16000" instead.

Try in that way...still not working with the wav file :(
The SDK solutions seem to work but the api one dopesn't

Try uploading the audio as binary data. This seems to work, but the javascript code is probably not the best:
const fetch = require("node-fetch");
const { createReadStream } = require('fs');

handleUpload = async () => {
    let upLoadFile = "whatstheweatherlike.wav";

    const stream = createReadStream(upLoadFile);

    const response = await fetch(
"https://the_region.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US",
        {
            method: "POST",
            headers: {
"Content-type": "audio/wav; codecs=audio/pcm; samplerate=16000",
"Ocp-Apim-Subscription-Key": "the_key",
                "Transfer-Encoding": "chunked"
            },
            body: stream
        }
    );
    console.log(response);
    console.log(response.ok);
    const json = await response.json();
    console.log(json);
};

handleUpload();

I'm having the same issue, the REST api just gives me { Message: 'Unsupported audio format' }
I'm running the audio file through FFMPEG with settings:
-acodec pcm_s16le -f s16le -ar 16000 -ac 1
Making the request like this:
axios.request(
      {
        url: AZURE_URL,
        method: 'POST',
        headers: {
          'Ocp-Apim-Subscription-Key': AZURE_API_KEY,
          'Content-Type': 'audio/wav; codecs=audio/pcm; samplerate=16000',
          Host: 'eastasia.stt.speech.microsoft.com',
          'Transfer-Encoding': 'chunked',
        },
        data: audio,
      },
    );

Any ideas?

At the end, we solve it. This api wants binary data so make sure you are sending binary data in the body

In my example above audio is a ReadStream, so it should send as binary

what do u put for the url. My case:
fetch(
"https://westeurope.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US",
{
method: "POST",
headers: {
"content-type": "audio/wav; codecs=audio/pcm; samplerate=16000",
    "Ocp-Apim-Subscription-Key": "api key",
    "Transfer-Encoding": "chunked"
  },
  body: input.files[0]
}

) .then(res => res.json())
.then(r => {
r = r.DisplayText;
console.log(r);
  });

@ionTea: The ffmpeg settings you quote seem to produce a wav file without a RIFF header, which the service can't process. Please try these flags: ffmpeg input.mp3 -acodec pcm_s16le -ar 16000 -ac 1 output.wav, and make sure the output file has the .wav file extension.

Changing the encoding seems to have worked, it's interesting that the old bing API could handle my original ffmpeg settings, but the new cognitive services one couldn't.
Anyways, it seems to be working fine now, thanks!

Alterar a codificação parece ter funcionado, é interessante que a antiga API do bing possa lidar com minhas configurações originais do ffmpeg, mas os novos serviços cognitivos não podiam.
De qualquer forma, parece estar funcionando bem agora, obrigado!

Could you tell me how you did to change the encoding? I have the same mistake and can't fix

chlandsi posted the call to ffmpeg that did the trick for him.
There are also many free visual tools that could help you. I had good results with a tool called 'audacity', but again, there are many tools available and it might depend on your usage and requirements

chlandsi postou a ligação e ffmpegfez o truque para ele.
Existem também muitas ferramentas visuais gratuitas que podem ajudá-lo. Tive bons resultados com uma ferramenta chamada 'audacity', mas, novamente, existem muitas ferramentas disponíveis e isso pode depender do seu uso e requisitos

Tanks!
My application records audio in .wav format, if I convert this file to base 64 and pass it to the API can I get a positive response from it?

@Glauber26 The API expects binary data (no base64 encoding necessary) in the correct audio formats. Please look above for a code sample.

@Glauber26 The API expects binary data (no base64 encoding necessary) in the correct audio formats. Please look above for a code sample.

Thank you for your help! I could solve this by sending the data in binary as you mentioned


Include password generator in lbg_input_password()

Won't fix because we could not do that for most GUI tools


[resolves #1279] Add support for Camel / JAXWS on WildFly

[merge]

Code not merged because @tdiesler (Thomas Diesler) is not in the Admin list.

[merge]


GPU Plugin: Add benchmarks, fix GCC build

Added some speed benchmarks to the readme. Fixed a couple of issues with Linux build.

Current coverage is 33.85% (diff: 100%)

Merging #1848 into master will decrease coverage by 0.03%

@@             master      #1848   diff @@
==========================================
  Files            68         68
  Lines          5281       5281
  Methods         827        827
  Messages          0          0
  Branches        526        526
==========================================
- Hits           1790       1788     -2
  Misses         3415       3415
- Partials         76         78     +2

Powered by Codecov. Last update e7fbc85...f0c6166


An option to avoid copying public into the build output?

Would you consider an option to avoid copying the public folder into the build output?
Currently you can't avoid it:
https://github.com/vitejs/vite/blob/main/packages/vite/src/node/build.ts#L321-L326
Additional context
I'm only interested in publishing my compiled assets (application code/templates/styles).
Static assets will vary over the lifetime of the process and are served from public directly.

Write a custom middleware to serve it from a different directory? I'd rather avoid adding an option for every niche custom setup.

Write a custom middleware to serve it from a different directory? I'd rather avoid adding an option for every niche custom setup.

If anyone wanting to do this finds this issue, here's what's probably the simplest workaround:
Install package rollup-plugin-delete and add this to your vite config:
import del from "rollup-plugin-delete";

export default {
  build: {
    rollupOptions: {
      plugins: [
        del({ targets: "dist/*", hook: "generateBundle" })
      ]
    }
  }
}

It's not optimal in that Vite will copy public into dist before rollup-plugin-delete removes them again, but unless you have a massive public folder you wouldn't care. The end result is exactly what you want.

If anyone wanting to do this finds this issue, here's what's probably the simplest workaround:
Install package rollup-plugin-delete and add this to your vite config:
import del from "rollup-plugin-delete";

export default {
  build: {
    rollupOptions: {
      plugins: [
        del({ targets: "dist/*", hook: "generateBundle" })
      ]
    }
  }
}

It's not optimal in that Vite will copy public into dist before rollup-plugin-delete removes them again, but unless you have a massive public folder you wouldn't care. The end result is exactly what you want.


The Script as Written Does Not Allow the Stored Procedure to be Created in Any Database Other Than Master

The documentation states the procedure can be created in the database of your choice, but makes the recommendation to create in the master database.  However, the first line of the script sp_CheckSecurity is "USE master;" which changed the database scope to master, thus removing the ability to create the procedure in the database of your choice.  This line should be removed from the script to be inline with the documentation.

Agreed.  No need to force using master, leave that to the DBA.


Flaky tests: Gradle build daemon disappeared unexpectedly

This happens to many of our tests. It looks like this is a common issue with Gradle and we will have to do more digging to determine the true cause. https://stackoverflow.com/questions/37171043/gradle-build-daemon-disappeared-unexpectedly-it-may-have-been-killed-or-may-hav/37171110
10:04:08 > Task :sdks:go:test:sparkValidatesRunner
10:04:08 Feb 02, 2022 6:04:08 PM org.apache.beam.sdk.expansion.service.ExpansionService loadRegisteredTransforms
10:04:08 INFO: Registering external transforms: [beam:transforms:xlang:test:cgbk, beam:transforms:xlang:test:flatten, beam:transforms:xlang:test:prefix, beam:transforms:xlang:test:multi, beam:transforms:xlang:test:gbk, beam:transforms:xlang:test:comgl, beam:transforms:xlang:test:compk, beam:transforms:xlang:count, beam:transforms:xlang:filter_less_than_eq, beam:transforms:xlang:test:partition, beam:transforms:xlang:test:parquet_write, beam:transforms:xlang:parquet_read, beam:transforms:xlang:textio_read, beam:external:java:generate_sequence:v1]
10:04:09 The message received from the daemon indicates that the daemon has disappeared.
10:04:09 Build request sent: Build{id=37ea63c1-ec5f-492a-ad6a-f26c92fd7f7e, currentDir=/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Go_VR_Spark/src}
10:04:09 Attempting to read last messages from the daemon log...
10:04:09 Daemon pid: 3299301
10:04:09   log file: /home/jenkins/.gradle/daemon/7.3.2/daemon-3299301.out.log
10:04:09 ----- Last  20 lines from daemon log file - daemon-3299301.out.log -----
10:04:09 2022-02-02T18:04:08.2510000 [DEBUG] [org.gradle.launcher.daemon.registry.PersistentDaemonRegistry] Marking busy by address: [2bd8c084-af4c-4924-90f5-8b8a89f85fc5 port:32889, addresses:[localhost/<IP_ADDRESS>]]
10:04:09 2022-02-02T18:04:08.2510000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on daemon addresses registry.
10:04:09 2022-02-02T18:04:08.2510000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
10:04:09 2022-02-02T18:04:08.2520000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
10:04:09 2022-02-02T18:04:08.2520000 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] resetting idle timer
10:04:09 2022-02-02T18:04:08.2520000 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] daemon is running. Sleeping until state changes.
10:04:09 2022-02-02T18:04:08.2530000 [INFO] [org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy] Daemon is about to start building Build{id=37ea63c1-ec5f-492a-ad6a-f26c92fd7f7e, currentDir=/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Go_VR_Spark/src}. Dispatching build started information...
10:04:09 2022-02-02T18:04:08.2530000 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 266: dispatching org.gradle.launcher.daemon.protocol.BuildStarted@42569c28
10:04:09 2022-02-02T18:04:08.2550000 [DEBUG] [org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment] Configuring env variables: [PATH, RUN_DISPLAY_URL, HUDSON_HOME, RUN_CHANGES_DISPLAY_URL, JOB_URL, HUDSON_COOKIE, MOTD_SHOWN, DBUS_SESSION_BUS_ADDRESS, JENKINS_SERVER_COOKIE, LOGNAME, PWD, RUN_TESTS_DISPLAY_URL, JENKINS_URL, SHELL, BUILD_TAG, ROOT_BUILD_CAUSE, BUILD_CAUSE_TIMERTRIGGER, OLDPWD, GIT_CHECKOUT_DIR, JENKINS_HOME, sha1, CODECOV_TOKEN, NODE_NAME, BUILD_DISPLAY_NAME, JOB_DISPLAY_URL, GIT_BRANCH, SETUPTOOLS_USE_DISTUTILS, SHLVL, WORKSPACE_TMP, GIT_PREVIOUS_COMMIT, JAVA_HOME, BUILD_ID, LANG, XDG_SESSION_ID, XDG_SESSION_TYPE, JOB_NAME, SPARK_LOCAL_IP, BUILD_CAUSE, GIT_PREVIOUS_SUCCESSFUL_COMMIT, NODE_LABELS, HUDSON_URL, WORKSPACE, ROOT_BUILD_CAUSE_TIMERTRIGGER, XDG_SESSION_CLASS, _, GIT_COMMIT, COVERALLS_REPO_TOKEN, CI, EXECUTOR_NUMBER, HUDSON_SERVER_COOKIE, SSH_CLIENT, JOB_BASE_NAME, USER, SSH_CONNECTION, BUILD_NUMBER, BUILD_URL, RUN_ARTIFACTS_DISPLAY_URL, GIT_URL, XDG_RUNTIME_DIR, HOME]
10:04:09 2022-02-02T18:04:08.2560000 [DEBUG] [org.gradle.launcher.daemon.server.exec.LogToClient] About to start relaying all logs to the client via the connection.
10:04:09 2022-02-02T18:04:08.2560000 [INFO] [org.gradle.launcher.daemon.server.exec.LogToClient] The client will now receive all logging from the daemon (pid: 3299301). The daemon log file: /home/jenkins/.gradle/daemon/7.3.2/daemon-3299301.out.log
10:04:09 2022-02-02T18:04:08.2570000 [INFO] [org.gradle.launcher.daemon.server.exec.LogAndCheckHealth] Starting 2nd build in daemon [uptime: 3 mins 43.954 secs, performance: 98%]
10:04:09 2022-02-02T18:04:08.2640000 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 264: received class org.gradle.launcher.daemon.protocol.CloseInput
10:04:09 2022-02-02T18:04:08.2640000 [DEBUG] [org.gradle.launcher.daemon.server.DefaultDaemonConnection] thread 264: Received IO message from client: org.gradle.launcher.daemon.protocol.CloseInput@3e111340
10:04:09 2022-02-02T18:04:08.2710000 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] The daemon has started executing the build.
10:04:09 2022-02-02T18:04:08.2710000 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] Executing build with daemon context: DefaultDaemonContext[uid=ca7e60a9-87d1-4beb-a056-dcf9ca91d510,javaHome=/usr/lib/jvm/java-8-openjdk-amd64,daemonRegistryDir=/home/jenkins/.gradle/daemon,pid=3299301,idleTimeout=10800000,priority=NORMAL,daemonOpts=-Xss10240k,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]
10:04:09 2022-02-02T18:04:08.2710000 [INFO] [org.gradle.launcher.daemon.server.exec.ForwardClientInput] Closing daemon's stdin at end of input.
10:04:09 2022-02-02T18:04:08.2710000 [INFO] [org.gradle.launcher.daemon.server.exec.ForwardClientInput] The daemon will no longer process any standard input.
10:04:09 Configuration on demand is an incubating feature.
10:04:09 Daemon vm is shutting down... The daemon has exited normally or was terminated in response to a user interrupt.
10:04:09 ----- End of the daemon log -----
Imported from Jira BEAM-13810. Original Jira may contain additional context.
Reported by: ibzib.

Assigning to @kennknowles since you had the most recent comment in BEAM-13810:

The claim by the scan at https://ci-beam.apache.org/view/PostCommit/job/beam_PreCommit_Java_Cron/5164/ / https://scans.gradle.com/s/kcy27wmdenr6i/timeline?anchor=nuv4fm6q4n3ks is "2749 tasks executed in 128 projects in 12m 50.990s, with 480 avoided tasks saving 8h 2m 40.377s"
The documentation claims "The reasoning is simple: improve build speed by reusing computations from previous builds. However, the benefits are dramatic: we typically measure build times reduced by 15-75% on subsequent builds. We recommend profiling your build by using --profile to get a sense of how much impact the Gradle Daemon can have for you." but the build I link above was a fresh daemon (https://scans.gradle.com/s/kcy27wmdenr6i/performance/daemon says "0 previous builds") and still had many cache hits.
So it would appear that our local cache may make the daemon's in-memory incremental building less important.

I think the takeaway here is that we should be able to turn on --no-daemon without a performance penalty?

Still happening:
https://ci-beam.apache.org/job/beam_PreCommit_Python_PVR_Flink_Commit/12108/console

Interesting thought to eliminate the daemon and only use the cache. I'm not opposed to it. I've also been seeing a number of locking issues with the cache, so may be two bad options...

That was your thought :)

oh hah

Closing since we disabled https://github.com/apache/beam/pull/24641


2.14.0-beta

After try epic-wallet check using epic server I have after a few correct receive data error in connection with server - always on the same index ( looks like end of database ). Did other users have the same ? I use linux. Maybe we need one more block mined to have correct possible to check wallet ? I do check and restore after full delete subfolders db and saved_tx  and only old seed file. It is only problem with 2.14 because when I try the same procedure with old 2.13 working server on not rollback chain all  check and restore works correct. No error logs in debug mode (toml) in epic-server.log
20210330 22:12:47.504 WARN epic_wallet_libwallet::internal::restore - Checking 1000 outputs, up to index 1245529. (Highest index: 1214415) 20210330 22:12:47.504 WARN epic_wallet_libwallet::internal::restore - Scanning 1000 outputs in the current Epic utxo set 20210330 22:12:47.960 ERROR epic_wallet_impls::node_clients::http - get_outputs_by_pmmr_index: error contacting http://localhost:3413. Error: ResponseError error: Cannot parse response 20210330 22:12:47.960 ERROR epic_wallet_controller::command - Wallet check failed: Restore Error 20210330 22:12:47.960 ERROR epic_wallet_controller::command - Backtrace:  Wallet command failed: LibWallet Error: Restore Error

still relevant?

As we currently have new versions of Epic and due to the lack of contact we are closing this issue.
If the problem persists in newer versions, please contact us.
I believe this check function has been changed almost completely in the latest version since 3.0.0-alpha-1 to 3.0.0-alpha-4. These changes are already present in the most current version 3.0.0 present on the epic.tech website.


RuntimeError: Method (but not graphs in general) require a single output. Use None/Tuple for 0 or 2+ outputs

RuntimeError: Method (but not graphs in general) require a single output. Use None/Tuple for 0 or 2+ outputs
when I compiled cpd-Resnet module, I set require_full_compile=False to avoid "aten::min.dim" and "aten::max.dim" that unsupported operators,It reported the above errors.Also , I set the final result with tuple type, but it no work

There is a part of torchscript graph that show tuple result

There is a part of ts graph with compiled by torch_tensorrt

I think it should be make tuple construct for final results if outputs size more than one

can you set require_full_compile=True

The torchscript graph with unsupported operators aten::max.dim and aten::min.dim
发自我的iPhone
------------------ Original ------------------
From: Naren Dasan @.>
Date: Thu,Nov 11,2021 11:48 PM
To: NVIDIA/Torch-TensorRT @.>
Cc: ylz1104 @.>, Author @.>
Subject: Re: [NVIDIA/Torch-TensorRT] RuntimeError: Method (but not graphs ingeneral) require a single output. Use None/Tuple for 0 or 2+ outputs (Issue#705)
can you set require_full_compile=True
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

So there is definitely a bug with partial compilation that will take a bit to fix. But implementing support for min and max are trivial. If you want to run the model now I suggest following this tutorial: https://github.com/NVIDIA/Torch-TensorRT/tree/master/examples/custom_converters and use the existing min and max converters as reference: https://github.com/NVIDIA/Torch-TensorRT/blob/master/core/conversion/converters/impl/reduce.cpp. Or you can wait for us to get to these issues

Also can you provide the full schemas for min.dim and max.dim?

Also can you provide the full schemas for min.dim and max.dim?

in_ is a torch tensor


Updated README.md for custom fonts

As per discussion #1046 a small description of how to train using custom fonts has been added to the README.md of references/recognition.

Thank you for the opportunity! It's been a pleasure.


Mingw support (2022-1)

The old problem was addressed by introducing new way to register clean-up callbacks. However, there are still some works to do.
Signed-off-by: Schrodinger ZHU Yifan<EMAIL_ADDRESS>

With MinGW UCRT64 runtime, perf-contention fails with the following stacktrace:
Thread 1 received signal ?, Unknown signal.
0x00007fff84f4e88e in ucrtbase!abort () from C:\WINDOWS\System32\ucrtbase.dll
(gdb) bt
#0  0x00007fff84f4e88e in ucrtbase!abort ()
   from C:\WINDOWS\System32\ucrtbase.dll
#1  0x00007ff69fb65930 in snmalloc::PALWindows::error (
    str=0x7ff69fb76fe0 <snmalloc::NUM_EPOCHS+1496> "assert fail: initialised in D:/snmalloc/src/mem/remotecache.h on 84")
    at D:/snmalloc/src/pal/pal_windows.h:125
#2  0x00007ff69fb6ccf5 in snmalloc::error (
    str=0x7ff69fb76fe0 <snmalloc::NUM_EPOCHS+1496> "assert fail: initialised in D:/snmalloc/src/mem/remotecache.h on 84") at D:/snmalloc/src/pal/pal.h:66
#3  0x00007ff69fb6a881 in snmalloc::RemoteDeallocCache::post<10368ull, snmalloc::Globals> (this=0x23e7ab9da40, local_state=0x23e0001a600,
    id=140697218265472, key=...) at D:/snmalloc/src/mem/remotecache.h:84
#4  0x00007ff69fb656bb in snmalloc::LocalCache::flush<10368ull, snmalloc::Globals, snmalloc::CoreAllocator<snmalloc::Globals>::flush(bool)::{lambda(snmalloc::CapPtr<void, snmalloc::capptr::bound<(snmalloc::capptr::dimension::Spatial)0, (snmalloc::capptr::dimension::AddressSpaceControl)0, (snmalloc::capptr::dimension::Wildness)1> >)#3}>(snmalloc::Globals::LocalState*, snmalloc::CoreAllocator<snmalloc::Globals>::flush(bool)::{lambda(snmalloc::CapPtr<void, snmalloc::capptr::bound<(snmalloc::capptr::dimension::Spatial)0, (snmalloc::capptr::dimension::AddressSpaceControl)0, (snmalloc::capptr::dimension::Wildness)1> >)#3}) (
    this=0x23e7ab9d898, local_state=0x23e0001a600, dealloc=...)
    at D:/snmalloc/src/mem/localcache.h:100
#5  0x00007ff69fb683f4 in snmalloc::CoreAllocator<snmalloc::Globals>::flush (
    this=0x23e00018000, destroy_queue=true)
    at D:/snmalloc/src/mem/corealloc.h:864
#6  0x00007ff69fb67586 in snmalloc::CoreAllocator<snmalloc::Globals>::debug_is_empty_impl (this=0x23e00018000, result=0xe0c4dff316)
    at D:/snmalloc/src/mem/corealloc.h:916
#7  0x00007ff69fb66983 in snmalloc::CoreAllocator<snmalloc::Globals>::debug_is_empty (this=0x23e00018000, result=0xe0c4dff316)
    at D:/snmalloc/src/mem/corealloc.h:964
#8  0x00007ff69fb632b6 in snmalloc::debug_check_empty<snmalloc::Globals> (
    result=0x0) at D:/snmalloc/src/mem/globalalloc.h:118
#9  0x00007ff69fb630e8 in test_tasks (num_tasks=8, count=1048576, size=262144)
    at D:/snmalloc/src/test/perf/contention/contention.cc:145
#10 0x00007ff69fb6320a in main (argc=1, argv=0x23e7ab6cf40)
    at D:/snmalloc/src/test/perf/contention/contention.cc:164

Hi, most of these changes seem to be replacing stdio with iostreams.  Can you pull those out into a separate PR?  Are those things necessary for MinGW or just cleanups?

Is it definitely using the PTHREAD_DESTRUCTORS for thread cleanup?  It looks like it has not properly release the allocators back on thread teardown.

Hi, most of these changes seem to be replacing stdio with iostreams. Can you pull those out into a separate PR? Are those things necessary for MinGW or just cleanups?

It is needed because mingw's gcc disagrees with %zu being a proper format flag.

Is it definitely using the PTHREAD_DESTRUCTORS for thread cleanup? It looks like it has not properly release the allocators back on thread teardown.

unfortunately, the problem persists


remember-me cookie is always not secure

https://github.com/codeigniter4/shield/blob/a76b35e7bf6746037b94061fab08cfcd08ac89b5/src/Authentication/Authenticators/Session.php#L334

I don't believe we can force this true currently. While all sites should be secure, we can't know what everyone's environment will be, especially during development. However, a config setting could be used to define this.

Yes, we need a config setting,

Actually - I think we can do:
service('request')->isSecure();

If the site enforces HTTPS, it would be okay.
But if the site accepts both HTTP/HTTPS, then an attacker may lead a victim to HTTP connection.

They would also be seeing other errors with javascript if they were doing mixed http/https. My thinking is that I would hope that's a rare situation and basing it on whether the request is secure or not is more likely to be secure than hoping developers remember to change the setting when they go live.

This is CI4 package. Why don't we use the CI4 Cookie config?

I think that works for now.


Add styles for "Ineligible" page

Blocked on mocks in #7737

Blocked. See comment: https://github.com/civiform/civiform/issues/7737#issuecomment-2246240099

Sijia said we can continue with the MVP version for parity. Putting this issue back to "in progress". I'll continue it next week.

Design QA complete. 1 minor issue opened: https://github.com/civiform/civiform/issues/9036


SIGSEGV crash with ART library on Android

This issue is somewhat intermittent, but I have managed to create a minimal example that will crash with some regularity. When the ART library is used to render a component it seems it will cause a crash on Android after it has rendered several times. This issue happens looks to have started with React Native 0.21 and only happens on Android.
Unfortunately the crash happens deep in libc and tracing the cause of the issue has been difficult. The code below reproduces the issue on Android. It will sometimes crash quite quickly (within seconds) and sometimes takes a bit longer (tens of seconds) with an error in the log like:
A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x9fa40028 in tid 4388 (mqt_js)
import React, { Text, View } from 'react-native';
const { Surface, Group, Shape } = React.ART;

const Smiley = React.createClass({
  render() {
    return (
      <Surface width={32} height={32}>
        <Group scaleX={1} scaleY={1} rotation={this.props.rotation} originX={16} originY={16} opacity={this.props.opacity}>
          <Group>
            <Shape fill="#222" d="M16 .004 c-8.837 0 -16 7.164 -16 16 0 8.837 7.163 16 16 16 s16 -7.163 16 -16 c0 -8.836 -7.163 -16 -16 -16 z m0 29 c-7.16 0 -12.985 -5.832 -12.985 -13 s5.825 -13 12.985 -13 c7.16 0 12.985 5.832 12.985 13 s-5.825 13 -12.985 13 z"/>
            <Shape fill="#222" d="M7.932 12.77 A2.513 2.5 0 1 0 12.958 12.77 A2.513 2.5 0 1 0 7.932 12.77 z"/>
            <Shape fill="#222" d="M18.872 12.77 A2.513 2.5 0 1 0 23.898000000000003 12.77 A2.513 2.5 0 1 0 18.872 12.77 z"/>
            <Shape fill="#222" d="M24.054 18.39 a1.006 1.006 0 0 0 -.85 .01 c-.005 .004 -.01 .003 -.015 .006 l-.98 .506 c-.62 .278 -1.4 .664 -2.43 .992 -1.04 .328 -2.53 .503 -4.09 .575 -1.56 -.08 -3.05 -.25 -4.09 -.58 -1.04 -.33 -1.82 -.72 -2.43 -.99 l-.97 -.51 -.02 -.01 a1 1 0 0 0 -.85 -.01 .992 .992 0 0 0 -.5 1.32 c1.59 3.502 4.93 5.79 8.58 5.946 .05 .01 .5 .01 .552 0 3.65 -.16 6.99 -2.444 8.582 -5.946 a1 1 0 0 0 -.503 -1.322 z"/>
          </Group>
        </Group>
      </Surface>
    );
  },
});

class CrashTestDummy extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      count: 0,
    };
  }

  componentDidMount() {
    setInterval(() => { this.state && this.setState({count: this.state.count + 1}) }, 20);
  }

  render() {
    return (
      <View style={{flex: 1, justifyContent: "center", alignItems: "center"}}>
        <Text>
          Count: {this.state.count}
        </Text>
        <Smiley/>
      </View>
    );
  }
}

React.AppRegistry.registerComponent('CrashTestDummy', () => CrashTestDummy);

I've noticed that when I use a more complex component that contains more ART elements, it crashes more quickly, suggesting a memory issue.

I'm having this issue too. I started using react-native-art-svg to implement a radial progress/timer bar around a button; now after an inconsistent amount of time of that bar ticking away my app crashes on Android.
Here's the console output for when my app crashes:
04-08 11:28:54.660 202-202/?  A/DEBUG: Build fingerprint: 'google/hammerhead/hammerhead:6.0.1/MMB29V/2554798:user/release-keys'
04-08 11:28:54.660 202-202/? A/DEBUG: Revision: '0'
04-08 11:28:54.660 202-202/? A/DEBUG: ABI: 'arm'
04-08 11:28:54.661 202-202/? A/DEBUG: pid: 23720, tid: 23758, name: mqt_js  >>> com.redwerks.mindmonkey <<<
04-08 11:28:54.661 202-202/? A/DEBUG: signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x971a0084
04-08 11:28:54.708 202-202/? A/DEBUG:     r0 9c6369d0  r1 0000001a  r2 0000001c  r3 fffffffe
04-08 11:28:54.708 202-202/? A/DEBUG:     r4 9719ffa0  r5 af00a9e0  r6 9719ffa4  r7 9f3fe498
04-08 11:28:54.708 202-202/? A/DEBUG:     r8 00000003  r9 fffffffb  sl 9f0b2834  fp 9f4040a4
04-08 11:28:54.708 202-202/? A/DEBUG:     ip 00000020  sp 9f3fe3d0  lr aef39907  pc 9ed0bb06  cpsr 80010030
04-08 11:28:54.709 202-202/? A/DEBUG:     #00 pc 00006b06  <unknown>
04-08 11:28:54.710 202-202/? A/DEBUG:     #01 pc 000fe903  /data/app/com.redwerks.mindmonkey-1/lib/arm/libjsc.so
04-08 11:28:54.710 202-202/? A/DEBUG:     #02 pc fffffff9  <unknown>
04-08 11:28:55.554 202-202/? E/DEBUG: AM write failed: Broken pipe
04-08 11:28:55.557 781-797/? I/BootReceiver: Copying /data/tombstones/tombstone_07 to DropBox (SYSTEM_TOMBSTONE)
04-08 11:28:55.566 781-24304/? W/ActivityManager:   Force finishing activity com.redwerks.mindmonkey/.MainActivity
04-08 11:28:55.605 781-1031/? I/WindowState: WIN DEATH: Window{97beca7 u0 com.redwerks.mindmonkey/com.redwerks.mindmonkey.MainActivity}
04-08 11:28:55.606 781-1345/? D/GraphicsStats: Buffer count: 8
04-08 11:28:55.633 216-216/? I/Zygote: Process 23720 exited due to signal (11)
04-08 11:28:55.654 781-791/? I/ActivityManager: Process com.redwerks.mindmonkey (pid 23720) has died
04-08 11:28:55.674 781-8966/? I/OpenGLRenderer: Initialized EGL, version 1.4
04-08 11:28:56.185 781-799/? W/WindowAnimator: Failed to dispatch window animation state change.
                                               android.os.DeadObjectException
                                                   at android.os.BinderProxy.transactNative(Native Method)
                                                   at android.os.BinderProxy.transact(Binder.java:503)
                                                   at android.view.IWindow$Stub$Proxy.onAnimationStopped(IWindow.java:534)
                                                   at com.android.server.wm.WindowAnimator.updateWindowsLocked(WindowAnimator.java:286)
                                                   at com.android.server.wm.WindowAnimator.animateLocked(WindowAnimator.java:678)
                                                   at com.android.server.wm.WindowAnimator.-wrap0(WindowAnimator.java)
                                                   at com.android.server.wm.WindowAnimator$1.doFrame(WindowAnimator.java:123)
                                                   at android.view.Choreographer$CallbackRecord.run(Choreographer.java:856)
                                                   at android.view.Choreographer.doCallbacks(Choreographer.java:670)
                                                   at android.view.Choreographer.doFrame(Choreographer.java:603)
                                                   at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
                                                   at android.os.Handler.handleCallback(Handler.java:739)
                                                   at android.os.Handler.dispatchMessage(Handler.java:95)
                                                   at android.os.Looper.loop(Looper.java:148)
                                                   at android.os.HandlerThread.run(HandlerThread.java:61)
                                                   at com.android.server.ServiceThread.run(ServiceThread.java:46)

I've just confirmed that this issue still exists in v0.23.1

I am seeing a similar error message as well on Android:
I am getting this: A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x4604b088 in tid 3316 (mqt_js)
I am trying the same application on 2 different android versions:

On Samsung S6 with Android version 5.1.1, it crashes all the time at boot
On Nexus 5 with Android version 6.0, I could not see this issue.

The log output in the failing case:
logfailure.txt

This issue still exists in v0.24.1

+1

I noticed if you turn off debug mode it doesn't crash.

As far as I recall, it does crash when debug mode is turned off - it just takes longer for the crash to happen.

+1

+1

Anyone have an idea for a workaround? Since there seems to be some kind of memory leak, is there a way we can manually call some kind of garbage collection? I need my app to be able to run all day, while it always crashes at best about every ~12 hours.

+1

+1

We see this too. A lot in debug mode. From the dumps, it looks like a crash on the JSC (JavaScriptCore) execution thread.
I started thinking in terms of building a debug version of JSC to see if we could get more information. What I found wasn't entirely encouraging. The JSC build used in React Native seems to come from here:
https://github.com/facebook/android-jsc
and is only buildable with Buck out of the box. I also looked to see which version of JSC it was based on. In fetch_sources.sh it grabs:
http://builds.nightly.webkit.org/files/trunk/src/WebKit-r174650.tar.bz2
I searched for that version here:
https://webkit.org/nightly/archives/
and the timestamp on it is: October 14, 2014 1:09 PM GMT.
I would suggest that the dependence of React Native for Android on an 18 month old (and counting) snapshot of JSC should be of some concern to us all.

I'm continuing to experiment with this off to the side. I find that if I rebuild android-jsc with JIT compilation fully disabled and relink our app with it, it no longer crashes in debug mode on Android.
This doesn't necessarily mean that JIT compilation is buggy I guess; it could just be that memory pressure is reduced slightly and/or it perturbs the timing of something enough to hide the problem.
FWIW, the published android-jsc seems to use this compile time configuration of JavaScriptCore:
preprocessor_flags = [
    '-DWTF_USE_EXPORT_MACROS=1',
    '-DBUILDING_JavaScriptCore=1',
    '-DENABLE_JIT=1',
    '-DENABLE_DFG_JIT=0',
    '-DENABLE_LLINT=1',
    '-DINTPTR_MAX=LONG_MAX',
    '-DLOG_TAG="JavaScriptCore"',
  ],

which I think gives us the Baseline JIT only. JSC has layered JIT solutions - see these:
https://webkit.org/blog/3362/introducing-the-webkit-ftl-jit/
https://trac.webkit.org/wiki/JavaScriptCore
for example.
Anyway, flipping to ENABLE_JIT=0 (in a couple of places in the BUCK file) changes the behaviour of things enough to stop the crashing so far. But trials continue.

I was able to reproduce it consistently in our project. I get the same crash every time I'm making a call to a server and the response is NOT a 2xx response. It crashes for 4xx, 5xx and so on.
However, when I tried to reproduce it in isolation, by creating a new project, the crash would not depend on the server's response. It would solely depend on how many components are being loaded.

See my comment here: https://github.com/magicismight/react-native-svg/issues/38#issuecomment-228360483

For me this is still crashing in 0.28. Anyone else has this problem?

+1

Yeah, not sure if this is related to ART for me anymore, but I do have 2 views overlaying one another when this happens, both containing ART code.

Did anyone find any workaround or solution to this? I am facing the same issue.

I am seeing the same problems using ReactNativeART on Android.  I initially followed this tutorial (http://browniefed.com/blog/getting-react-art-running-on-react-native/), and got the example VectorWidget.js (from https://github.com/reactjs/react-art/blob/master/examples/vector-widget/VectorWidget.js) working fine on iOS.
On Android however VectorWidget crashes almost immediately.  It seems that performing an animation or transform more than about twice per second will crash the app.  If I don't perform any animations or transforms it will not crash.
This is the error I always see when the app crashes:
09-25 19:43:55.376 2857-3394/com.artproject A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x9e300098 in tid 3394 (mqt_js)

Occasionally I will see messages about stopping threads and garbage collection before the crash error:
09-25 19:46:46.761 3967-3977/com.artproject W/art: Suspending all threads took: 7.056ms
09-25 19:46:46.768 3967-3977/com.artproject I/art: Background sticky concurrent mark sweep GC freed 1840(73KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 6MB/6MB, paused 9.787ms total 20.292ms

When starting the app I always see lots of warnings, not sure if they are somehow related:
09-25 19:45:02.173 3967-3991/com.artproject D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true

                                                              [ 09-25 19:45:02.243  3967: 3967 D/         ]
                                                              HostConnection::get() New Host Connection established 0xaa496eb0, tid 3967

                                                              [ 09-25 19:45:02.309  3967: 3991 D/         ]
                                                              HostConnection::get() New Host Connection established 0xae827540, tid 3991
09-25 19:45:02.324 3967-3991/com.artproject I/OpenGLRenderer: Initialized EGL, version 1.4
09-25 19:45:02.939 3967-3991/com.artproject E/Surface: getSlotFromBufferLocked: unknown buffer: 0xae8313f0
09-25 19:45:02.989 3967-3967/com.artproject I/art: Thread[1,tid=3967,Native,Thread*=0xb4074500,peer=0x746c7258,"main"] recursive attempt to load library "/data/app/com.artproject-1/lib/x86/libfb.so"
09-25 19:45:03.020 3967-4000/com.artproject W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTRenderableViewManager
09-25 19:45:03.021 3967-4000/com.artproject W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTGroupShadowNode
09-25 19:45:03.037 3967-4000/com.artproject W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTShapeShadowNode
09-25 19:45:03.038 3967-4000/com.artproject W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTTextShadowNode
09-25 19:45:03.038 3967-4000/com.artproject W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTSurfaceViewManager
09-25 19:45:03.040 3967-4000/com.artproject W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTSurfaceViewShadowNode
09-25 19:45:03.066 3967-4000/com.artproject W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.picker.ReactDialogPickerManager
09-25 19:45:03.069 3967-4000/com.artproject W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.uimanager.LayoutShadowNode
09-25 19:45:03.070 3967-4000/com.artproject W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.drawer.ReactDrawerLayoutManager
09-25 19:45:03.086 3967-4000/com.artproject W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.picker.ReactDropdownPickerManager
09-25 19:45:03.087 3967-4000/com.artproject W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.scroll.ReactHorizontalScrollViewManager
09-25 19:45:03.091 3967-4000/com.artproject W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.image.ReactImageManager
09-25 19:45:03.168 3967-4000/com.artproject W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.modal.ReactModalHostManager
09-25 19:45:03.168 3967-4000/com.artproject W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.modal.ModalHostShadowNode
09-25 19:45:03.169 3967-4000/com.artproject W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.progressbar.ReactProgressBarViewManager
09-25 19:45:03.171 3967-4000/com.artproject W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.progressbar.ProgressBarShadowNode
09-25 19:45:03.171 3967-4000/com.artproject W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactRawTextManager
09-25 19:45:03.172 3967-4000/com.artproject W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactTextShadowNode

I am happy to post my application code if that will help.

+1
I found that we were way more likely to see this issue if we were making a ton of Surfaces (eg. 30+).  Though, it's unclear if the high number of Surfaces is the cause or is just increasing the likelihood of any single Surface intermittently crashing.
And I found an anecdotal correlation between the crash happening and the js thread fps dropping below 10fps or so, but take that with a grain of salt.

Do you use images / fresco?
--
Sent from my iPhone

On 11 Oct 2016, at 09:40, Alan Jones<EMAIL_ADDRESS>wrote:
+1
I found that we were way more likely to see this issue if we were making a ton of Surfaces (eg. 30+). Though, it's unclear if the high number of Surfaces is the cause or is just increasing the likelihood of any single Surface intermittently crashing.
And I found an anecdotal correlation between the crash happening and the js thread fps dropping below 10fps or so, but take that with a grain of salt.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

This comment in the react-native-svg repo solved this crash for me. To save you from clicking thru, I added:
shouldComponentUpdate() {
  return false;
}

to all my SVG components.  Note this may not help you if you are animating your SVGs.

After following @fab1an 's comments through a couple of repositories, it seems that this is actually the result of a bug in the fresco library, which React Native uses under the hood to render and animate SVG's - https://github.com/facebook/fresco/issues/1363#issuecomment-233865933

I'm experiencing a lot of crashes since upgrading from react native 0.34.0 to 0.35.0 when working with Svg components (using react-native-svg).
I'm getting the same error:
A/libc: Fatal signal 11 (SIGSEGV), code -6, fault addr 0x3c08 in tid 23384 (mqt_js)
I've tried doing
shouldComponentUpdate() {   return false; } but I can't do that on all Components.
Also, if I try to narrow it down to a specific component (by removing the others) I can't reproduce the crash with specific components, and it seems like I need to have at least a few of them rendering for the app to crash (some minimum amount of components rendering otherwise it won't crash).
If I return to react native 0.34.0 it doesn't seem to happen, or at least I haven't been able to make it crash on 0.34.0 yet.
Anybody know of other solutions to this or at least how I can better debug it and get more detailed info from the crash?

We are experiencing the same problems.

On 25 Oct 2016, at 13:58, zoharlevin<EMAIL_ADDRESS>wrote:
I'm experiencing a lot of crashes since upgrading from react native 0.34.0 to 0.35.0 when working with Svg components (using react-native-svg).
I'm getting the same error:
A/libc: Fatal signal 11 (SIGSEGV), code -6, fault addr 0x3c08 in tid 23384 (mqt_js)
I've tried doing
shouldComponentUpdate() {
return false;
} but I can't do that on all Components.
Also, if I try to narrow it down to a specific component (by removing the others) I can't reproduce the crash with specific components, and it seems like I need to have at least a few of them rendering for the app to crash (some minimum amount of components rendering otherwise it won't crash).
If I return to react native 0.34.0 it doesn't seem to happen, or at least I haven't been able to make it crash on 0.34.0 yet.
Anybody know of other solutions to this or at least how I can better debug it and get more detailed info from the crash?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I put together a repo that reproduces the crash, just clone and npm install
https://github.com/happypancake/animatedcrash
When we run it with JS Dev Mode turned on in an Android emulator, or an older device (Galaxy Nexus) it crashes reliably after 3-20 clicks on the heart. With JS Dev Mode off, my fingers got tired before any crashes. Same on a modern flagship phone with JS Dev Mode on, seemingly no crashes.

Still getting crashes in the test repo above with RN 0.37

+1 RN 0.34.1

+1 RN 0.37

Same problem here with RN 0.38.0 on Android 5. A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0xcbd400a4 in tid 15158 (mqt_js)
I can reproduce it with animatedcrash app made by @iggyfisk (thanks!) when JS Dev Mode is on. I can not reproduce it on my app and animatedcrash app when JS Dev Mode is off.
I don't use ART directly in my app. (Not sure the libraries use it.) Probably, it's Animated's problem.

I have fixed this in my react-native-svg library.
It's the parsed d data caused the crash, the d prop after serialized is quit large, and transport it through the JSBridge frequently will crash the app.
Just move the d parsing to the native side will fix this.
https://github.com/react-native-community/react-native-svg/commit/4112d60c52c1cd92321907fe35e15efe8208fc03#diff-5245fbc6ed7e8fbcf2c1239beb8059e0

I threw away the react-native bridge WritableMap/WritableArray, replaced it with using only strings and saw much improved performance: https://github.com/facebook/react-native/issues/10504

We might have found the cause for this crash, see PR #11804. Can you check whether the proposed fix solves this crash?

Having the same problem when i render a big amount of svg's.
React-Native v0.31
Samsung S5 mini, Android v5.1.1
I/art     (13459): Clamp target GC heap from 142MB to 128MB
I/art     (13459): Alloc partial concurrent mark sweep GC freed 8(256B) AllocSpace objects, 0(0B) LOS objects, 1% free, 126MB/128MB, paused 993us total 25.267ms
I/art     (13459): Clamp target GC heap from 142MB to 128MB
I/art     (13459): Alloc concurrent mark sweep GC freed 5(160B) AllocSpace objects, 0(0B) LOS objects, 1% free, 126MB/128MB, paused 1.106ms total 32.160ms
I/art     (13459): Forcing collection of SoftReferences for 1480KB allocation
I/art     (13459): Clamp target GC heap from 142MB to 128MB
I/art     (13459): Alloc concurrent mark sweep GC freed 4(128B) AllocSpace objects, 0(0B) LOS objects, 1% free, 126MB/128MB, paused 1.187ms total 31.849ms
E/art     (13459): Throwing OutOfMemoryError "Failed to allocate a 1516012 byte allocation with 1467240 free bytes and 1432KB until OOM"
E/AndroidRuntime(13459): FATAL EXCEPTION: mqt_native_modules
E/AndroidRuntime(13459): Process: com.MyApp, PID: 13459
E/AndroidRuntime(13459): java.lang.OutOfMemoryError: Failed to allocate a 1516012 byte allocation with 1467240 free bytes and 1432KB until OOM
E/AndroidRuntime(13459): at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
E/AndroidRuntime(13459): at android.graphics.Bitmap.nativeCreate(Native Method)
E/AndroidRuntime(13459): at android.graphics.Bitmap.createBitmap(Bitmap.java:942)
E/AndroidRuntime(13459): at android.graphics.Bitmap.createBitmap(Bitmap.java:913)
E/AndroidRuntime(13459): at android.graphics.Bitmap.createBitmap(Bitmap.java:880)
E/AndroidRuntime(13459): at com.horcrux.svg.RNSVGSvgViewShadowNode.drawOutput(RNSVGSvgViewShadowNode.java:45)
E/AndroidRuntime(13459): at com.horcrux.svg.RNSVGSvgViewShadowNode.onCollectExtraUpdates(RNSVGSvgViewShadowNode.java:41)
E/AndroidRuntime(13459): at com.facebook.react.uimanager.ReactShadowNode.dispatchUpdates(ReactShadowNode.java:200)
E/AndroidRuntime(13459): at com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:769)
E/AndroidRuntime(13459): at com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:759)
E/AndroidRuntime(13459): at com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:759)
E/AndroidRuntime(13459): at com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:759)
E/AndroidRuntime(13459): at com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:759)
E/AndroidRuntime(13459): at com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:759)
E/AndroidRuntime(13459): at com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:759)
E/AndroidRuntime(13459): at com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:759)
E/AndroidRuntime(13459): at com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:759)
E/AndroidRuntime(13459): at com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:759)
E/AndroidRuntime(13459): at com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:759)
E/AndroidRuntime(13459): at com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:759)
E/AndroidRuntime(13459): at com.facebook.react.uimanager.UIImplementation.updateViewHierarchy(UIImplementation.java:517)
E/AndroidRuntime(13459): at com.facebook.react.uimanager.UIImplementation.dispatchViewUpdates(UIImplementation.java:505)
E/AndroidRuntime(13459): at com.facebook.react.uimanager.UIManagerModule.onBatchComplete(UIManagerModule.java:480)
E/AndroidRuntime(13459): at com.facebook.react.cxxbridge.NativeModuleRegistry.onBatchComplete(NativeModuleRegistry.java:99)
E/AndroidRuntime(13459): at com.facebook.react.cxxbridge.CatalystInstanceImpl$BridgeCallback.onBatchComplete(CatalystInstanceImpl.java:129)
E/AndroidRuntime(13459): at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
E/AndroidRuntime(13459): at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime(13459): at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(13459): at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
E/AndroidRuntime(13459): at android.os.Looper.loop(Looper.java:145)
E/AndroidRuntime(13459): at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)
E/AndroidRuntime(13459): at java.lang.Thread.run(Thread.java:818)
W/ActivityManager( 2351):   Force finishing activity 1 com.MyApp/.MainActivity
D/InputDispatcher( 2351): Focused application set to: xxxx
D/InputDispatcher( 2351): Focus left window: 13459
D/PointerIcon( 2351): setMouseIconStyle1 pointerType: 1001 iconType:101 flag:0 pid:2351 uid:1000
D/PointerIcon( 2351): setMouseCustomIcon IconType is same.101
D/PointerIcon( 2351): setHoveringSpenIconStyle1 pointerType: 10001 iconType:1 flag:0 pid:2351 uid:1000
D/PointerIcon( 2351): setHoveringSpenCustomIcon IconType is same.1

For me adding: android:largeHeap="true" in the application in the AndroidManifest resolve the issue.
    <application
      android:name=".MainApplication"
      android:allowBackup="true"
      android:label="MyLabel"
      android:icon="@mipmap/ic_launcher"
      android:largeHeap="true"
      android:theme="@style/AppTheme">

I'm not rendering anything special but after adding ActivityIndicator to my login page, application stopped working.
@flaviotobi 's workaround solved my issue. :+1:

+1

+1, just got this

Why is this closed while still happening?
I'm on 0.47.2.

^^ See my comment.

@hramos Which one?

I mean, see the facebook-open-source-bot comment left when I closed the issue - it explains why the issue was closed.

Also have this. Use this library. As I see, there is no Animated, just ART

The issue still persists! Any help would be appreciated.

still get this issue, I have try 3 diff android emulator, on Nexus 4 API 22, it is just work fine, on Nexus 5X API 23, it crash with ``, on Nexus 6 API P, it is work fine too.
crash logs:
05-05 13:26:37.554 3331-3331/com.elecirc.MobiNG A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0xd5dc8000 in tid 3331 (.elecirc.MobiNG)
05-05 13:26:37.556 3331-3356/com.elecirc.MobiNG A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xbbadbeef in tid 3356 (mqt_js)

05-05 13:26:37.656 1324-1324/?  A/DEBUG: Build fingerprint: 'Android/sdk_google_phone_x86_64/generic_x86_64:6.0/MASTER/4660549:userdebug/test-keys'
05-05 13:26:37.656 1324-1324/? A/DEBUG: Revision: '0'
05-05 13:26:37.656 1324-1324/? A/DEBUG: ABI: 'x86'
05-05 13:26:37.656 1324-1324/? A/DEBUG: pid: 3331, tid: 3331, name: .elecirc.MobiNG  >>> com.elecirc.MobiNG <<<
05-05 13:26:37.656 1324-1324/? A/DEBUG: signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xd5dc8000
05-05 13:26:37.661 1324-1324/? A/DEBUG:     eax 000b4200  ebx ea1deeb4  ecx 00027080  edx f40be0bc
05-05 13:26:37.661 1324-1324/? A/DEBUG:     esi d4c81000  edi d5dc8000
05-05 13:26:37.661 1324-1324/? A/DEBUG:     xcs 00000023  xds 0000002b  xes 0000002b  xfs 00000007  xss 0000002b
05-05 13:26:37.661 1324-1324/? A/DEBUG:     eip ea1d8a38  ebp 003fffc4  esp ffec5204  flags 00210202
05-05 13:26:37.667 1324-1324/? A/DEBUG: backtrace:
05-05 13:26:37.667 1324-1324/? A/DEBUG:     #00 pc 00002a38  /system/lib/libOpenglSystemCommon.so (goldfish_dma_write(goldfish_dma_context*, void*, unsigned int)+56)
05-05 13:26:37.667 1324-1324/? A/DEBUG:     #01 pc 00003853  /system/lib/libOpenglSystemCommon.so (ExtendedRCEncoderContext::lockAndWriteDma(void*, unsigned int)+67)
05-05 13:26:37.667 1324-1324/? A/DEBUG:     #02 pc 00003062  /system/lib/lib_renderControl_enc.so
05-05 13:26:37.667 1324-1324/? A/DEBUG:     #03 pc 0000314e  /system/lib/hw/gralloc.ranchu.so
05-05 13:26:37.667 1324-1324/? A/DEBUG:     #04 pc 0000a351  /system/lib/libui.so (android::GraphicBufferMapper::unlockAsync(native_handle const*, int*)+113)
05-05 13:26:37.667 1324-1324/? A/DEBUG:     #05 pc 000086f1  /system/lib/libui.so (android::GraphicBuffer::unlockAsync(int*)+49)
05-05 13:26:37.667 1324-1324/? A/DEBUG:     #06 pc 0006bae6  /system/lib/libgui.so (android::Surface::unlockAndPost()+70)
05-05 13:26:37.667 1324-1324/? A/DEBUG:     #07 pc 000b6b00  /system/lib/libandroid_runtime.so
05-05 13:26:37.667 1324-1324/? A/DEBUG:     #08 pc 73827746  /data/dalvik-cache/x86/system<EMAIL_ADDRESS>(offset 0x1eb2000)


Move this repo to kubernetes-retired?

This project has been archived.
This project has been merged into the central Kubernetes docs repository.

This is the exact reason https://github.com/kubernetes-retired exists. Should we move this to kubernetes-retired/kubernetes-bootcamp?

  I'll look into it


Add Windows Ink section in Privacy > Writing assistance

Rendered article section for review:
https://review.learn.microsoft.com/microsoft-edge/privacy-whitepaper/?branch=pr-en-us-3002#windows-ink
AB#48345068

LGTM, thanks all for the review!


[vcpkg] some vcpkg parts fail due to invocation of vcvarsall.bat when cmd has autorun set up

Host Environment

OS: Windows 10
Compiler: MSVC 2017.

To Reproduce

Have similar autorun config to me;
./vcpkg install gtk:x64-windows

Failure logs
[…]
Starting package 1/21: libepoxy:x64-windows
Building package libepoxy[core]:x64-windows...
'"\clink.bat"' is not recognized as an internal or external command,
operable program or batch file.
-- Using cached C:/code/gtk/vcpkg/downloads/anholt-libepoxy-1.5.3.tar.gz
-- Using source at C:/code/gtk/vcpkg/buildtrees/libepoxy/src/1.5.3-d7b9d32fcb
-- Configuring x64-windows-rel
-- Configuring x64-windows-rel done
-- Configuring x64-windows-dbg
-- Configuring x64-windows-dbg done
-- Package x64-windows-rel
-- Package x64-windows-dbg
Error: Building package libepoxy:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: libepoxy:x64-windows
  Vcpkg version: 2019.09.12-nohash

Additionally, attach any relevant sections from the log files above.

Additional context
I have HKEY_CURRENT_USER\Software\Microsoft\Command Processor\Autorun set to C:\Users\me\AppData\Local\autorun.cmd, and that file contains the following:

@echo off
set LS_COLORS=[long value, skipping]
chcp 65001 > NUL
doskey /macrofile=%LOCALAPPDATA%\doskey-macros
"%CLINK_DIR%\clink.bat" inject --quiet --profile "%LOCALAPPDATA%\clink"

When attempting to install GTK, it failed until I stubbed autorun.cmd out. I’m not actually certain which line caused it to fail, but I’m guessing it was CLINK_DIR, which is set in my environment, but I suppose something in the stack resets the environment, causing it to be absent, and the autorun.cmd to fail.
All cmd invocations should be run with the /D (“Disable execution of AutoRun commands from registry”) option.

I have same problem please help me!

@ras0219-msft Can you have a look?
Thanks.

@chris-morgan

When exeute ./vcpkg install xxx, the script vcvarsall.bat will be called for setting the compilation environment. However, when the AutoRun is added into HKEY_CURRENT_USER\Software\Microsoft\Command Processor or HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor,  vcvarsall.bat failed to run.
This is a known issue in VS, and you could get more info from here.

About use /D option when call the cmd script, it will affect the execution of vcvarsall.bat, then the compilation environment cannot be set successfully.

This issue still occurs in the latest vcpkg(2021-08-03-1a6d67b8150e94b7f473c6ab1c0cfd).

Fixed by PR https://github.com/microsoft/vcpkg-tool/pull/1201


boards: arm: lpcxpresso55s36: add boot and slot1 flash partitions.

Add boot_partition and slot1_partition to the lpcxpresso55s36 dts.


basic sorting implementation

Hi,
First, I'm probably missing something very obvious, but I've spent too much time on this, so I figured I'd ask for help :)
I'm just trying to implement a basic local sort using computed.sort. The table initially has no records. After selecting a date range from a calendar, it then calls fetchRecords. I can see the data loading, but no rows are displayed. If I change:
let table = new Table(this.get('columns'), this.get('sortedModel'), { enableSync: true });
to
let table = new Table(this.get('columns'), this.get('model'), { enableSync: true });
the records appear as expected.
Here's a more complete version of the code:
import Ember from 'ember';
import Table from 'ember-light-table';
import { task, timeout } from 'ember-concurrency';

const { A, Component, computed, inject, isEmpty } = Ember;

export default Component.extend({
  store: inject.service(),
  time: inject.service(),

  table: null,
  model: null,

  sortBy: ['staff.lastName'],

  sortedModel: computed.sort('model', 'sortBy'),

  columns: [
    {
      label: 'First Name',
      valuePath: 'staff.firstName',
      width: '20%'
    },
    {
      label: 'Last Name',
      valuePath: 'staff.lastName',
      width: '20%'
    },
    {
      cellComponent: 'currency-formatter',
      label: 'Total',
      valuePath: 'total',
      width: '20%'
    },
    {
      cellComponent: 'table-row-chevron',
      width: '40%'
    }
  ],

  init() {
    this._super(...arguments);

    this.set('model', A([]));
    this.set('filter', {
      start: null,
      end: null
    });

    let table = new Table(this.get('columns'), this.get('sortedModel'), { enableSync: true });
    this.set('table', table);

    let sortColumn = table.get('allColumns').findBy('valuePath', this.get('sortBy'));

    // Setup initial sort column
    if (sortColumn) {
      sortColumn.set('sorted', true);
    }
  },

  /**
   * Fetches records from the API.
   * @protected
   */
  fetchRecords: task(function* () {
    yield timeout(400);

    const params = {
      filter: this.get('filter')
    };

    const records = yield this.get('store').query('pay-stub', params);
    this.get('model').pushObjects(records.toArray());

  }).restartable(),

Am I missing how enableSync behaves?
Thank you!

@jamesdixon I think your issue is computed.sort('model', 'sortBy') which (I believe) returns a new array instance every time. enableSync only works when you are changing the passed array instance. Since every time there is a change in the model, the CP returns a new instance which is fine if you are just observer the property. The table isnt observing the CP, its observing changes on the passed instance. Can you verify if this is the case?

@jamesdixon @offirgolan yeah I ran into the same thing. I ended up having to clear the (separate) array that ELT is observing and load records into it based on the results of the sort.

@offirgolan could we have ELT go ahead and rerender when a fully new array is passed as well?

@offirgolan that does seem to be the case. Given that I'm not doing any pagination on this particular record set, I've just disabled enableSync and then did the following:
  fetchRecords: task(function* () {
    yield timeout(400);

    const params = {
      filter: this.get('filter')
    };

    const records = yield this.get('store').query('pay-stub', params);
    this.get('table').setRows(this.get('sortedModel'));

  }).restartable(),

That said, I'm wondering if it would be good to show an example of this somewhere in the docs for those who aren't doing any sort of server-side manipulation of the records. Thoughts?

could we have ELT go ahead and rerender when a fully new array is passed as well?

I dont think thats a good idea nor do I know if I want to go that route. The point of enableSync is that it keeps two arrays in sync. The passed data instance, the table's rows instance. If the data instance is not constant, then you shouldnt really be using enableSync 😄
@jamesdixon I think your alt solution is solid. Thats the way I've done it in multiple apps.

That said, I'm wondering if it would be good to show an example of this somewhere in the docs for those who aren't doing any sort of server-side manipulation of the records.

I'm not really sure we can do that in the current demo app. Sort needs to happen server side since the data is paginated and exists on the mock server. Maybe we can include a small example of sorting in the docs but I'm not really sure where that would go either. Maybe in a cookbook sort of page / module?

@offirgolan a "cookbook"-type page is exactly what I was thinking originally. Sort of like is done on the Ember Power Select site.

@jamesdixon the docs use yuidoc so the cookbook will have to be in some file in the code base, which kinda sucks, but I think a cookbook type page would deem pretty useful. I'll take a look into this and see what I can do.
Im gonna make a new issue for it and add this task to it.

@jamesdixon cookbook page is now live 😄 !