Example from D book isn't working, odd error - 64-bit

All,
I'm using Xamarin Studio 4.08 and Mono-D to program D with the DMD2 compiler. When I try to compile the following (from The D Programming Language - Alexandrescu, 2010- Page 10):
import std.array;
bool binarySearch(T)(T[] input, T value)
{
while (!input.empty)
{
auto i = input.length / 2;
auto mid = input[i];
if(mid > value) input = input[0 .. i];
else if(mid < value) input = input[i + 1 .. $];
else return true;
}
return false;
}
unittest
{
assert(binarySearch([1, 3, 6, 7, 9, 15], 6));
assert(!binarySearch([1, 3, 6, 7, 9, 15], 5));
}
I get the following error upon compilation:
: Error: std.array could not be resolved - library reference missing?
However, the plot thickens when I comment out assert(binarySearch([1,3,6,7,9,15], 6));, because that produces a very peculiar error:
First, a library is missing, then, it's a 16-bit application. I know there's an errata for this book, but this isn't in it.
UPDATE
Compiled with rdmd test.d --main and got the following errors, using the same code...
OPTLINK (R) for Win32 Release 8.00.13
Copyright (C) Digital Mars 1989-2010 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Warning 23: No Stack
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined __fltused
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined __d_assert_msg
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined __d_throwc
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D3std4conv21ConvOverflowException6__ctorMFAyaAyakZC
3std4conv21ConvOverflowException
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D3std4conv21ConvOverflowException7__ClassZ
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined __d_newclass
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D3std4conv8__assertFiZv
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D3std4conv13ConvException7__ClassZ
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D3std4conv13ConvException6__ctorMFAyaAyakZC3std4con
v13ConvException
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D12TypeInfo_Aya6__initZ
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined __d_arrayappendT
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D3std6format7__arrayZ
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined __d_arraycopy
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D3std5array7__arrayZ
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _memcpy
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined __d_newitemT
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D4core6memory2GC6extendFNaNbPvkkZk
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D4core6memory2GC6qallocFNaNbkkZS4core6memory8BlkInf
o_
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined __LDIV#
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D16TypeInfo_Pointer6__vtblZ
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D15TypeInfo_Struct6__vtblZ
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined __ULDIV#
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D3std6format15FormatException6__ctorMFAyaAyakC6obje
ct9ThrowableZC3std6format15FormatException
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D3std6format15FormatException7__ClassZ
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D3std3utf6encodeFNaNfKG4awZk
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D3std5array8__assertFiZv
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined __d_arraysetcapacity
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D3std3utf8__assertFiZv
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D3std3utf7__arrayZ
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D3std3utf12isValidDcharFNaNbNfwZb
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D3std3utf12UTFException6__ctorMFAyakAyakC6object9Th
rowableZC3std3utf12UTFException
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D3std3utf12UTFException7__ClassZ
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined __adDupT
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D14TypeInfo_Array6__vtblZ
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D10TypeInfo_a6__initZ
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D14TypeInfo_Const6__vtblZ
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D9Exception7__ClassZ
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D3std9exception7bailOutFNaNfAyakxAaZv
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D3std5ascii7isDigitFNaNbNfwZb
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D6object9Exception6__ctorMFNaNbNfAyaAyakC6object9Th
rowableZC9Exception
C:\Users\Aaron\AppData\Local\Temp\.rdmd\rdmd-test.d-AB3FF68B659C1090C52A7CFC868F
8061\objs\test.obj(test)
Error 42: Symbol Undefined _D3std5array12__ModuleInfoZ
OPTLINK : Warning 134: No Start Address
--- errorlevel 41
What'd I do wrong this time? :P

There is no error in code.
Except, that it doesn't have a main function, so you can not run compiled program. You can ask the compiler to add main function for you. Just use -main switch.
rdmd is a DMD Script Shell.
You get errors because rdmd treats all arguments after file name as switches for your program. Try rdmd --main test.d.

Related

Garbage collection error in packaged windows game (UE5)

