Satayev's blog

By Satayev, 11 years ago, In English

I'm trying out the new Java 8 features, and decided to implement the easy problems with the new lambda functions. I have experienced RUNTIME ERROR twice though. Am I doing something completely wrong, or perhaps the system needs some tweaking to better support Java 8?

http://mirror.codeforces.com/contest/25/submission/6666271

http://mirror.codeforces.com/contest/38/submission/6667775

Both submissions fail with the same runtime error (different pid's obviously):
A fatal error has been detected by the Java Runtime Environment:
Internal Error (0xc06d007e), pid=5512, tid=4272
JRE version: Java(TM) SE Runtime Environment (8.0-b132) (build 1.8.0-b132)
Java VM: Java HotSpot(TM) Server VM (25.0-b70 mixed mode windows-x86 )
Problematic frame:
C  [KERNELBASE.dll+0xc41f]
Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
An error report file with more information is saved as:
C:\Contesters\Work\invoker-...

The first submission gets accepted after removing parallel() from "...IntStream.of(a).parallel().map(...", otherwise fails on test #1.

Curiously, the second submission passes the first 12 test cases, and only fails on the 13th. Anyone can explain what's going on here please? I can only guess it has something to do with "parallelism", yet the second submission doesn't fail immediately (is it because java doesn't parallelize for the early test cases, and only does so for the 13th one?).

  • Vote: I like it
  • +8
  • Vote: I do not like it

»
11 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Apparently it is related to http://mirror.codeforces.com/blog/entry/12146

Also, the smallest subtask array partition size to use as threshold is set to 16 in JDK8, which should explain why the second submission passes the first 12 test cases.