Steps to Reproduce
Create a Flutter project.
Make a list of containers.
run .map() function on it which returns Positioned() widget.
Use a list of these positioned widgets inside a Stack.
If you use paraments like top, left etc., no output will be given.
If these are ignored, it works like a charm.
Execute flutter run on the code sample
Expected results:
After removing top parameter. Even just using top: 25 gives no output.
Actual results:
Code sample
import "package:flutter/material.dart";
class StackedList extends StatefulWidget {
const StackedList({
required this.children,
this.activeItemCount = 3,
super.key,
});
//List containing all the widgets to be showed as part of stacked UI
final List<Widget> children;
//number of items shown
final int activeItemCount;
#override
State<StackedList> createState() => _StackedListState();
}
class _StackedListState extends State<StackedList> {
#override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Stack(
children:
widget.children.map((element) {
final index = widget.children.indexOf(element);
return Positioned(
top: 200 + (index * 10),
child: Transform.scale(
scale: 1 - (index / 20),
child: element,
),
);
}).toList()
),
));
}
}
final childrens = <Widget>[
Container(
height: 75,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
color: Colors.green,
),
),
Container(
height: 75,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
color: Colors.greenAccent,
),
),
Container(
height: 75,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
color: Colors.grey,
),
),
Container(
height: 75,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
color: Colors.brown,
),
)
],
Logs
No error logs
[ ] Transforming lifecycle-runtime-2.2.0.aar (androidx.lifecycle:lifecycle-runtime:2.2.0) with
ExtractAarTransform
[ ] Transforming lifecycle-runtime-2.2.0.aar (androidx.lifecycle:lifecycle-runtime:2.2.0) with AarTransform
[ ] Transforming lifecycle-runtime-2.2.0.aar (androidx.lifecycle:lifecycle-runtime:2.2.0) with JetifyTransform
[ ] Transforming lifecycle-runtime-2.2.0.aar (androidx.lifecycle:lifecycle-runtime:2.2.0) with
ExtractAarTransform
[ ] Transforming lifecycle-runtime-2.2.0.aar (androidx.lifecycle:lifecycle-runtime:2.2.0) with AarTransform
[ ] Transforming savedstate-1.0.0.aar (androidx.savedstate:savedstate:1.0.0) with JetifyTransform
[ ] Transforming savedstate-1.0.0.aar (androidx.savedstate:savedstate:1.0.0) with ExtractAarTransform
[ ] Transforming savedstate-1.0.0.aar (androidx.savedstate:savedstate:1.0.0) with AarTransform
[ ] Transforming lifecycle-livedata-2.0.0.aar (androidx.lifecycle:lifecycle-livedata:2.0.0) with
JetifyTransform
[ ] Transforming lifecycle-livedata-2.0.0.aar (androidx.lifecycle:lifecycle-livedata:2.0.0) with
ExtractAarTransform
[ ] Transforming lifecycle-livedata-2.0.0.aar (androidx.lifecycle:lifecycle-livedata:2.0.0) with AarTransform
[ ] Transforming lifecycle-livedata-core-2.0.0.aar (androidx.lifecycle:lifecycle-livedata-core:2.0.0) with
JetifyTransform
[ ] Transforming lifecycle-livedata-core-2.0.0.aar (androidx.lifecycle:lifecycle-livedata-core:2.0.0) with
ExtractAarTransform
[ ] Transforming lifecycle-livedata-core-2.0.0.aar (androidx.lifecycle:lifecycle-livedata-core:2.0.0) with
AarTransform
[ ] Transforming lifecycle-common-2.2.0.jar (androidx.lifecycle:lifecycle-common:2.2.0) with JetifyTransform
[ ] Transforming lifecycle-common-2.2.0.jar (androidx.lifecycle:lifecycle-common:2.2.0) with
ExtractJniTransform
[ ] Transforming tracing-1.0.0.aar (androidx.tracing:tracing:1.0.0) with JetifyTransform
[ ] Transforming tracing-1.0.0.aar (androidx.tracing:tracing:1.0.0) with ExtractAarTransform
[ ] Transforming tracing-1.0.0.aar (androidx.tracing:tracing:1.0.0) with AarTransform
[ ] Transforming core-runtime-2.0.0.aar (androidx.arch.core:core-runtime:2.0.0) with JetifyTransform
[ ] Transforming core-runtime-2.0.0.aar (androidx.arch.core:core-runtime:2.0.0) with ExtractAarTransform
[ ] Transforming core-runtime-2.0.0.aar (androidx.arch.core:core-runtime:2.0.0) with AarTransform
[ ] Transforming core-common-2.1.0.jar (androidx.arch.core:core-common:2.1.0) with JetifyTransform
[ ] Transforming core-common-2.1.0.jar (androidx.arch.core:core-common:2.1.0) with ExtractJniTransform
[ ] Transforming versionedparcelable-1.1.1.aar (androidx.versionedparcelable:versionedparcelable:1.1.1) with
JetifyTransform
[ ] Transforming versionedparcelable-1.1.1.aar (androidx.versionedparcelable:versionedparcelable:1.1.1) with
ExtractAarTransform
[ ] Transforming versionedparcelable-1.1.1.aar (androidx.versionedparcelable:versionedparcelable:1.1.1) with
AarTransform
[ ] Transforming collection-1.1.0.jar (androidx.collection:collection:1.1.0) with JetifyTransform
[ ] Transforming collection-1.1.0.jar (androidx.collection:collection:1.1.0) with ExtractJniTransform
[ ] Transforming lifecycle-viewmodel-2.1.0.aar (androidx.lifecycle:lifecycle-viewmodel:2.1.0) with
JetifyTransform
[ ] Transforming lifecycle-viewmodel-2.1.0.aar (androidx.lifecycle:lifecycle-viewmodel:2.1.0) with
ExtractAarTransform
[ ] Transforming lifecycle-viewmodel-2.1.0.aar (androidx.lifecycle:lifecycle-viewmodel:2.1.0) with AarTransform[ ] Transforming annotation-1.2.0.jar (androidx.annotation:annotation:1.2.0) with JetifyTransform
[ ] Transforming annotation-1.2.0.jar (androidx.annotation:annotation:1.2.0) with ExtractJniTransform
[ ] Transforming kotlin-stdlib-1.7.10.jar (org.jetbrains.kotlin:kotlin-stdlib:1.7.10) with JetifyTransform
[ ] Transforming kotlin-stdlib-1.7.10.jar (org.jetbrains.kotlin:kotlin-stdlib:1.7.10) with ExtractJniTransform
[ ] Transforming annotation-experimental-1.1.0.aar (androidx.annotation:annotation-experimental:1.1.0) with
JetifyTransform
[ ] Transforming annotation-experimental-1.1.0.aar (androidx.annotation:annotation-experimental:1.1.0) with
ExtractAarTransform
[ ] Transforming annotation-experimental-1.1.0.aar (androidx.annotation:annotation-experimental:1.1.0) with
AarTransform
[ ] Transforming kotlin-stdlib-common-1.7.10.jar (org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10) with
JetifyTransform
[ ] Transforming kotlin-stdlib-common-1.7.10.jar (org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10) with
ExtractJniTransform
[ ] Transforming annotations-13.0.jar (org.jetbrains:annotations:13.0) with JetifyTransform
[ ] Transforming annotations-13.0.jar (org.jetbrains:annotations:13.0) with ExtractJniTransform
[ ] Caching disabled for task ':app:mergeDebugNativeLibs' because:
[ ] Build cache is disabled
[ ] Skipping task ':app:mergeDebugNativeLibs' as it is up-to-date.
[ ] :app:mergeDebugNativeLibs (Thread[Execution worker Thread 4,5,main]) completed. Took 0.007 secs.
[ ] Resolve mutations for :app:stripDebugDebugSymbols (Thread[Execution worker Thread 5,5,main]) started.
[ ] Resolve mutations for :app:stripDebugDebugSymbols (Thread[Execution worker Thread 5,5,main]) completed.
Took 0.0 secs.
[ ] :app:stripDebugDebugSymbols (Thread[Execution worker Thread 4,5,main]) started.
[ ] > Task :app:stripDebugDebugSymbols UP-TO-DATE
[ ] Caching disabled for task ':app:stripDebugDebugSymbols' because:
[ ] Build cache is disabled
[ ] Skipping task ':app:stripDebugDebugSymbols' as it is up-to-date.
[ ] :app:stripDebugDebugSymbols (Thread[Execution worker Thread 4,5,main]) completed. Took 0.001 secs.
[ ] Resolve mutations for :app:validateSigningDebug (Thread[Execution worker Thread 5,5,main]) started.
[ ] Resolve mutations for :app:validateSigningDebug (Thread[Execution worker Thread 5,5,main]) completed. Took
0.0 secs.
[ ] :app:validateSigningDebug (Thread[Execution worker Thread 5,5,main]) started.
[ ] > Task :app:validateSigningDebug UP-TO-DATE
[ ] Caching disabled for task ':app:validateSigningDebug' because:
[ ] Build cache is disabled
[ ] Skipping task ':app:validateSigningDebug' as it is up-to-date.
[ ] :app:validateSigningDebug (Thread[Execution worker Thread 5,5,main]) completed. Took 0.0 secs.
[ ] Resolve mutations for :app:writeDebugAppMetadata (Thread[Execution worker Thread 4,5,main]) started.
[ ] Resolve mutations for :app:writeDebugAppMetadata (Thread[Execution worker Thread 4,5,main]) completed. Took0.0 secs.
[ ] :app:writeDebugAppMetadata (Thread[Execution worker Thread 4,5,main]) started.
[ ] > Task :app:writeDebugAppMetadata UP-TO-DATE
[ ] Caching disabled for task ':app:writeDebugAppMetadata' because:
[ ] Build cache is disabled
[ ] Skipping task ':app:writeDebugAppMetadata' as it is up-to-date.
[ ] Resolve mutations for :app:writeDebugSigningConfigVersions (Thread[Execution worker Thread 5,5,main])
started.
[ ] Resolve mutations for :app:writeDebugSigningConfigVersions (Thread[Execution worker Thread 5,5,main])
completed. Took 0.0 secs.
[ ] :app:writeDebugAppMetadata (Thread[Execution worker Thread 4,5,main]) completed. Took 0.001 secs.
[ ] :app:writeDebugSigningConfigVersions (Thread[Execution worker Thread 5,5,main]) started.
[ ] > Task :app:writeDebugSigningConfigVersions UP-TO-DATE
[ ] Caching disabled for task ':app:writeDebugSigningConfigVersions' because:
[ ] Build cache is disabled
[ ] Skipping task ':app:writeDebugSigningConfigVersions' as it is up-to-date.
[ ] :app:writeDebugSigningConfigVersions (Thread[Execution worker Thread 5,5,main]) completed. Took 0.002 secs.[ ] > Task :app:compressDebugAssets
[ ] Execution optimizations have been disabled for task ':app:compressDebugAssets' to ensure correctness due tothe following reasons:
[ ] - Gradle detected a problem with the following location: 'C:\Code
Projects\amazon_echo_page\build\app\intermediates\assets\debug\mergeDebugAssets'. Reason: Task
':app:compressDebugAssets' uses this output of task ':app:copyFlutterAssetsDebug' without declaring an explicit or
implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are
executed. Please refer to https://docs.gradle.org/7.5/userguide/validation_problems.html#implicit_dependency for more
details about this problem.
[ ] Invalidating VFS because task ':app:compressDebugAssets' failed validation
[ ] Not watching anything anymore
[ ] Watching 0 directory hierarchies to track changes
[ ] Caching disabled for task ':app:compressDebugAssets' because:
[ ] Build cache is disabled
[ ] Task ':app:compressDebugAssets' is not up-to-date because:
[ ] Incremental execution has been disabled to ensure correctness. Please consult deprecation warnings for
more details.
[ ] The input changes require a full rebuild for incremental task ':app:compressDebugAssets'.
[ ] :app:compressDebugAssets (Thread[Execution worker Thread 6,5,main]) completed. Took 0.681 secs.
[ ] Resolve mutations for :app:packageDebug (Thread[Execution worker Thread 5,5,main]) started.
[ +23 ms] Resolve mutations for :app:packageDebug (Thread[Execution worker Thread 5,5,main]) completed. Took 0.0
secs.
[ ] :app:packageDebug (Thread[Execution worker Thread 6,5,main]) started.
[ ] > Task :app:packageDebug UP-TO-DATE
[ ] Caching disabled for task ':app:packageDebug' because:
[ ] Build cache is disabled
[ ] Skipping task ':app:packageDebug' as it is up-to-date.
[ ] :app:packageDebug (Thread[Execution worker Thread 6,5,main]) completed. Took 0.007 secs.
[ ] Resolve mutations for :app:createDebugApkListingFileRedirect (Thread[Execution worker Thread 6,5,main])
started.
[ ] Resolve mutations for :app:createDebugApkListingFileRedirect (Thread[Execution worker Thread 6,5,main])
completed. Took 0.0 secs.
[ ] :app:createDebugApkListingFileRedirect (Thread[Execution worker Thread 6,5,main]) started.
[ ] producer locations for task group 0 (Thread[Execution worker,5,main]) started.
[ ] producer locations for task group 0 (Thread[Execution worker,5,main]) completed. Took 0.0 secs.
[ ] > Task :app:createDebugApkListingFileRedirect UP-TO-DATE
[ ] Caching disabled for task ':app:createDebugApkListingFileRedirect' because:
[ ] Build cache is disabled
[ ] Skipping task ':app:createDebugApkListingFileRedirect' as it is up-to-date.
[ ] :app:createDebugApkListingFileRedirect (Thread[Execution worker Thread 6,5,main]) completed. Took 0.001
secs.
[ ] Resolve mutations for :app:assembleDebug (Thread[Execution worker Thread 6,5,main]) started.
[ ] Resolve mutations for :app:assembleDebug (Thread[Execution worker Thread 6,5,main]) completed. Took 0.0
secs.
[ ] :app:assembleDebug (Thread[Execution worker Thread 6,5,main]) started.
[ +25 ms] > Task :app:assembleDebug
[ ] Caching disabled for task ':app:assembleDebug' because:
[ ] Build cache is disabled
[ ] Task ':app:assembleDebug' is not up-to-date because:
[ ] Task has not declared any outputs despite executing actions.
[ ] :app:assembleDebug (Thread[Execution worker Thread 6,5,main]) completed. Took 0.104 secs.
[ ] Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
[ ] You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come
from your own scripts or plugins.
[ ] See https://docs.gradle.org/7.5/userguide/command_line_interface.html#sec:command_line_warnings
[ ] Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure
correctness.
[ ] Please consult deprecation warnings for more details.
[ ] BUILD SUCCESSFUL in 5s
[ ] 36 actionable tasks: 6 executed, 30 up-to-date
[ ] Watched directory hierarchies: []
[ +529 ms] Running Gradle task 'assembleDebug'... (completed in 6.5s)
[ +2 ms] Calculate SHA1: LocalDirectory: 'C:\Code
Projects\amazon_echo_page\build\app\outputs\flutter-apk'/app-debug.apk
[ +597 ms] √ Built build\app\outputs\flutter-apk\app-debug.apk.
[ +2 ms] executing: C:\src\Android\SDK\build-tools\33.0.1\aapt dump xmltree C:\Code
Projects\amazon_echo_page\build\app\outputs\flutter-apk\app-debug.apk AndroidManifest.xml
[ +24 ms] Exit code 0 from: C:\src\Android\SDK\build-tools\33.0.1\aapt dump xmltree C:\Code
Projects\amazon_echo_page\build\app\outputs\flutter-apk\app-debug.apk AndroidManifest.xml
[ ] N: android=http://schemas.android.com/apk/res/android
E: manifest (line=2)
A: android:versionCode(0x0101021b)=(type 0x10)0x1
A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
A: android:compileSdkVersion(0x01010572)=(type 0x10)0x21
A: android:compileSdkVersionCodename(0x01010573)="13" (Raw: "13")
A: package="com.example.amazon_echo_page" (Raw: "com.example.amazon_echo_page")
A: platformBuildVersionCode=(type 0x10)0x21
A: platformBuildVersionName=(type 0x10)0xd
E: uses-sdk (line=7)
A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
A: android:targetSdkVersion(0x01010270)=(type 0x10)0x21
E: uses-permission (line=15)
A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
E: application (line=17)
A: android:label(0x01010001)="amazon_echo_page" (Raw: "amazon_echo_page")
A: android:icon(0x01010002)=#0x7f080000
A: android:name(0x01010003)="android.app.Application" (Raw: "android.app.Application")
A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw:
"androidx.core.app.CoreComponentFactory")
E: activity (line=23)
A: android:theme(0x01010000)=#0x7f0a0000
A: android:name(0x01010003)="com.example.amazon_echo_page.MainActivity" (Raw:
"com.example.amazon_echo_page.MainActivity")
A: android:exported(0x01010010)=(type 0x12)0xffffffff
A: android:launchMode(0x0101001d)=(type 0x10)0x1
A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
E: meta-data (line=38)
A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw:
"io.flutter.embedding.android.NormalTheme")
A: android:resource(0x01010025)=#0x7f0a0001
E: intent-filter (line=42)
E: action (line=43)
A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
E: category (line=45)
A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw:
"android.intent.category.LAUNCHER")
E: meta-data (line=52)
A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
A: android:value(0x01010024)=(type 0x10)0x2
E: uses-library (line=56)
A: android:name(0x01010003)="androidx.window.extensions" (Raw: "androidx.window.extensions")
A: android:required(0x0101028e)=(type 0x12)0x0
E: uses-library (line=59)
A: android:name(0x01010003)="androidx.window.sidecar" (Raw: "androidx.window.sidecar")
A: android:required(0x0101028e)=(type 0x12)0x0
[ +6 ms] Stopping app 'app-debug.apk' on sdk gphone64 x86 64.
[ ] executing: C:\src\Android\SDK\platform-tools\adb.exe -s emulator-5554 shell am force-stop
com.example.amazon_echo_page
[ +65 ms] executing: C:\src\Android\SDK\platform-tools\adb.exe -s emulator-5554 shell pm list packages
com.example.amazon_echo_page
[ +97 ms] package:com.example.amazon_echo_page
[ +1 ms] executing: C:\src\Android\SDK\platform-tools\adb.exe -s emulator-5554 shell cat
/data/local/tmp/sky.com.example.amazon_echo_page.sha1
[ +47 ms] 3a2dbb94e641ceb1c011256a71b600fb6d6342f3
[ +1 ms] Latest build already installed.
[ ] executing: C:\src\Android\SDK\platform-tools\adb.exe -s emulator-5554 shell -x logcat -v time -t 1
[ +51 ms] --------- beginning of main
02-14 21:13:59.045 D/CarrierSvcBindHelper( 921): No carrier app for: 0
[ +4 ms] executing: C:\src\Android\SDK\platform-tools\adb.exe -s emulator-5554 shell am start -a
android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x20000000 --ez enable-dart-profiling true --ez
enable-checked-mode true --ez verify-entry-points true
com.example.amazon_echo_page/com.example.amazon_echo_page.MainActivity
[ +70 ms] Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x20000000
cmp=com.example.amazon_echo_page/.MainActivity (has extras) }
[ +1 ms] Waiting for observatory port to be available...
[ +559 ms] Observatory URL on device: http://127.0.0.1:36213/YB2WX5_tTgw=/
[ +1 ms] executing: C:\src\Android\SDK\platform-tools\adb.exe -s emulator-5554 forward tcp:0 tcp:36213
[ +40 ms] 60200
[ ] Forwarded host port 60200 to device port 36213 for Observatory
[ +4 ms] Caching compiled dill
[ +31 ms] Connecting to service protocol: http://127.0.0.1:60200/YB2WX5_tTgw=/
[ +262 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM service at
http://127.0.0.1:60200/YB2WX5_tTgw=/.
[ +171 ms] DDS is listening at http://127.0.0.1:60203/WwK9SPk9WF0=/.
[ +53 ms] Successfully connected to service protocol: http://127.0.0.1:60200/YB2WX5_tTgw=/
[ +71 ms] DevFS: Creating new filesystem on the device (null)
[ +31 ms] DevFS: Created new filesystem on the device
(file:///data/user/0/com.example.amazon_echo_page/code_cache/amazon_echo_pageNQVHSV/amazon_echo_page/)
[ +3 ms] Updating assets
[ +107 ms] Manifest contained wildcard assets. Inserting missing file into build graph to force rerun. for more
information see #56466.
[ +5 ms] Syncing files to device sdk gphone64 x86 64...
[ +3 ms] Compiling dart to kernel with 0 updated files
[ ] Processing bundle.
[ +1 ms] <- recompile package:amazon_echo_page/main.dart 06fa5efe-3a35-4146-8cc0-5480b01cce6b
[ ] <- 06fa5efe-3a35-4146-8cc0-5480b01cce6b
[ +2 ms] Bundle processing done.
[ +87 ms] Updating files.
[ ] DevFS: Sync finished
[ +2 ms] Syncing files to device sdk gphone64 x86 64... (completed in 97ms)
[ +1 ms] Synced 0.0MB.
[ +4 ms] <- accept
[ +8 ms] Connected to _flutterView/0x72f67ca58530.
[ +2 ms] Flutter run key commands.
[ +1 ms] r Hot reload.
[ +4 ms] R Hot restart.
[ +1 ms] h List all available interactive commands.
[ +1 ms] d Detach (terminate "flutter run" but leave application running).
[ ] c Clear the screen
[ ] q Quit (terminate the application on the device).
[ ] Running with sound null safety
[ ] An Observatory debugger and profiler on sdk gphone64 x86 64 is available at:
http://127.0.0.1:60203/WwK9SPk9WF0=/
[ +582 ms] The Flutter DevTools debugger and profiler on sdk gphone64 x86 64 is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:60203/WwK9SPk9WF0=/
No issues found! (ran in 1.5s)
[√] Flutter (Channel stable, 3.7.0, on Microsoft Windows [Version 10.0.19045.2546], locale en-US)
• Flutter version 3.7.0 on channel stable at C:\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision b06b8b2710 (3 weeks ago), 2023-01-23 16:55:55 -0800
• Engine revision b24591ed32
• Dart version 2.19.0
• DevTools version 2.20.1
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at C:\src\Android\SDK
• Platform android-33, build-tools 33.0.1
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2022 17.4.0)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools
• Visual Studio Build Tools 2022 version 17.4.33103.184
• Windows 10 SDK version 10.0.22621.0
[√] Android Studio (version 2022.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
[√] Connected device (4 available)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 12 (API 32) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.2546]
• Chrome (web) • chrome • web-javascript • Google Chrome 109.0.5414.120
• Edge (web) • edge • web-javascript • Microsoft Edge 109.0.1518.70
[√] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
You can use Align widget for this case, else provide width or left and right value.
final index = widget.children.indexOf(element);
return Positioned(
top: 200 + (index * 10),
left: 0,
right: 0,
child: Transform.scale(
scale: 1,
child: element,
),
);
I tried using mex files with armadillo linear algebra library. At first,I tried a very simple program as follows:
Could anyone help me?
%%%% matlab script %%%%%%%
mex -larmadillo -lgfortran armaMex_demo.cpp
X = randn(5,5);
Y = randn(5,5);
% Run the demo using X and Y
Z = armaMex_demo(X,Y,3)
%%%%%%%%%%%%% mex files %%%%%%
#include "armaMex.hpp"
#include <armadillo>
using namespace arma;
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
// Check the number of input arguments.
if (nrhs != 3)
mexErrMsgTxt("Incorrect number of input arguments.");
// Check type of input.
if ( (mxGetClassID(prhs[0]) != mxDOUBLE_CLASS) || (mxGetClassID(prhs[1]) != mxDOUBLE_CLASS) )
mexErrMsgTxt("Input must me of type double.");
// Check if input is real.
if ( (mxIsComplex(prhs[0])) || (mxIsComplex(prhs[1])) )
mexErrMsgTxt("Input must be real.");
// Create matrices X and Y from the first and second argument.
mat X = armaGetPr(prhs[0]);
mat Y = armaGetPr(prhs[1]);
int c= armaGetScalar<int>(prhs[2]);
// Our calculations require that matrices must be of the same size
if ( size(X) != size(Y) )
mexErrMsgTxt("Matrices should be of same size.");
// Perform calculations
mat A = X + Y;
mat B = X % Y; // % means element-wise multiplication in Armadillo
mat D = inv(X)*Y;
int ee = trace(X.i()*Y) + log(det(X));
// Create cube C with A and B as slices.
cube C(A.n_rows, A.n_cols, 4);
mat E = zeros<mat>(A.n_rows, A.n_cols);
E(0,0) = ee;
C.slice(0) = A;
C.slice(1) = B;
C.slice(2) = D;
C.slice(3) = E;
plhs[0] = armaCreateMxMatrix(C.n_rows, C.n_cols, C.n_slices);
armaSetCubePr(plhs[0], C);
return;
}
%%%%%%% the error %%%%%%%%%
I tried X, Y with size 3*3, 4*4, it is OK
But when I tried with 5*5 of matrix inversion, a failure occurred
“Segmentation fault (core dumped)”
and in matlab interface
Segmentation violation detected at Thu Jul 30 16:04:53 2015
Configuration:
Crash Decoding : Disabled
Current Visual : 0x21 (class 4, depth 24)
Default Encoding : UTF-8
GNU C Library : 2.19 stable
MATLAB Architecture: glnxa64
MATLAB Root : /usr/local/MATLAB/R2014a
MATLAB Version : 8.3.0.532 (R2014a)
Operating System : Linux 3.16.0-45-generic #60~14.04.1-Ubuntu SMP Fri Jul 24 21:16:23 UTC 2015 x86_64
Processor ID : x86 Family 6 Model 60 Stepping 3, GenuineIntel
Virtual Machine : Java 1.7.0_11-b21 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Window System : The X.Org Foundation (11600000), display :0
Fault Count: 4
Abnormal termination:
Segmentation violation
Register State (from fault):
RAX = 0000000000000001 RBX = 0000000300000002
RCX = 0000000000000000 RDX = 00000000000027f8
RSP = 00007fd737ff71c0 RBP = 0000000000000000
RSI = 00007fd737ff9090 RDI = 0000000300000000
R8 = 0000000000027f40 R9 = 0000000000000002
R10 = 00007fd737ff9090 R11 = bff0000000000000
R12 = 0000000000000000 R13 = 0000000000000000
R14 = 0000003000000030 R15 = 00007fd737ff9090
RIP = 00007fd68e79ff3b EFL = 0000000000010202
CS = 0033 FS = 0000 GS = 0000
Stack Trace (from fault):
[ 0] 0x00007fd68e79ff3b /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+15413051 mkl_blas_avx2_izamax+00000779
[ 1] 0x00007fd68ddae95f /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+04987231 mkl_lapack_zgetf2+00000255
[ 2] 0x00007fd68e1f9f63 /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+09490275 mkl_lapack_zgetrf_local+00001459
[ 3] 0x00007fd68e1f9c56 /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+09489494 mkl_lapack_zgetrf_local+00000678
[ 4] 0x00007fd68e1f9c56 /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+09489494 mkl_lapack_zgetrf_local+00000678
[ 5] 0x00007fd68e1f9c56 /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+09489494 mkl_lapack_zgetrf_local+00000678
[ 6] 0x00007fd68e1f9c56 /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+09489494 mkl_lapack_zgetrf_local+00000678
[ 7] 0x00007fd68da771de /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+01614302 mkl_lapack_zgetrf+00003822
[ 8] 0x00007fd68dc0ea8b /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+03283595 mkl_lapack_ao_zgetrf+00000107
[ 9] 0x00007fd68ddbae0b /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+05037579 mkl_lapack_zgesv+00000187
[ 10] 0x00007fd688d00a7b /home/weiwei/Work/PolSAR/PolSAR/PolSAR_code/mex_SLICPolSAR.mexa64+00105083
[ 11] 0x00007fd688cf9401 /home/weiwei/Work/PolSAR/PolSAR/PolSAR_code/mex_SLICPolSAR.mexa64+00074753
[ 12] 0x00007fd688cf51ca /home/weiwei/Work/PolSAR/PolSAR/PolSAR_code/mex_SLICPolSAR.mexa64+00057802
[ 13] 0x00007fd688cf0eb5 /home/weiwei/Work/PolSAR/PolSAR/PolSAR_code/mex_SLICPolSAR.mexa64+00040629
[ 14] 0x00007fd688cef8cd /home/weiwei/Work/PolSAR/PolSAR/PolSAR_code/mex_SLICPolSAR.mexa64+00035021
[ 15] 0x00007fd688cebb37 /home/weiwei/Work/PolSAR/PolSAR/PolSAR_code/mex_SLICPolSAR.mexa64+00019255
[ 16] 0x00007fd688ced570 /home/weiwei/Work/PolSAR/PolSAR/PolSAR_code/mex_SLICPolSAR.mexa64+00025968 mexFunction+00001660
[ 17] 0x00007fd74647272a /usr/local/MATLAB/R2014a/bin/glnxa64/libmex.so+00120618 mexRunMexFile+00000090
[ 18] 0x00007fd74646ea94 /usr/local/MATLAB/R2014a/bin/glnxa64/libmex.so+00105108
[ 19] 0x00007fd74646ffb4 /usr/local/MATLAB/R2014a/bin/glnxa64/libmex.so+00110516
[ 20] 0x00007fd745869ad9 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_dispatcher.so+00670425 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+00000697
[ 21] 0x00007fd744b062b4 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+04461236
[ 22] 0x00007fd744b07bc9 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+04467657
[ 23] 0x00007fd744b083fc /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+04469756
[ 24] 0x00007fd7449826e3 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02873059
[ 25] 0x00007fd74499209e /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02936990
[ 26] 0x00007fd744992183 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02937219
[ 27] 0x00007fd744ac8172 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+04206962
[ 28] 0x00007fd7448fd589 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02327945
[ 29] 0x00007fd744900167 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02339175
[ 30] 0x00007fd7448fe26f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02331247
[ 31] 0x00007fd7448feec4 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02334404
[ 32] 0x00007fd74495c30b /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02716427
[ 33] 0x00007fd745869c5f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_dispatcher.so+00670815 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+00001087
[ 34] 0x00007fd74494020e /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02601486
[ 35] 0x00007fd7448e11b0 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02212272
[ 36] 0x00007fd7448fc25f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02323039
[ 37] 0x00007fd744900167 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02339175
[ 38] 0x00007fd7448fe26f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02331247
[ 39] 0x00007fd7448feec4 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02334404
[ 40] 0x00007fd74495c30b /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02716427
[ 41] 0x00007fd745869c5f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_dispatcher.so+00670815 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+00001087
[ 42] 0x00007fd74492f135 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02531637
[ 43] 0x00007fd7448f60d9 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02298073
[ 44] 0x00007fd7448f2dc7 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02284999
[ 45] 0x00007fd7448f3193 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02285971
[ 46] 0x00007fd74669cafc /usr/local/MATLAB/R2014a/bin/glnxa64/libmwbridge.so+00142076
[ 47] 0x00007fd74669d791 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwbridge.so+00145297 _Z8mnParserv+00000721
[ 48] 0x00007fd74f95392f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwmcr.so+00489775 _ZN11mcrInstance30mnParser_on_interpreter_threadEv+00000031
[ 49] 0x00007fd74f934b6d /usr/local/MATLAB/R2014a/bin/glnxa64/libmwmcr.so+00363373
[ 50] 0x00007fd74f934be9 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwmcr.so+00363497
[ 51] 0x00007fd744028d46 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwuix.so+00343366
[ 52] 0x00007fd74400b382 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwuix.so+00222082
[ 53] 0x00007fd7500a950f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwservices.so+02323727
[ 54] 0x00007fd7500a967c /usr/local/MATLAB/R2014a/bin/glnxa64/libmwservices.so+02324092
[ 55] 0x00007fd7500a557f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwservices.so+02307455
[ 56] 0x00007fd7500aa9b5 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwservices.so+02329013
[ 57] 0x00007fd7500aade7 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwservices.so+02330087
[ 58] 0x00007fd7500ab4c0 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwservices.so+02331840 _Z25svWS_ProcessPendingEventsiib+00000080
[ 59] 0x00007fd74f935098 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwmcr.so+00364696
[ 60] 0x00007fd74f9353bf /usr/local/MATLAB/R2014a/bin/glnxa64/libmwmcr.so+00365503
[ 61] 0x00007fd74f93028f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwmcr.so+00344719
[ 62] 0x00007fd74e8de182 /lib/x86_64-linux-gnu/libpthread.so.0+00033154
[ 63] 0x00007fd74e60b47d /lib/x86_64-linux-gnu/libc.so.6+01025149 clone+00000109
Abnormal termination:
Segmentation violation
Register State (from fault):
RAX = 0000000000000002 RBX = 0000000000000000
RCX = 0000001000000004 RDX = 000000000024875f
RSP = 00007fd737ff9538 RBP = 0000000000000000
RSI = 00007fd6b6ddd500 RDI = 00007fd737ff9500
R8 = 0000001000000003 R9 = 0000000000000004
R10 = 0000000000000005 R11 = 00007fd74e698a30
R12 = 0000000000000000 R13 = 0000001000000005
R14 = 00007fd6b6ddd500 R15 = 0000000000000000
RIP = 00007fd68e7a0872 EFL = 0000000000010287
CS = 0033 FS = 0000 GS = 0000
Stack Trace (from fault):
[ 0] 0x00007fd68e7a0872 /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+15415410 mkl_blas_avx2_idamax+00000626
[ 1] 0x00007fd68e05faae /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+07809710 mkl_lapack_dgetf2+00000238
[ 2] 0x00007fd68e05f869 /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+07809129 mkl_lapack_dgetrf_local+00001369
[ 3] 0x00007fd68e05f4ae /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+07808174 mkl_lapack_dgetrf_local+00000414
[ 4] 0x00007fd68e05f4ae /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+07808174 mkl_lapack_dgetrf_local+00000414
[ 5] 0x00007fd68e05f4ae /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+07808174 mkl_lapack_dgetrf_local+00000414
[ 6] 0x00007fd68e05f4ae /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+07808174 mkl_lapack_dgetrf_local+00000414
[ 7] 0x00007fd68dab6562 /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+01873250 mkl_lapack_dgetrf+00003810
[ 8] 0x00007fd66cf48a74 /home/weiwei/Work/PolSAR/PolSAR/utils/armadillo-5.200.2/mex_interface/armaMex_demo.mexa64+00035444
[ 9] 0x00007fd66cf43542 /home/weiwei/Work/PolSAR/PolSAR/utils/armadillo-5.200.2/mex_interface/armaMex_demo.mexa64+00013634 mexFunction+00002831
[ 10] 0x00007fd74647272a /usr/local/MATLAB/R2014a/bin/glnxa64/libmex.so+00120618 mexRunMexFile+00000090
[ 11] 0x00007fd74646ea94 /usr/local/MATLAB/R2014a/bin/glnxa64/libmex.so+00105108
[ 12] 0x00007fd74646ffb4 /usr/local/MATLAB/R2014a/bin/glnxa64/libmex.so+00110516
[ 13] 0x00007fd745869ad9 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_dispatcher.so+00670425 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+00000697
[ 14] 0x00007fd744b062b4 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+04461236
[ 15] 0x00007fd744b07bc9 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+04467657
[ 16] 0x00007fd744b083fc /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+04469756
[ 17] 0x00007fd7449826e3 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02873059
[ 18] 0x00007fd74499209e /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02936990
[ 19] 0x00007fd744992183 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02937219
[ 20] 0x00007fd744ac8172 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+04206962
[ 21] 0x00007fd7448fd589 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02327945
[ 22] 0x00007fd744900167 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02339175
[ 23] 0x00007fd7448fe26f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02331247
[ 24] 0x00007fd7448feec4 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02334404
[ 25] 0x00007fd74495c30b /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02716427
[ 26] 0x00007fd745869c5f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_dispatcher.so+00670815 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+00001087
[ 27] 0x00007fd74494020e /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02601486
[ 28] 0x00007fd7448e11b0 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02212272
[ 29] 0x00007fd7448fc25f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02323039
[ 30] 0x00007fd744900167 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02339175
[ 31] 0x00007fd7448fe26f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02331247
[ 32] 0x00007fd7448feec4 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02334404
[ 33] 0x00007fd74495c30b /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02716427
[ 34] 0x00007fd745869c5f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_dispatcher.so+00670815 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+00001087
[ 35] 0x00007fd74492f135 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02531637
[ 36] 0x00007fd7448f60d9 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02298073
[ 37] 0x00007fd7448f2dc7 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02284999
[ 38] 0x00007fd7448f3193 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02285971
[ 39] 0x00007fd74669cafc /usr/local/MATLAB/R2014a/bin/glnxa64/libmwbridge.so+00142076
[ 40] 0x00007fd74669d791 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwbridge.so+00145297 _Z8mnParserv+00000721
[ 41] 0x00007fd74f95392f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwmcr.so+00489775 _ZN11mcrInstance30mnParser_on_interpreter_threadEv+00000031
[ 42] 0x00007fd74f934b6d /usr/local/MATLAB/R2014a/bin/glnxa64/libmwmcr.so+00363373
[ 43] 0x00007fd74f934be9 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwmcr.so+00363497
[ 44] 0x00007fd744028d46 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwuix.so+00343366
[ 45] 0x00007fd74400b382 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwuix.so+00222082
[ 46] 0x00007fd7500a950f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwservices.so+02323727
[ 47] 0x00007fd7500a967c /usr/local/MATLAB/R2014a/bin/glnxa64/libmwservices.so+02324092
[ 48] 0x00007fd7500a557f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwservices.so+02307455
[ 49] 0x00007fd7500aa9b5 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwservices.so+02329013
[ 50] 0x00007fd7500aade7 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwservices.so+02330087
[ 51] 0x00007fd7500ab4c0 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwservices.so+02331840 _Z25svWS_ProcessPendingEventsiib+00000080
[ 52] 0x00007fd74f935098 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwmcr.so+00364696
[ 53] 0x00007fd74f9353bf /usr/local/MATLAB/R2014a/bin/glnxa64/libmwmcr.so+00365503
[ 54] 0x00007fd74f93028f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwmcr.so+00344719
[ 55] 0x00007fd74e8de182 /lib/x86_64-linux-gnu/libpthread.so.0+00033154
[ 56] 0x00007fd74e60b47d /lib/x86_64-linux-gnu/libc.so.6+01025149 clone+00000109
Abnormal termination:
Segmentation violation
Register State (from fault):
RAX = 0000000000000001 RBX = 0000000000000000
RCX = 0000001000000004 RDX = 0000000000248729
RSP = 00007fd737ff9538 RBP = 0000000000000000
RSI = 00007fd6b6ddd6b0 RDI = 00007fd737ff9500
R8 = 0000001000000001 R9 = 0000000000000004
R10 = 0000000000000003 R11 = 00007fd74e698a30
R12 = 0000000000000000 R13 = 0000001000000005
R14 = 00007fd6b6ddd6b0 R15 = 0000000000000000
RIP = 00007fd68e7a0872 EFL = 0000000000010287
CS = 0033 FS = 0000 GS = 0000
Stack Trace (from fault):
[ 0] 0x00007fd68e7a0872 /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+15415410 mkl_blas_avx2_idamax+00000626
[ 1] 0x00007fd68e05faae /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+07809710 mkl_lapack_dgetf2+00000238
[ 2] 0x00007fd68e05f869 /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+07809129 mkl_lapack_dgetrf_local+00001369
[ 3] 0x00007fd68e05f4ae /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+07808174 mkl_lapack_dgetrf_local+00000414
[ 4] 0x00007fd68e05f4ae /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+07808174 mkl_lapack_dgetrf_local+00000414
[ 5] 0x00007fd68e05f4ae /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+07808174 mkl_lapack_dgetrf_local+00000414
[ 6] 0x00007fd68e05f4ae /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+07808174 mkl_lapack_dgetrf_local+00000414
[ 7] 0x00007fd68dab6562 /usr/local/MATLAB/R2014a/bin/glnxa64/mkl.so+01873250 mkl_lapack_dgetrf+00003810
[ 8] 0x00007fd66cf48a74 /home/weiwei/Work/PolSAR/PolSAR/utils/armadillo-5.200.2/mex_interface/armaMex_demo.mexa64+00035444
[ 9] 0x00007fd66cf43542 /home/weiwei/Work/PolSAR/PolSAR/utils/armadillo-5.200.2/mex_interface/armaMex_demo.mexa64+00013634 mexFunction+00002831
[ 10] 0x00007fd74647272a /usr/local/MATLAB/R2014a/bin/glnxa64/libmex.so+00120618 mexRunMexFile+00000090
[ 11] 0x00007fd74646ea94 /usr/local/MATLAB/R2014a/bin/glnxa64/libmex.so+00105108
[ 12] 0x00007fd74646ffb4 /usr/local/MATLAB/R2014a/bin/glnxa64/libmex.so+00110516
[ 13] 0x00007fd745869ad9 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_dispatcher.so+00670425 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+00000697
[ 14] 0x00007fd744b062b4 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+04461236
[ 15] 0x00007fd744b07bc9 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+04467657
[ 16] 0x00007fd744b083fc /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+04469756
[ 17] 0x00007fd7449826e3 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02873059
[ 18] 0x00007fd74499209e /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02936990
[ 19] 0x00007fd744992183 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02937219
[ 20] 0x00007fd744ac8172 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+04206962
[ 21] 0x00007fd7448fd589 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02327945
[ 22] 0x00007fd744900167 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02339175
[ 23] 0x00007fd7448fe26f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02331247
[ 24] 0x00007fd7448feec4 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02334404
[ 25] 0x00007fd74495c30b /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02716427
[ 26] 0x00007fd745869c5f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_dispatcher.so+00670815 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+00001087
[ 27] 0x00007fd74494020e /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02601486
[ 28] 0x00007fd7448e11b0 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02212272
[ 29] 0x00007fd7448fc25f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02323039
[ 30] 0x00007fd744900167 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02339175
[ 31] 0x00007fd7448fe26f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02331247
[ 32] 0x00007fd7448feec4 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02334404
[ 33] 0x00007fd74495c30b /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02716427
[ 34] 0x00007fd745869c5f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_dispatcher.so+00670815 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+00001087
[ 35] 0x00007fd74492f135 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02531637
[ 36] 0x00007fd7448f60d9 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02298073
[ 37] 0x00007fd7448f2dc7 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02284999
[ 38] 0x00007fd7448f3193 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwm_interpreter.so+02285971
[ 39] 0x00007fd74669cafc /usr/local/MATLAB/R2014a/bin/glnxa64/libmwbridge.so+00142076
[ 40] 0x00007fd74669d791 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwbridge.so+00145297 _Z8mnParserv+00000721
[ 41] 0x00007fd74f95392f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwmcr.so+00489775 _ZN11mcrInstance30mnParser_on_interpreter_threadEv+00000031
[ 42] 0x00007fd74f934b6d /usr/local/MATLAB/R2014a/bin/glnxa64/libmwmcr.so+00363373
[ 43] 0x00007fd74f934be9 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwmcr.so+00363497
[ 44] 0x00007fd744028d46 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwuix.so+00343366
[ 45] 0x00007fd74400b382 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwuix.so+00222082
[ 46] 0x00007fd7500a950f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwservices.so+02323727
[ 47] 0x00007fd7500a967c /usr/local/MATLAB/R2014a/bin/glnxa64/libmwservices.so+02324092
[ 48] 0x00007fd7500a557f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwservices.so+02307455
[ 49] 0x00007fd7500aa9b5 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwservices.so+02329013
[ 50] 0x00007fd7500aade7 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwservices.so+02330087
[ 51] 0x00007fd7500ab4c0 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwservices.so+02331840 _Z25svWS_ProcessPendingEventsiib+00000080
[ 52] 0x00007fd74f935098 /usr/local/MATLAB/R2014a/bin/glnxa64/libmwmcr.so+00364696
[ 53] 0x00007fd74f9353bf /usr/local/MATLAB/R2014a/bin/glnxa64/libmwmcr.so+00365503
[ 54] 0x00007fd74f93028f /usr/local/MATLAB/R2014a/bin/glnxa64/libmwmcr.so+00344719
[ 55] 0x00007fd74e8de182 /lib/x86_64-linux-gnu/libpthread.so.0+00033154
[ 56] 0x00007fd74e60b47d /lib/x86_64-linux-gnu/libc.so.6+01025149 clone+00000109
Abnormal termination:
Segmentation violation
Register State (from fault):
RAX = 0000000000000002 RBX = 0000000000000000
RCX = 0000001000000004 RDX = 0000000000251169
RSP = 00007fd737ff9538 RBP = 0000000000000000
RSI = 00007fd6b6d984b0 RDI = 00007fd737ff9500
R8 = 0000001000000001 R9 = 0000000000000004
R10 = 0000000000000003 R11 = 00007fd74e698a30
R12 = 0000000000000000 R13 = 0000001000000005
R14 = 00007fd6b6d984b0 R15 = 0000000000000000
RIP = 00007fd68e7a0872 EFL = 0000000000010283
CS = 0033 FS = 0000 GS = 0000
Try to add the Armadillo cast used it in my code and it worked fine:
`vec x = conv_to<vec>::from(armaGetPr(prhs[0],true));`
For more info see: http://sigpack.sourceforge.net/build.html
I am trying to use glmnet package for MatLab. The glmnet works fine, but when trying to use cvglmnet (which is another function from the package), MatLab gives a "catastrophic" error which requires me to close it. It has something to do with a MEX file it is calling. I copied the whole error message below.
Any help is appreciated.
MATLAB crash file:C:\Users\Marcelo\AppData\Local\Temp\matlab_crash_dump.10552-1:
------------------------------------------------------------------------
Access violation detected at Mon Jul 06 17:28:49 2015
------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled
Default Encoding : windows-1252
Graphics card 1 : NVIDIA ( 0x10de ) NVIDIA GeForce GT 740M Version 9.18.13.4752
Graphics card 2 : Intel Corporation ( 0x8086 ) Intel(R) HD Graphics 4000 Version 10.18.10.3308
MATLAB Architecture: win64
MATLAB Root : C:\Program Files\MATLAB\R2014b
MATLAB Version : 8.4.0.150421 (R2014b)
Operating System : Microsoft Windows 8.1 Single Language
Processor ID : x86 Family 6 Model 58 Stepping 9, GenuineIntel
Software OpenGL : 0
Virtual Machine : Java 1.7.0_11-b21 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Window System : Version 6.3 (Build 9600)
Fault Count: 1
Abnormal termination:
Access violation
Register State (from fault):
RAX = 0000000000000000 RBX = 0000000000000000
RCX = 000000000402e7f0 RDX = 000000000402e8f0
RSP = 000000000402cd08 RBP = 000000000402e8f0
RSI = 0000000078ab6550 RDI = 000000000402e7f0
R8 = 000000000402db10 R9 = 000000000402e7f0
R10 = 0000000000000000 R11 = 000000000402e8f0
R12 = 0000000000000001 R13 = 0000000000000000
R14 = 000000000402e8f0 R15 = 000000000402e7f0
RIP = 00000000fe160b03 EFL = 00010286
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault):
[ 0] 0x00000000fe160b03 C:\Program Files\MATLAB\R2014b\bin\win64\libmx.dll+00396035 MXGETPR+00000003
[ 1] 0x00007ffee4d619dc C:\Users\Marcelo\Desktop\Marcelo\PUC\Mestrado\Dissertação\Instrument Selection\glmnet_matlab\glmnetMex.mexw64+00006620 MEXFUNCTION+00002524
[ 2] 0x00000000fc5f36f0 C:\Program Files\MATLAB\R2014b\bin\win64\libmex.dll+00079600 mexRunMexFile+00000112
[ 3] 0x00000000fc5f2762 C:\Program Files\MATLAB\R2014b\bin\win64\libmex.dll+00075618 inSwapMexfileReader+00000690
[ 4] 0x00000000fc5f2248 C:\Program Files\MATLAB\R2014b\bin\win64\libmex.dll+00074312 mexUnlock+00006008
[ 5] 0x0000000004a805e3 C:\Program Files\MATLAB\R2014b\bin\win64\m_dispatcher.dll+00067043 Mfh_file::dispatch_fh+00000659
[ 6] 0x0000000004a80aee C:\Program Files\MATLAB\R2014b\bin\win64\m_dispatcher.dll+00068334 Mfunction_handle::dispatch+00000766
[ 7] 0x0000000004e62b2f C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00273199 inGetNameInSymbolTable+00017071
[ 8] 0x0000000004e640c0 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00278720 inGetNameInSymbolTable+00022592
[ 9] 0x0000000004e61b4f C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00269135 inGetNameInSymbolTable+00013007
[ 10] 0x0000000004e61ab1 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00268977 inGetNameInSymbolTable+00012849
[ 11] 0x0000000004e8406f C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00409711 inPathNotification::function_delete_notification+00098591
[ 12] 0x0000000004e827af C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00403375 inPathNotification::function_delete_notification+00092255
[ 13] 0x0000000004e81359 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00398169 inPathNotification::function_delete_notification+00087049
[ 14] 0x0000000004a805e3 C:\Program Files\MATLAB\R2014b\bin\win64\m_dispatcher.dll+00067043 Mfh_file::dispatch_fh+00000659
[ 15] 0x0000000004a80aee C:\Program Files\MATLAB\R2014b\bin\win64\m_dispatcher.dll+00068334 Mfunction_handle::dispatch+00000766
[ 16] 0x0000000004e62b2f C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00273199 inGetNameInSymbolTable+00017071
[ 17] 0x0000000004e640c0 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00278720 inGetNameInSymbolTable+00022592
[ 18] 0x0000000004e61b4f C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00269135 inGetNameInSymbolTable+00013007
[ 19] 0x0000000004e61ab1 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00268977 inGetNameInSymbolTable+00012849
[ 20] 0x0000000004e8406f C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00409711 inPathNotification::function_delete_notification+00098591
[ 21] 0x0000000004e827af C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00403375 inPathNotification::function_delete_notification+00092255
[ 22] 0x0000000004e81359 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00398169 inPathNotification::function_delete_notification+00087049
[ 23] 0x0000000004a805e3 C:\Program Files\MATLAB\R2014b\bin\win64\m_dispatcher.dll+00067043 Mfh_file::dispatch_fh+00000659
[ 24] 0x0000000004a80aee C:\Program Files\MATLAB\R2014b\bin\win64\m_dispatcher.dll+00068334 Mfunction_handle::dispatch+00000766
[ 25] 0x0000000004e62b2f C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00273199 inGetNameInSymbolTable+00017071
[ 26] 0x0000000004e640c0 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00278720 inGetNameInSymbolTable+00022592
[ 27] 0x0000000004e61b4f C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00269135 inGetNameInSymbolTable+00013007
[ 28] 0x0000000004e61ab1 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00268977 inGetNameInSymbolTable+00012849
[ 29] 0x0000000004e8406f C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00409711 inPathNotification::function_delete_notification+00098591
[ 30] 0x0000000004e827af C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00403375 inPathNotification::function_delete_notification+00092255
[ 31] 0x0000000004e81359 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00398169 inPathNotification::function_delete_notification+00087049
[ 32] 0x0000000004a805e3 C:\Program Files\MATLAB\R2014b\bin\win64\m_dispatcher.dll+00067043 Mfh_file::dispatch_fh+00000659
[ 33] 0x0000000004a80aee C:\Program Files\MATLAB\R2014b\bin\win64\m_dispatcher.dll+00068334 Mfunction_handle::dispatch+00000766
[ 34] 0x0000000004e3b606 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00112134 MathWorks::MException::IMExceptionData::IMExceptionData+00037094
[ 35] 0x0000000004e3aa20 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00109088 MathWorks::MException::IMExceptionData::IMExceptionData+00034048
[ 36] 0x0000000004e39219 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00102937 MathWorks::MException::IMExceptionData::IMExceptionData+00027897
[ 37] 0x0000000004e38de5 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00101861 MathWorks::MException::IMExceptionData::IMExceptionData+00026821
[ 38] 0x0000000004e8b708 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00440072 inPathNotification::function_delete_notification+00128952
[ 39] 0x0000000004e63ea5 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00278181 inGetNameInSymbolTable+00022053
[ 40] 0x0000000004e61b4f C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00269135 inGetNameInSymbolTable+00013007
[ 41] 0x0000000004e61ab1 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00268977 inGetNameInSymbolTable+00012849
[ 42] 0x0000000004e8406f C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00409711 inPathNotification::function_delete_notification+00098591
[ 43] 0x0000000004e827af C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00403375 inPathNotification::function_delete_notification+00092255
[ 44] 0x0000000004e81359 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00398169 inPathNotification::function_delete_notification+00087049
[ 45] 0x0000000004a807a4 C:\Program Files\MATLAB\R2014b\bin\win64\m_dispatcher.dll+00067492 Mfh_file::dispatch_fh+00001108
[ 46] 0x0000000004a80aee C:\Program Files\MATLAB\R2014b\bin\win64\m_dispatcher.dll+00068334 Mfunction_handle::dispatch+00000766
[ 47] 0x0000000004e62b2f C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00273199 inGetNameInSymbolTable+00017071
[ 48] 0x0000000004f4b6f7 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+01226487 inFullEvalFcn+00011159
[ 49] 0x0000000004e65592 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00284050 inGetNameInSymbolTable+00027922
[ 50] 0x0000000004e61b4f C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00269135 inGetNameInSymbolTable+00013007
[ 51] 0x0000000004e61ab1 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00268977 inGetNameInSymbolTable+00012849
[ 52] 0x0000000004e8406f C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00409711 inPathNotification::function_delete_notification+00098591
[ 53] 0x0000000004e827af C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00403375 inPathNotification::function_delete_notification+00092255
[ 54] 0x0000000004e81359 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00398169 inPathNotification::function_delete_notification+00087049
[ 55] 0x0000000004a807a4 C:\Program Files\MATLAB\R2014b\bin\win64\m_dispatcher.dll+00067492 Mfh_file::dispatch_fh+00001108
[ 56] 0x0000000004a80aee C:\Program Files\MATLAB\R2014b\bin\win64\m_dispatcher.dll+00068334 Mfunction_handle::dispatch+00000766
[ 57] 0x0000000004eb4a88 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00608904 inPathNotification::function_delete_notification+00297784
[ 58] 0x0000000004eb4a04 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00608772 inPathNotification::function_delete_notification+00297652
[ 59] 0x0000000004eb49c5 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00608709 inPathNotification::function_delete_notification+00297589
[ 60] 0x0000000004eb4992 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00608658 inPathNotification::function_delete_notification+00297538
[ 61] 0x0000000004eb4947 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00608583 inPathNotification::function_delete_notification+00297463
[ 62] 0x0000000004e2d69d C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+00054941 inEvalExp+00001309
[ 63] 0x0000000004f5525d C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+01266269 inEvalCmdWithLocalReturn+00000285
[ 64] 0x0000000004f55181 C:\Program Files\MATLAB\R2014b\bin\win64\m_interpreter.dll+01266049 inEvalCmdWithLocalReturn+00000065
[ 65] 0x00000000fb5fe31d C:\Program Files\MATLAB\R2014b\bin\win64\libmwbridge.dll+00058141 mnGetPrompt+00001517
[ 66] 0x00000000fb5fed09 C:\Program Files\MATLAB\R2014b\bin\win64\libmwbridge.dll+00060681 mnParser+00000745
[ 67] 0x00000000fd0dd834 C:\Program Files\MATLAB\R2014b\bin\win64\mcr.dll+00383028 mcrInstance::mnParser_on_interpreter_thread+00000036
[ 68] 0x00000000fd0a68e7 C:\Program Files\MATLAB\R2014b\bin\win64\mcr.dll+00157927 mcr::runtime::setInterpreterThreadToCurrent+00019751
[ 69] 0x00000000fd0a6923 C:\Program Files\MATLAB\R2014b\bin\win64\mcr.dll+00157987 mcr::runtime::setInterpreterThreadToCurrent+00019811
[ 70] 0x00000000fd0a7121 C:\Program Files\MATLAB\R2014b\bin\win64\mcr.dll+00160033 mcr::runtime::setInterpreterThreadToCurrent+00021857
[ 71] 0x00000000fab5d3a6 C:\Program Files\MATLAB\R2014b\bin\win64\uiw.dll+00512934 UIW_AttachThreadInput+00001270
[ 72] 0x00000000fab5cc35 C:\Program Files\MATLAB\R2014b\bin\win64\uiw.dll+00511029 wsd_to_MSW+00004373
[ 73] 0x00000000fab5ccb9 C:\Program Files\MATLAB\R2014b\bin\win64\uiw.dll+00511161 wsd_to_MSW+00004505
[ 74] 0x00007fff0f5108ca C:\WINDOWS\system32\USER32.dll+00592074 BroadcastSystemMessageExA+00000586
[ 75] 0x00007fff0f482e1f C:\WINDOWS\system32\USER32.dll+00011807 IsWindow+00000367
[ 76] 0x00007fff0f482e96 C:\WINDOWS\system32\USER32.dll+00011926 IsWindow+00000486
[ 77] 0x00007fff0f693034 C:\WINDOWS\SYSTEM32\ntdll.dll+00602164 KiUserCallbackDispatcher+00000036
[ 78] 0x00007fff0f482a8a C:\WINDOWS\system32\USER32.dll+00010890 PeekMessageW+00000250
[ 79] 0x00007fff0f486283 C:\WINDOWS\system32\USER32.dll+00025219 GetMessageA+00000243
[ 80] 0x00007fff0f48622f C:\WINDOWS\system32\USER32.dll+00025135 GetMessageA+00000159
[ 81] 0x00000000fab0a26b C:\Program Files\MATLAB\R2014b\bin\win64\uiw.dll+00172651 UIW_ShowMenuItem+00003995
[ 82] 0x00000000fab5dce2 C:\Program Files\MATLAB\R2014b\bin\win64\uiw.dll+00515298 UIW_SuspendAttachThreadInput+00000466
[ 83] 0x0000000100118223 C:\Program Files\MATLAB\R2014b\bin\win64\libmwservices.dll+01212963 services::system_events::PpeDispatchHook::dispatchOne+00032291
[ 84] 0x0000000100123c95 C:\Program Files\MATLAB\R2014b\bin\win64\libmwservices.dll+01260693 sysq::addProcessPendingEventsUnitTestHook+00005813
[ 85] 0x0000000100123d50 C:\Program Files\MATLAB\R2014b\bin\win64\libmwservices.dll+01260880 sysq::addProcessPendingEventsUnitTestHook+00006000
[ 86] 0x0000000100125b75 C:\Program Files\MATLAB\R2014b\bin\win64\libmwservices.dll+01268597 sysq::getCondition+00004629
[ 87] 0x00000001001274ba C:\Program Files\MATLAB\R2014b\bin\win64\libmwservices.dll+01275066 svWS_ProcessPendingEvents+00000138
[ 88] 0x00000000fd0a783d C:\Program Files\MATLAB\R2014b\bin\win64\mcr.dll+00161853 mcr::runtime::setInterpreterThreadToCurrent+00023677
[ 89] 0x00000000fd0a84aa C:\Program Files\MATLAB\R2014b\bin\win64\mcr.dll+00165034 mcr::runtime::setInterpreterThreadToCurrent+00026858
[ 90] 0x00000000fd0a0135 C:\Program Files\MATLAB\R2014b\bin\win64\mcr.dll+00131381 mcr_process_events+00007477
[ 91] 0x00000000fd0a1a12 C:\Program Files\MATLAB\R2014b\bin\win64\mcr.dll+00137746 mcr_process_events+00013842
[ 92] 0x0000000008078f2d C:\Program Files\MATLAB\R2014b\bin\win64\MVMLocal.dll+00167725 mvm_server::inproc::LocalFactory::terminate+00048285
[ 93] 0x00000000fa8ef1ea C:\Program Files\MATLAB\R2014b\bin\win64\mvm.dll+00782826 mvm::detail::initLocalMvmHack+00000490
[ 94] 0x00000000fa8ef7a8 C:\Program Files\MATLAB\R2014b\bin\win64\mvm.dll+00784296 mvm::detail::SessionImpl::privateSession+00000376
[ 95] 0x00000000fa8ef9f8 C:\Program Files\MATLAB\R2014b\bin\win64\mvm.dll+00784888 mvm::detail::SessionImpl::privateSession+00000968
[ 96] 0x0000000140005ddd C:\Program Files\MATLAB\R2014b\bin\win64\MATLAB.exe+00024029
[ 97] 0x0000000140007870 C:\Program Files\MATLAB\R2014b\bin\win64\MATLAB.exe+00030832
[ 98] 0x00007fff0d1f13d2 C:\WINDOWS\system32\KERNEL32.DLL+00005074 BaseThreadInitThunk+00000034
[ 99] 0x00007fff0f615444 C:\WINDOWS\SYSTEM32\ntdll.dll+00087108 RtlUserThreadStart+00000052
This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.
If this problem is reproducible, please submit a Service Request via:
http://www.mathworks.com/support/contact_us/
A technical support engineer might contact you with further information.
Thank you for your help.
What is the Maple equivalent to Matlab matrix(1:N) so how can I reach matrix elements in Maple?
M := LinearAlgebra:-RandomMatrix(4);
[-93 -32 8 44]
[ ]
[-76 -74 69 92]
M := [ ]
[-72 -4 99 -31]
[ ]
[ -2 27 29 67]
M[2..4,1..2];
[-76 -74]
[ ]
[-72 -4]
[ ]
[ -2 27]
M[2..3,..];
[-76 -74 69 92]
[ ]
[-72 -4 99 -31]
M[..,2..4];
[-32 8 44]
[ ]
[-74 69 92]
[ ]
[ -4 99 -31]
[ ]
[ 27 29 67]
See the help topic rtable_indexing for more.
I have been attempting to us JPA to persist an entity in a simple Fuse ESB project, but I'm facing the problem that the entity never gets written to the the underlying database. The project is structured with the following three modules:
simple-datasource
simple-model
simple-service
The datasource is configured through blueprint and the datasource attached to jndi:
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<bean id="simpleDataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
<property name="url" value="jdbc:oracle:thin:#(DESCRIPTION=(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVICE_NAME=xyz))(ADDRESS=(PROTOCOL=TCP)(HOST=xx.xx.xx.xx)(PORT=1521)))" />
<property name="username" value="username" />
<property name="password" value="password" />
</bean>
<service ref="simpleDataSource" interface="javax.sql.DataSource">
<service-properties>
<entry key="osgi.jndi.service.name" value="jdbc/simpleDataSource" />
</service-properties>
</service>
The model defines a persistent unit inside persistence.xml file and references the datasource through jndi:
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
version="2.0">
<persistence-unit name="simple-service-persistence-unit" transaction-type="JTA">
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<jta-data-source>osgi.jndi.service.name=jdbc/simpleDataSource</jta-data-source>
<!-- list of the persistance classes -->
<class>com.model.SimpleRow</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
</persistence-unit>
The SimpleRow class uses JPA annotations:
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
#Entity
#Table(name = "SIMPLE")
public class SimpleRow {
#Column(name = "simple_id")
private Long simpleId;
#Column(name = "simple_text", length =100)
private String simpleText;
public Long getSimpleId() {
return simpleId;
}
public void setSimpleId(Long simpleId) {
this.simpleId = simpleId;
}
public String getSimpleText() {
return simpleText;
}
public void setSimpleText(String simpleText) {
this.simpleText = simpleText;
}
}
I then inject the EntityManager into a service, again using blueprint and a reference to the simple-service-persistence-unit and specify that method level transaction demarcation should be used (as I've seen in all the examples):
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jpa="http://aries.apache.org/xmlns/jpa/v1.1.0" xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.1.0"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://aries.apache.org/xmlns/jpa/v1.1.0 http://aries.apache.org/schemas/jpa/jpa_110.xsd">
<bean id="simpleService" class="com.service.SimpleServiceImpl">
<jpa:context property="entityManager" unitname="simple-service-persistence-unit" />
<tx:transaction method="*" value="Required" />
</bean>
<service ref="simpleService" interface="com.service.SimpleService" />
The simple service simply creates an entity and persists it using the EntityManager as follows:
public class SimpleServiceImpl implements SimpleService {
EntityManager entityManager;
public void invokeSimpleService() {
try {
SimpleRow row = new SimpleRow();
row.setSimpleText("Some simple text");
entityManager.persist(row);
System.out.println("Persisted row...");
} catch (Exception e) {
System.out.println("An error occurred: " + e.getMessage());
}
} ...
One final configuration which is relevant is the feature set which is as follows:
<feature dependency="true" version="${activemq.version}">activemq-camel</feature>
<feature dependency="true" version="${camel.version}">camel-blueprint</feature>
<feature dependency="true" version="${camel.version}">camel-core</feature>
<feature dependency="true" version="${cxf.version}">cxf</feature>
<feature dependency="true" version="${camel.version}">camel-cxf</feature>
<feature dependency="true" version="${camel.version}">camel-jpa</feature>
<feature dependency="true" version="1.0.1.fuse-71-047">transaction</feature>
<feature dependency="true" version="${jpa.version}">jpa</feature>
<feature dependency="true" version="${jndi.version}">jndi</feature>
<bundle>wrap:mvn:net.sourceforge.serp/serp/1.13.1</bundle>
<bundle>wrap:mvn:oracle/ojdbc/11.2.0.3</bundle>
<bundle>mvn:com.h2database/h2/1.3.167</bundle>
<bundle>mvn:commons-dbcp/commons-dbcp/1.4</bundle>
<bundle>mvn:org.apache.commons/commons-lang3/3.1</bundle>
<bundle>mvn:com.company/simple-datasource/${project.version}</bundle>
<bundle>mvn:com.company/simple-model/${project.version}</bundle>
<bundle>mvn:com.company/simple-service/${project.version}</bundle>
I have verified that the datasource works correctly by injecting it as service into another module which uses it with a straight JDBC connection.
However, when invoke SimpleService.invokeSimpleService, the code executes, no exceptions are thrown but the write is not persisted on the database.
If I add a flush after the persist i.e.
entityManager.persist()
then the following error is thrown:
An error occurred: Can only perform operation while a transaction is active.
If I try and start the transaction explicitly, and remove the tx:transaction annotation on the service bean config, then it fails with the following error:
An error occurred: Transaction management is not available for container managed EntityManagers.
Other information that might be of relevance. The underlying EntityManager implementation is:
org.apache.aries.jpa.container.context.transaction.impl.JTAEntityManager
Also the list of installed aries components is:
[ 7] [Active ] [Created ] [ ] [ 20] Apache Aries Blueprint Core (1.0.1.fuse-71-047)
[ 9] [Active ] [ ] [ ] [ 20] Apache Aries Util (1.0.0)
[ 10] [Active ] [Created ] [ ] [ 20] Apache Aries Blueprint CM (1.0.1.fuse-71-047)
[ 11] [Active ] [ ] [ ] [ 20] Apache Aries Proxy API (1.0.0)
[ 12] [Active ] [ ] [ ] [ 20] Apache Aries Proxy Service (1.0.0)
[ 13] [Active ] [ ] [ ] [ 20] Apache Aries Blueprint API (1.0.1.fuse-71-047)
[ 25] [Active ] [ ] [ ] [ 30] Apache Aries JMX Blueprint API (1.0.1.fuse-71-047)
[ 30] [Active ] [ ] [ ] [ 30] Apache Aries JMX Blueprint Core (1.0.1.fuse-71-047)
[ 33] [Active ] [ ] [ ] [ 30] Apache Aries JMX API (1.0.1.fuse-71-047)
[ 38] [Active ] [ ] [ ] [ 30] Apache Aries JMX Core (1.0.1.fuse-71-047)
[ 75] [Active ] [ ] [ ] [ 60] Aries JPA Container Managed Contexts (1.0.0)
[ 77] [Active ] [Created ] [ ] [ 60] Apache Aries Transaction Enlisting JDBC Datasource (1.0.1.fuse-71-047)
[ 81] [Active ] [ ] [ ] [ 60] Aries JPA Container API (1.0.0)
[ 100] [Active ] [Created ] [ ] [ 60] Apache Aries Transaction Blueprint (1.0.1.fuse-71-047)
[ 118] [Active ] [ ] [ ] [ 60] Apache Aries JNDI API (1.0.0)
[ 125] [Active ] [ ] [ ] [ 60] Aries JPA Container (1.0.0)
[ 139] [Active ] [ ] [ ] [ 60] Apache Aries JNDI Core (1.0.0)
[ 144] [Active ] [ ] [ ] [ 60] Apache Aries JNDI Support for Legacy Runtimes (1.0.0)
[ 146] [Active ] [ ] [ ] [ 60] Apache Aries JNDI RMI Handler (1.0.0)
[ 168] [Active ] [Created ] [ ] [ 60] Aries JPA Container blueprint integration for Aries blueprint (1.0.0)
[ 176] [Active ] [ ] [ ] [ 60] Apache Aries Transaction Manager (1.0.1.fuse-71-047)
[ 177] [Active ] [ ] [ ] [ 60] Apache Aries JNDI URL Handler (1.0.0)
Is there anything obviously wrong with this configuration, which follows most of the examples online?
I'm not sure exactly when using resource_local as the transaction type is appropriate in the persistence layer. However, modifying persistence.xml to use JTA and jta-data-source as follows fixed my issue:
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
version="2.0">
<persistence-unit name="simple-service-persistence-unit"
transaction-type="JTA">
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl
</provider>
<!--non-jta-data-source>osgi:service/jdbc/simpleDataSource</non-jta-data-source-->
<jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/simpleDataSource)</jta-data-source>
<class>com.company.model.SimpleRow</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
<property name="openjpa.Log" value="DefaultLevel=INFO, Tool=INFO, SQL=TRACE"/>
</properties>
</persistence-unit>