I have a Unreal Engine 5 project which is working well in the editor, but when i want to play it in a packaged shipping version, the game crashes because of garbage collection:
[2022.08.22-08.30.39:491][827]LogWindows: Error: === Critical error: ===
[2022.08.22-08.30.39:491][827]LogWindows: Error:
[2022.08.22-08.30.39:491][827]LogWindows: Error: Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\GarbageCollectionVerification.cpp] [Line: 137]
[2022.08.22-08.30.39:491][827]LogWindows: Error: Encountered 2 object(s) breaking Disregard for GC assumptions. Please check log for details.
[2022.08.22-08.30.39:491][827]LogWindows: Error:
[2022.08.22-08.30.39:491][827]LogWindows: Error:
[2022.08.22-08.30.39:491][827]LogWindows: Error:
[2022.08.22-08.30.39:491][827]LogWindows: Error:
[2022.08.22-08.30.39:491][827]LogWindows: Error: [Callstack] 0x00007ff645ace86c UnrealGame.exe!UnknownFunction []
[2022.08.22-08.30.39:491][827]LogWindows: Error: [Callstack] 0x00007ff645a39165 UnrealGame.exe!UnknownFunction []
[2022.08.22-08.30.39:491][827]LogWindows: Error: [Callstack] 0x00007ff645a3861e UnrealGame.exe!UnknownFunction []
[2022.08.22-08.30.39:491][827]LogWindows: Error: [Callstack] 0x00007ff64ad02b97 UnrealGame.exe!UnknownFunction []
[2022.08.22-08.30.39:491][827]LogWindows: Error: [Callstack] 0x00007ff64acd6c50 UnrealGame.exe!UnknownFunction []
[2022.08.22-08.30.39:491][827]LogWindows: Error: [Callstack] 0x00007ff64ac828ec UnrealGame.exe!UnknownFunction []
[2022.08.22-08.30.39:491][827]LogWindows: Error: [Callstack] 0x00007ff64acfc616 UnrealGame.exe!UnknownFunction []
[2022.08.22-08.30.39:491][827]LogWindows: Error: [Callstack] 0x00007ff64a2a078b UnrealGame.exe!UnknownFunction []
[2022.08.22-08.30.39:491][827]LogWindows: Error: [Callstack] 0x00007ff643e09737 UnrealGame.exe!UnknownFunction []
[2022.08.22-08.30.39:491][827]LogWindows: Error: [Callstack] 0x00007ff643e2108c UnrealGame.exe!UnknownFunction []
[2022.08.22-08.30.39:491][827]LogWindows: Error: [Callstack] 0x00007ff643e2115a UnrealGame.exe!UnknownFunction []
[2022.08.22-08.30.39:491][827]LogWindows: Error: [Callstack] 0x00007ff643e241dc UnrealGame.exe!UnknownFunction []
[2022.08.22-08.30.39:491][827]LogWindows: Error: [Callstack] 0x00007ff643e35994 UnrealGame.exe!UnknownFunction []
[2022.08.22-08.30.39:491][827]LogWindows: Error: [Callstack] 0x00007ff64be9fbba UnrealGame.exe!UnknownFunction []
[2022.08.22-08.30.39:491][827]LogWindows: Error: [Callstack] 0x00007ff949087034 KERNEL32.DLL!UnknownFunction []
[2022.08.22-08.30.39:491][827]LogWindows: Error: [Callstack] 0x00007ff94a942651 ntdll.dll!UnknownFunction []
[2022.08.22-08.30.39:491][827]LogWindows: Error:
[2022.08.22-08.30.39:496][827]LogExit: Executing StaticShutdownAfterError
[2022.08.22-08.30.39:496][827]LogWindows: FPlatformMisc::RequestExit(1)
[2022.08.22-08.30.39:496][827]LogWindows: FPlatformMisc::RequestExitWithStatus(1, 3)
[2022.08.22-08.30.39:496][827]LogCore: Engine exit requested (reason: Win RequestExit)
[2022.08.22-08.30.39:507][827]Log file closed, 08/22/22 10:30:39
The only info from the log are two warnings, but unfortunately i have no idea where to find this FKControlRig object:
[2022.08.22-08.30.34:983][827]LogGarbage: Warning: Disregard for GC object FKControlRig /Script/ControlRig.Default__FKControlRig referencing RigVM /Script/ControlRig.Default__FKControlRig:VM which is not part of root set
[2022.08.22-08.30.34:983][827]LogGarbage: Warning: Disregard for GC object FKControlRig /Script/ControlRig.Default__FKControlRig referencing RigHierarchy /Script/ControlRig.Default__FKControlRig:DynamicHierarchy which is not part of root set
Please help me to find the problem, i am stuck for two days now :/

Flutter Advance pdf viewer plugin works fine in emulator but in real device it shows error

I am completely a beginer in flutter .I have developing an app which shows pdf from local storage and store it in local db.when I am running in Emulator it works fine but when runing in real device it shows error I using Advance pdf viewer plugin I also create proguard-rues.pro file also. can any help me solve this issue.
Here is my pdf fetching code
FilePickerResult pdf = await FilePicker.platform
.pickFiles(type: FileType.custom, allowedExtensions: ['pdf']);
_pdf = File(pdf.files.single.path);
doc = await PDFDocument.fromFile(_pdf);
MyPdf Docviewer code
Container(
width: 120,
height: 120,
margin: EdgeInsets.all(10.0),
child: PDFViewer(
document: doc,
),
)
My proguard rules.pro file
-keep class com.shockwave.**
-keepclassmembers class com.shockwave.** { *; }
My android build gradle file
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
My android manifest file
FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION"/>
<application
android:requestLegacyExternalStorage="true"
Error message while running in real device
D/FilePickerUtils(22253): Allowed file extensions mimes: [application/pdf]
D/FilePickerDelegate(22253): Selected type */*
I/SurfaceView(22253): updateWindow -- onWindowVisibilityChanged, visibility = 8, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
I/SurfaceView(22253): 156878148 Changes: creating=false format=false size=false visible=true left=false top=false mUpdateWindowNeeded=false mReportDrawNeeded=false redrawNeeded=false forceSizeChanged=false mVisible=true mRequestedVisible=false, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
I/SurfaceView(22253): 156878148 Cur surface: Surface(name=null)/#0xce7fd99, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
I/SurfaceView(22253): 156878148 New surface: Surface(name=null)/#0xb61c85e, vis=false, frame=Rect(0, 0 - 480, 854), this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
I/SurfaceView(22253): 156878148 visibleChanged -- surfaceDestroyed, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
I/SurfaceView(22253): surfaceDestroyed callback +, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
D/GraphicBuffer(22253): register, handle(0x86399440) (w:480 h:854 s:480 f:0x1 u:0x000b00)
D/Surface (22253): Surface::disconnect(this=0x9038d700,api=1)
D/GraphicBuffer(22253): unregister, handle(0x86398300) (w:480 h:854 s:480 f:0x1 u:0x000b00)
D/GraphicBuffer(22253): unregister, handle(0x86398480) (w:480 h:854 s:480 f:0x1 u:0x000b00)
D/GraphicBuffer(22253): unregister, handle(0x86399440) (w:480 h:854 s:480 f:0x1 u:0x000b00)
D/Surface (22253): Surface::disconnect(this=0x9038d700,api=1)
I/SurfaceView(22253): surfaceDestroyed callback -, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
V/SurfaceView(22253): Layout: x=0 y=0 w=480 h=854, frame=Rect(0, 0 - 480, 854), this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
D/SurfaceView(22253): 156878148 windowPositionLostRT RT, frameNr = 0
D/Surface (22253): Surface::disconnect(this=0x9038fa00,api=1)
D/GraphicBuffer(22253): unregister, handle(0x9172aec0) (w:480 h:854 s:480 f:0x1 u:0x000b00)
D/GraphicBuffer(22253): unregister, handle(0x9172b040) (w:480 h:854 s:480 f:0x1 u:0x000b00)
D/GraphicBuffer(22253): unregister, handle(0x9172af80) (w:480 h:854 s:480 f:0x1 u:0x000b00)
D/Surface (22253): Surface::disconnect(this=0x9038fa00,api=1)
V/PhoneWindow(22253): DecorView setVisiblity: visibility = 4, Parent = ViewRoot{bfd9ce3 com.example.detailscollector/com.example.detailscollector.MainActivity,ident = 0}, this = DecorView#be0ade5[MainActivity]
I/SurfaceView(22253): updateWindow -- onWindowVisibilityChanged, visibility = 4, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
I/FilePickerUtils(22253): Caching from URI: content://com.android.providers.downloads.documents/document/3389
V/PhoneWindow(22253): DecorView setVisiblity: visibility = 0, Parent = ViewRoot{bfd9ce3 com.example.detailscollector/com.example.detailscollector.MainActivity,ident = 0}, this = DecorView#be0ade5[MainActivity]
D/ActivityThread(22253): isAppLocked r.intent.getComponent().getPackageName() = com.example.detailscollector
D/ActivityThread(22253): isAppLocked r.intent.getComponent() = ComponentInfo{com.example.detailscollector/com.example.detailscollector.MainActivity}
I/SurfaceView(22253): updateWindow -- onWindowVisibilityChanged, visibility = 0, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
I/SurfaceView(22253): 156878148 Changes: creating=false format=false size=false visible=true left=false top=false mUpdateWindowNeeded=false mReportDrawNeeded=false redrawNeeded=false forceSizeChanged=false mVisible=false mRequestedVisible=true, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
I/SurfaceView(22253): 156878148 Cur surface: Surface(name=null)/#0xce7fd99, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
I/SurfaceView(22253): 156878148 New surface: Surface(name=null)/#0xb61c85e, vis=true, frame=Rect(0, 0 - 480, 854), this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
I/SurfaceView(22253): 156878148 visibleChanged -- surfaceCreated, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
I/SurfaceView(22253): surfaceCreated callback +, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
D/Surface (22253): Surface::connect(this=0x9038fa00,api=1)
W/libEGL (22253): [ANDROID_RECORDABLE] format: 1
D/mali_winsys(22253): EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000
I/SurfaceView(22253): surfaceCreated callback -, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
I/SurfaceView(22253): 156878148 surfaceChanged -- format=4 w=480 h=854, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
I/SurfaceView(22253): surfaceChanged callback +, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
I/SurfaceView(22253): surfaceChanged callback -, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
I/SurfaceView(22253): 156878148 surfaceRedrawNeeded, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
I/SurfaceView(22253): 156878148 finishedDrawing, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
V/SurfaceView(22253): Layout: x=0 y=0 w=480 h=854, frame=Rect(0, 0 - 480, 854), this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
D/OpenGLRenderer(22253): CanvasContext() 0x90237000 initialize window=0x9038f300, title=com.example.detailscollector/com.example.detailscollector.MainActivity
D/Surface (22253): Surface::connect(this=0x9038f300,api=1)
W/libEGL (22253): [ANDROID_RECORDABLE] format: 1
V/InputMethodManager(22253): onWindowFocus: io.flutter.embedding.android.FlutterView{bebe62d VFE...... .F...... 0,0-480,854} softInputMode=16 first=true flags=#81810100
D/mali_winsys(22253): EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000
I/SurfaceView(22253): Punch a hole(dispatchDraw), this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854}
D/SurfaceView(22253): 156878148 updateWindowPosition RT, frameNr = 1, postion = [0, 0, 480, 854]
D/GraphicBuffer(22253): register, handle(0x9172af80) (w:480 h:854 s:480 f:0x1 u:0x000b00)
D/GraphicBuffer(22253): register, handle(0x9172b4c0) (w:480 h:854 s:480 f:0x1 u:0x000b00)
D/GraphicBuffer(22253): register, handle(0x9172b040) (w:480 h:854 s:480 f:0x1 u:0x000b00)
D/FilePickerUtils(22253): File loaded and cached at:/data/user/0/com.example.detailscollector/cache/file_picker/96842
D/FilePickerDelegate(22253): File path:[com.mr.flutter.plugin.filepicker.FileInfo#a9b953c]
I/flutter (22253): pdf file
I/flutter (22253): found
I/art (22253): Enter while loop.
I/art (22253): Background sticky concurrent mark sweep GC freed 15207(1053KB) AllocSpace objects, 5(100KB) LOS objects, 0% free, 23MB/23MB, paused 1.951ms total 108.250ms
I/art (22253): Enter while loop.
I/System.out(22253): length=5; regionStart=0; regionLength=-1
W/System.err(22253): java.lang.StringIndexOutOfBoundsException: length=5; regionStart=0; regionLength=-1
W/System.err(22253): at java.lang.String.substring(String.java:1931)
W/System.err(22253): at pt.tribeiro.flutter_plugin_pdf_viewer.FlutterPluginPdfViewerPlugin.getFileNameFromPath(FlutterPluginPdfViewerPlugin.java:125)
W/System.err(22253): at pt.tribeiro.flutter_plugin_pdf_viewer.FlutterPluginPdfViewerPlugin.createTempPreview(FlutterPluginPdfViewerPlugin.java:130)
W/System.err(22253): at pt.tribeiro.flutter_plugin_pdf_viewer.FlutterPluginPdfViewerPlugin.getPage(FlutterPluginPdfViewerPlugin.java:170)
W/System.err(22253): at pt.tribeiro.flutter_plugin_pdf_viewer.FlutterPluginPdfViewerPlugin.access$100(FlutterPluginPdfViewerPlugin.java:29)
W/System.err(22253): at pt.tribeiro.flutter_plugin_pdf_viewer.FlutterPluginPdfViewerPlugin$1.run(FlutterPluginPdfViewerPlugin.java:70)
W/System.err(22253): at android.os.Handler.handleCallback(Handler.java:836)
W/System.err(22253): at android.os.Handler.dispatchMessage(Handler.java:103)
W/System.err(22253): at android.os.Looper.loop(Looper.java:203)
W/System.err(22253): at android.os.HandlerThread.run(HandlerThread.java:61)
D/GraphicBuffer(22253): register, handle(0x9172b580) (w:480 h:854 s:480 f:0x1 u:0x000b00)
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following ArgumentError was thrown building NotificationListener<KeepAliveNotification>:
Invalid argument(s) (path): Must not be null
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
When the exception was thrown, this was the stack:
#0 ArgumentError.checkNotNull (dart:core/errors.dart:194:27)
#1 _File._checkNotNull (dart:io/file_impl.dart:641:19)
#2 new _File (dart:io/file_impl.dart:205:17)
#3 new File (dart:io/file.dart:250:18)
#4 _PDFPageState._repaint (package:advance_pdf_viewer/src/page.dart:47:26)
...
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 259 pos 16: 'child == null || indexOf(child) > index': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
A RenderViewport expected a child of type RenderSliver but received a child of type RenderErrorBox.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was:
PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40
════════════════════════════════════════════════════════════════════════════════════════════════════
.pickFiles(type: FileType.custom, allowedExtensions: ['pdf']);
change To:
FilePickerResult pdf = await FilePicker.platform
.pickFiles(type: FileType.custom, allowedExtensions: ['.pdf']);
This should resolve the issue. if not then show some code of create.dart line 190 to 210 by modifying your question.
Here is my uploading function
void selectpdf() async {
pdf = await FilePicker.platform
.pickFiles(type: FileType.custom, allowedExtensions: ['pdf']);
_pdf = File(pdf.files.single.path);
);
doc = await PDFDocument.fromFile(pdf);
imgFile2 = pdf.readAsBytesSync();
imageString2 = base64Encode(imgFile2);
//print(imageString2);
note.photoname2 = imageString2;
note.type2 = 2;
decode2(imageString2);
setState(() {
pdfdoc = true;
doc = doc;
imageFile = pdf;
});
}
try this,
Container(
width: 120,
height: 120,
margin: EdgeInsets.all(10.0),
child: PDFViewer(
document: doc,
zoomSteps: 1,
lazyLoad: false,
),
)

Google Play Games C++ SDK v3.0 not a drop in replacement?

I have been using the C++ SDK of Google Play Games: gpg_cpp_sdk.v2.3.zip
I have now downloaded the new version gpg_cpp_sdk.v3.0.zip as available from Google.
Whereas the 2.3 version would work just fine, during build, and during runtime, I have not been able to link against the 3.0 version.
I get this error:
[178/178] : && /home/bram/android-sdk-linux/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv7-none-linux-androideabi --gcc-toolchain=/home/bram/android-sdk-linux/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 --sysroot=/home/bram/android-sdk-linux/ndk-bundle/sysroot -fPIC -isystem /home/bram/android-sdk-linux/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=16 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-integrated-as -marm -mfpu=neon -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -DANDROID=1 -DPLAY=1 -DUSEES2=1 -DLOGTAG=swaag -DAPPVER=4.40 -DDEBUG -O0 -fno-limit-debug-info -fuse-ld=gold -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a --sysroot /home/bram/android-sdk-linux/ndk-bundle/platforms/android-16/arch-arm -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libbuggy.so -o /home/bram/apps/Buggy/AndroidStudio/app/build/intermediates/cmake/debug/obj/armeabi-v7a/libbuggy.so CMakeFiles/buggy.dir/main.cpp.o CMakeFiles/buggy.dir/StateManager.cpp.o CMakeFiles/buggy.dir/leaderboardmanager.cpp.o /home/bram/src/gpg-cpp-sdk_3.0/android/lib/gnustl/armeabi-v7a/libgpg.a pi/libpi.a gbase/libgbase.a opende/libopende.a gpgoap/libgpgoap.a ip2ensign/libip2ensign.a -lEGL -lGLESv2 -lOpenSLES -landroid -llog -lz -lm -latomic -lm "/home/bram/android-sdk-linux/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libgnustl_static.a" && :
FAILED: : && /home/bram/android-sdk-linux/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv7-none-linux-androideabi --gcc-toolchain=/home/bram/android-sdk-linux/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 --sysroot=/home/bram/android-sdk-linux/ndk-bundle/sysroot -fPIC -isystem /home/bram/android-sdk-linux/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=16 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-integrated-as -marm -mfpu=neon -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -DANDROID=1 -DPLAY=1 -DUSEES2=1 -DLOGTAG=swaag -DAPPVER=4.40 -DDEBUG -O0 -fno-limit-debug-info -fuse-ld=gold -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a --sysroot /home/bram/android-sdk-linux/ndk-bundle/platforms/android-16/arch-arm -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libbuggy.so -o /home/bram/apps/Buggy/AndroidStudio/app/build/intermediates/cmake/debug/obj/armeabi-v7a/libbuggy.so CMakeFiles/buggy.dir/main.cpp.o CMakeFiles/buggy.dir/StateManager.cpp.o CMakeFiles/buggy.dir/leaderboardmanager.cpp.o /home/bram/src/gpg-cpp-sdk_3.0/android/lib/gnustl/armeabi-v7a/libgpg.a pi/libpi.a gbase/libgbase.a opende/libopende.a gpgoap/libgpgoap.a ip2ensign/libip2ensign.a -lEGL -lGLESv2 -lOpenSLES -landroid -llog -lz -lm -latomic -lm "/home/bram/android-sdk-linux/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libgnustl_static.a" && :
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:137: error: undefined reference to 'gpg::AchievementManager::Unlock(std::string const&)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:145: error: undefined reference to 'gpg::AchievementManager::SetStepsAtLeast(std::string const&, unsigned int)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:153: error: undefined reference to 'gpg::LeaderboardManager::SubmitScore(std::string const&, unsigned long long)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:161: error: undefined reference to 'gpg::AchievementManager::ShowAllUI(std::function<void (gpg::UIStatus const&)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:175: error: undefined reference to 'gpg::LeaderboardManager::ShowAllUI(std::function<void (gpg::UIStatus const&)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:193: error: undefined reference to 'gpg::LeaderboardManager::FetchScoreSummary(gpg::DataSource, std::string const&, gpg::LeaderboardTimeSpan, gpg::LeaderboardCollection, std::function<void (gpg::LeaderboardManager::FetchScoreSummaryResponse const&)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:270: error: undefined reference to 'gpg::AchievementManager::FetchAll(std::function<void (gpg::AchievementManager::FetchAllResponse const&)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:339: error: undefined reference to 'gpg::RealTimeMultiplayerManager::SendUnreliableMessageToOthers(gpg::RealTimeRoom const&, std::vector<unsigned char, std::allocator<unsigned char> >)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:345: error: undefined reference to 'gpg::RealTimeMultiplayerManager::SendReliableMessage(gpg::RealTimeRoom const&, gpg::MultiplayerParticipant const&, std::vector<unsigned char, std::allocator<unsigned char> >, std::function<void (gpg::MultiplayerStatus const&)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:430: error: undefined reference to 'gpg::PlayerManager::Fetch(std::string const&, std::function<void (gpg::PlayerManager::FetchResponse const&)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:452: error: undefined reference to 'gpg::PlayerManager::FetchConnected(std::function<void (gpg::PlayerManager::FetchListResponse const&)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:681: error: undefined reference to 'gpg::RealTimeMultiplayerManager::CreateRealTimeRoom(gpg::RealTimeRoomConfig const&, gpg::IRealTimeEventListener*, std::function<void (gpg::RealTimeMultiplayerManager::RealTimeRoomResponse const&)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:708: error: undefined reference to 'gpg::RealTimeMultiplayerManager::ShowRoomInboxUI(std::function<void (gpg::RealTimeMultiplayerManager::RoomInboxUIResponse const&)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:723: error: undefined reference to 'gpg::RealTimeMultiplayerManager::ShowPlayerSelectUI(unsigned int, unsigned int, bool, std::function<void (gpg::TurnBasedMultiplayerManager::PlayerSelectUIResponse const&)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:730: error: undefined reference to 'gpg::RealTimeMultiplayerManager::LeaveRoom(gpg::RealTimeRoom const&, std::function<void (gpg::ResponseStatus const&)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:790: error: undefined reference to 'gpg::GameServices::Builder::SetOnAuthActionStarted(std::function<void (gpg::AuthOperation)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:791: error: undefined reference to 'gpg::GameServices::Builder::SetOnAuthActionFinished(std::function<void (gpg::AuthOperation, gpg::AuthStatus)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:792: error: undefined reference to 'gpg::GameServices::Builder::SetOnMultiplayerInvitationEvent(std::function<void (gpg::MultiplayerEvent, std::string, gpg::MultiplayerInvitation)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:619: error: undefined reference to 'gpg::RealTimeMultiplayerManager::ShowWaitingRoomUI(gpg::RealTimeRoom const&, unsigned int, std::function<void (gpg::RealTimeMultiplayerManager::WaitingRoomUIResponse const&)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:594: error: undefined reference to 'gpg::RealTimeMultiplayerManager::AcceptInvitation(gpg::MultiplayerInvitation const&, gpg::IRealTimeEventListener*, std::function<void (gpg::RealTimeMultiplayerManager::RealTimeRoomResponse const&)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:538: error: undefined reference to 'gpg::RealTimeMultiplayerManager::ShowWaitingRoomUI(gpg::RealTimeRoom const&, unsigned int, std::function<void (gpg::RealTimeMultiplayerManager::WaitingRoomUIResponse const&)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:648: error: undefined reference to 'gpg::RealTimeMultiplayerManager::CreateRealTimeRoom(gpg::RealTimeRoomConfig const&, gpg::IRealTimeEventListener*, std::function<void (gpg::RealTimeMultiplayerManager::RealTimeRoomResponse const&)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:779: error: undefined reference to 'gpg::PlayerManager::FetchSelf(std::function<void (gpg::PlayerManager::FetchSelfResponse const&)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:561: error: undefined reference to 'gpg::RealTimeMultiplayerManager::ShowWaitingRoomUI(gpg::RealTimeRoom const&, unsigned int, std::function<void (gpg::RealTimeMultiplayerManager::WaitingRoomUIResponse const&)>)'
/home/bram/apps/Buggy/Android/jni/StateManager.cpp:567: error: undefined reference to 'gpg::RealTimeMultiplayerManager::LeaveRoom(gpg::RealTimeRoom const&, std::function<void (gpg::ResponseStatus const&)>)'
/home/bram/src/gpg-cpp-sdk_3.0/android/lib/gnustl/armeabi-v7a/libgpg.a:third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc:function gpg::AndroidGameServicesImpl::AchievementFetchAllOperation::AchievementFetchAllOperation(std::__ndk1::shared_ptr<gpg::AndroidGameServicesImpl>, gpg::InternalCallback<gpg::AchievementManager::FetchAllResponse const&>, gpg::DataSource): error: undefined reference to 'std::__ndk1::__shared_weak_count::__add_shared()'
/home/bram/src/gpg-cpp-sdk_3.0/android/lib/gnustl/armeabi-v7a/libgpg.a:third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc:function gpg::AndroidGameServicesImpl::AndroidFetcherOperation<gpg::AchievementManager::FetchAllResponse>::AndroidFetcherOperation(std::__ndk1::shared_ptr<gpg::AndroidGameServicesImpl>, gpg::InternalCallback<gpg::AchievementManager::FetchAllResponse const&>): error: undefined reference to 'std::__ndk1::__shared_weak_count::__add_shared()'
...
This is in my CMakeLists.txt and used to work:
add_library( gpg
STATIC
IMPORTED
)
set_target_properties( gpg
PROPERTIES IMPORTED_LOCATION
$ENV{HOME}/src/gpg-cpp-sdk_3.0/android/lib/gnustl/${ANDROID_ABI}/libgpg.a
)
It seems that v3.0 is not a drop-in replacement for the v2.3 library.
Is there anything I should do differently with the new version?
I also had problem problem replacing older SDK with v3.0 and decided to stick with v2.3 because of first requirement for v3.0:
Requires Android NDK r14 or higher.
check if you meet all of the requirements listed in v3.0 release notes
I wasted a lot of time before i checked this myself.

Error installing npm module 'underscore' on raspi3

in my project folder I run
npm install underscore
the install begins and then it aborts with the following
pi#mserv01:~/foo $ npm install underscore
npm http GET https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz
npm http 200 https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz
abort: +▒▒
▒▒▒\ ▒▒<
==== Stack trace ============================================
Security context: 0x32434659 <JS Object>#0#
1: _parse(aka parse) [/usr/local/lib/node_modules/npm/node_modules/tar/lib/extended-header.js:~61] (this=0x5d74cbad <an ExtendedHeader>#1#,c=0x5d74fca1 <a Buffer>#2#)
2: emit [events.js:95] (this=0x5d74cbad <an ExtendedHeader>#1#,type=0x4dc14839 <String[4]: data>)
3: arguments adaptor frame: 2->1
4: _read [/usr/local/lib/node_modules/npm/node_modules/tar/lib/entry.js:111] (this=0x5d74cbad <an ExtendedHeader>#1#)
8: _read [native v8natives.js:1594] (this=0x5d74cbad <an ExtendedHeader>#1#)
9: write [/usr/local/lib/node_modules/npm/node_modules/tar/lib/entry.js:68] (this=0x5d74cbad <an ExtendedHeader>#1#,c=0x5d74fca1 <a Buffer>#2#)
10: _process [/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:104] (this=0x5d738181 <an Extract>#3#,c=0x5d74fca1 <a Buffer>#2#)
11: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:46] (this=0x5d738379 <a BlockStream>#4#,c=0x5d74fca1 <a Buffer>#2#)
12: emit [events.js:95] (this=0x5d738379 <a BlockStream>#4#,type=0x4dc14839 <String[4]: data>)
13: arguments adaptor frame: 2->1
14: _emitChunk [/usr/local/lib/node_modules/npm/node_modules/block-stream/block-stream.js:145] (this=0x5d738379 <a BlockStream>#4#,flush=0x32408091 <undefined>)
15: arguments adaptor frame: 0->1
16: resume [/usr/local/lib/node_modules/npm/node_modules/block-stream/block-stream.js:58] (this=0x5d738379 <a BlockStream>#4#)
17: arguments adaptor frame: 1->0
18: resume [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/reader.js:253] (this=0x5d738181 <an Extract>#3#,who=0x5d738181 <an Extract>#3#)
19: arguments adaptor frame: 0->1
20: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:256] (this=0x5d74486d <an Entry>#5#)
21: emit [events.js:92] (this=0x5d74486d <an Entry>#5#,type=0x4dc164b9 <String[6]: resume>)
22: resume [/usr/local/lib/node_modules/npm/node_modules/tar/lib/entry.js:92] (this=0x5d74486d <an Entry>#5#)
23: resume [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/collect.js:62] (this=0x32434701 <JS Global Object>#6#)
24: unblockEntry [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/collect.js:43] (this=0x32434701 <JS Global Object>#6#)
25: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/collect.js:47] (this=0x5d74486d <an Entry>#5#,dest=0x5d7477c5 <a FileWriter>#7#)
26: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:143] (this=0x5d7477c5 <a FileWriter>#7#)
27: emit [events.js:92] (this=0x5d7477c5 <a FileWriter>#7#,type=0x530a276d <String[5]: ready>)
28: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/file-writer.js:45] (this=0x5d74a615 <a WriteStream>#8#,fd=10)
29: emit [events.js:95] (this=0x5d74a615 <a WriteStream>#8#,type=0x4dc1f615 <String[4]: open>)
30: arguments adaptor frame: 2->1
31: /* anonymous */ [fs.js:1662] (this=0x5d74a615 <a WriteStream>#8#,er=0x32408081 <null>,fd=10)
35: /* anonymous */(aka /* anonymous */) [native v8natives.js:1597] (this=0x32408091 <undefined>)
36: arguments adaptor frame: 2->0
37: done [/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:144] (this=0x5d74a9e5 <an OpenReq>#9#,er=0x32408081 <null>,result=10)
38: done [/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:64] (this=0x5d74a9e5 <an OpenReq>#9#,er=0x32408081 <null>,fd=10)
42: /* anonymous */ [native v8natives.js:1597] (this=0x32408081 <null>)
43: arguments adaptor frame: 2->0
45: oncomplete [fs.js:107] (this=0x5d74ab99 <an Object>#10#)
46: arguments adaptor frame: 2->0
... MORE STACKTRACE... TOO MUCH TO PASTE IT ALL HERE ...
0: 0x5d746321 <JS Function onend>#98#
1: 0x5d74b521 <JS Function cleanup>#99#
#83# 0x3063fd3d: 0x3063fd3d <JS Function>
#84# 0x5d74a6f1: 0x5d74a6f1 <JS Array[0]>
#85# 0x5d74abcd: 0x5d74abcd <JS Function g>
listener: 0x44f2c41d <JS Function>#100#
#86# 0x5d739b91: 0x5d739b91 <JS Function>
#87# 0x5d734891: 0x5d734891 <JS Function extractEntry>
#88# 0x5d73da4d: 0x5d73da4d <JS Function>
#89# 0x5d73a279: 0x5d73a279 <JS Function onerror>
#90# 0x5d73a93d: 0x5d73a93d <JS Function>
#91# 0x5d73dba5: 0x5d73dba5 <JS Function onerror>
#92# 0x5d73a575: 0x5d73a575 <JS Function g>
listener: 0x5d73a29d <JS Function onclose>#101#
#93# 0x5d73486d: 0x5d73486d <JS Function cb>
#94# 0x5d73dbc9: 0x5d73dbc9 <JS Function cleanup>
#95# 0x5d73de1d: 0x5d73de1d <JS Array[2]>
0: 0x5d73a161 <JS Function>#102#
1: 0x5d73dbc9 <JS Function cleanup>#94#
#96# 0x5d748861: 0x5d748861 <JS Function>
#97# 0x5d74b4fd: 0x5d74b4fd <JS Function onerror>
#98# 0x5d746321: 0x5d746321 <JS Function onend>
#99# 0x5d74b521: 0x5d74b521 <JS Function cleanup>
#100# 0x44f2c41d: 0x44f2c41d <JS Function>
#101# 0x5d73a29d: 0x5d73a29d <JS Function onclose>
#102# 0x5d73a161: 0x5d73a161 <JS Function>
=====================
Trace/breakpoint trap
It won't let me paste the entire stack trace, but this is what is happening. Any ideas what might be going on... other modules are installing fine.

Nix static library linking

I am trying to build nix on FreeBSD. I have changed a few things to make it compile. Here are the patched sources: https://github.com/ysangkok/nix
I configure using ./bootstrap.sh and bash configure CXX=clang++ CC=clang.
The nix executable itself links fine, but I can't link nix-channel:
[janus#xn--kn-1ia ~/nix] gmake V=1
local.mk:13: warning: overriding recipe for target '/usr/local/include/nix/shared.hh'
local.mk:13: warning: ignoring old recipe for target '/usr/local/include/nix/shared.hh'
local.mk:13: warning: overriding recipe for target '/usr/local/include/nix/common-args.hh'
local.mk:13: warning: ignoring old recipe for target '/usr/local/include/nix/common-args.hh'
clang++ -o src/nix-channel/nix-channel src/nix-channel/nix-channel.o src/libmain/libnixmain.a -L/usr/local/lib -lcrypto src/libutil/libnixutil.a -llzma -lbz2 -pthread -L/usr/local/lib -lcrypto src/boost/format/libnixformat.a src/libstore/libnixstore.a -L/usr/local/lib -lsqlite3 -lbz2 -L/usr/local/lib -lcurl -pthread
/usr/bin/ld: warning: libcrypto.so.7, needed by /usr/local/lib/libcurl.so, may conflict with libcrypto.so.8
/usr/bin/ld: warning: libcrypto.so.7, needed by /usr/local/lib/libcurl.so, may conflict with libcrypto.so.8
src/libstore/libnixstore.a(misc.o): In function `nix::Store::computeFSClosure(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&, bool, bool, bool)':
/home/janus/nix/src/libstore/misc.cc:14: undefined reference to `nix::ThreadPool::ThreadPool(unsigned long)'
/home/janus/nix/src/libstore/misc.cc:68: undefined reference to `nix::ThreadPool::enqueue(std::__1::function<void ()()> const&)'
/home/janus/nix/src/libstore/misc.cc:70: undefined reference to `nix::ThreadPool::process()'
/home/janus/nix/src/libstore/misc.cc:71: undefined reference to `nix::ThreadPool::~ThreadPool()'
/home/janus/nix/src/libstore/misc.cc:71: undefined reference to `nix::ThreadPool::~ThreadPool()'
src/libstore/libnixstore.a(misc.o): In function `nix::Store::queryMissing(std::__1::set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&, std::__1::set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&, std::__1::set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&, unsigned long long&, unsigned long long&)':
/home/janus/nix/src/libstore/misc.cc:80: undefined reference to `nix::ThreadPool::ThreadPool(unsigned long)'
/home/janus/nix/src/libstore/misc.cc:201: undefined reference to `nix::ThreadPool::enqueue(std::__1::function<void ()()> const&)'
/home/janus/nix/src/libstore/misc.cc:203: undefined reference to `nix::ThreadPool::process()'
/home/janus/nix/src/libstore/misc.cc:204: undefined reference to `nix::ThreadPool::~ThreadPool()'
/home/janus/nix/src/libstore/misc.cc:204: undefined reference to `nix::ThreadPool::~ThreadPool()'
src/libstore/libnixstore.a(misc.o): In function `operator()':
/home/janus/nix/src/libstore/misc.cc:168: undefined reference to `nix::ThreadPool::enqueue(std::__1::function<void ()()> const&)'
/home/janus/nix/src/libstore/misc.cc:196: undefined reference to `nix::ThreadPool::enqueue(std::__1::function<void ()()> const&)'
src/libstore/libnixstore.a(misc.o): In function `nix::Store::queryMissing(std::__1::set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&, std::__1::set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&, std::__1::set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&, unsigned long long&, unsigned long long&)::$_4::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, nix::Derivation const&) const':
/home/janus/nix/src/libstore/misc.cc:109: undefined reference to `nix::ThreadPool::enqueue(std::__1::function<void ()()> const&)'
src/libstore/libnixstore.a(misc.o): In function `ref':
/home/janus/nix/src/libstore/misc.cc:132: undefined reference to `nix::ThreadPool::enqueue(std::__1::function<void ()()> const&)'
src/libstore/libnixstore.a(misc.o): In function `operator()':
/home/janus/nix/src/libstore/misc.cc:35: undefined reference to `nix::ThreadPool::enqueue(std::__1::function<void ()()> const&)'
src/libstore/libnixstore.a(misc.o):/home/janus/nix/src/libstore/misc.cc:40: more undefined references to `nix::ThreadPool::enqueue(std::__1::function<void ()()> const&)' follow
src/libstore/libnixstore.a(build.o): In function `nix::DerivationGoal::openLogFile()':
/home/janus/nix/src/libstore/build.cc:2948: undefined reference to `nix::makeCompressionSink(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, nix::Sink&)'
src/libstore/libnixstore.a(builtins.o): In function `nix::builtinFetchurl(nix::BasicDerivation const&)':
/home/janus/nix/src/libstore/builtins.cc:48: undefined reference to `nix::decompress(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake: *** [mk/lib.mk:105: src/nix-channel/nix-channel] Error 1
[janus#xn--kn-1ia ~/nix]
ThreadPool is defined in src/libutil/thread-pool.cc. libutil is also linked in the command above. Why is the reference undefined?
Even if I build the patched sources on Linux, I still get the issue.

Resources