Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 02 2016 16:31
    @chamons banned @IfErrThrowBrick_twitter
honkmother
@honkmother
and then immediately segfaults
any ideas why?
Chris Hamons
@chamons
Posting the crash log might help people guess better.
honkmother
@honkmother
Crash log is non-figuratively: "SegFault: 11"
No exceptions, no real errors.
I couldn't get lldb to run under dotnet for some reason.
captainjono
@captainjono

hi all - ive used xam before across mobile devices extensively but this is my first foray into macOS and im usually a win user... im looking for a little advice on debugging binding issues.
Im trying to leverage embedded chrome/ CEF.framework using CefGlue via xam.mac or .net core but im having very little luck getting examples to work always for the same reason - cant find the native cef library at runtime.

ive traweled docs and i feel like i am doing everything correctly. i then came across this - https://stackoverflow.com/questions/47538368/how-to-properly-map-an-expected-dll-name-to-a-native-mac-framework-for-mono
i found this person who was having similiar issues and they mentioned a "lib" appending issue. so i experimented and was finally able to get past the .dll load by renaming "chromeinium embedded framework.framework/chromeinium embedded framework" to "../liblibcef", but fails soon after because it cant find other expected framework/bundle files that are located in "chromeinium embedded framework.framework/Resources". im assuming there is a proper way to achieve this linking that i just cant work out is. is there a config i need to update to provide the mapping? (<dll import= ?).

cefglue binds using this approach:
[DllImport("libcef", EntryPoint = "cef_initialize", CallingConvention = libcef.CEF_CALL)]
public static extern int initialize(cef_main_args_t args, cef_settings_t settings, cef_app_t* application);

looking for suggestions / links that will help me down the right path on setting up these native ".framework" references? i would like to generate my own in future using sharpie so i want to fully understand the mechanics here.
is using something like dtrace/opensnoop the right approach to debugging these load failures (wasnt highlighting the probing paths for me :| )?

Chris Hamons
@chamons
This channel is for hacking on Xamarin.iOS and Mac, not use, and I know nothing about CEF but I will note that I’ve heard from a very experienced fellow engineer that embedding CEF is a complete nightmare to get right
If you set the environmental variables MONO_LOG_LEVEL=debug MONO_LOG_MASK=dll you should see spam on what mono is looking for that may be useful
Miguel de Icaza
@migueldeicaza
Hello folks, we have been relying on a cool bridge to bring the Xamarin team with the open source community going, but that might be coming to an end.
I have created a Discord server to discuss the internal evolution of Mono and .NET
https://discord.gg/A982BT
Jared Updike
@jupdike
On my macOS Catalina MacBook Pro, I am using Xcode 11.5 for some personal Swift projects, but using Xamarin.iOS, .Android, and Xamarin.Mac in Visual Studio for Mac 8.6.5 for C# projects for my job, both on the same machine. If I upgrade to Xcode 12 beta 2 so I can try out some new stuff with Swift (independent of C#), will it break my ability to get work done in C#/Xamarin/VS for Mac? targeting iOS <= 13, stuff that currently works fine? (I understand that iOS 14 and Big Sur support are coming to Xamarin later in the summer/early fall. I don't expect to need that stuff for C# this summer, just Swift. And I absolutely need existing/older C# stuff to continue to work this summer, on the same machine with a single installation of Xcode.) Is it safe to upgrade? (acknowledging that there may be Xcode bugs on Apple's end)
Manuel de la Pena
@mandel-macaque
Julien Pelc you should be able to have both of the xcode installed in you machine and swich between them using xcode-select. Should not be an issue. We work that way in the team with several installations. Just leave stable in /Applications/Xcode.app and install the beta via the delveloper portal in a diff path
Dan Siegel
@dansiegel
@migueldeicaza that invite has expired
Alexander Köplinger
@akoeplinger
@dansiegel here's a new invite that shouldn't expire: https://discord.gg/qgqQqch
Tomasz Cielecki
@Cheesebaron
I have a colleague which is seeing some crashes in RayGun with only this information: NSInvalidArgumentException: *** -streamStatus only defined for abstract class. Define -[System_Net_Http_NSUrlSessionHandler_WrappedNSInputStream streamStatus]!. Has any of you seen anything like that before?
I've looked at the NSUrlSessionHandler code and can't really see there should be any problem with WrappedNSInputStream in there
captainjono
@captainjono
thanks for the advice, these logs helped me solve my issue. another question - If i create a NSWindow in a .dynlib that i have p/invoked from main(); and use a callback to give its handle back to xam.mac - am i able somehow dereference this handle to a NSWindow somehow and work with it (ie resize, fullscreent etc)? ie. looking at the api doco i assume this function could help me NSWindow.fromWindowRef(Int.Ptr) but i havnt been able to get it working...?
Rolf Bjarne Kvinge
@rolfbjarne
Use (NSWindow) ObjCRuntime.GetNSObject (ptr)
strike that
Use (NSWindow) ObjCRuntime.Runtime.GetNSObject (ptr)
captainjono
@captainjono
thats returning null for me... seems from the doco it says "if a managed object exists". this window was created in objective-C land in the .dynlib
Rolf Bjarne Kvinge
@rolfbjarne
it'll create the managed NSWindow instance if it doesn't already exist
unless ptr == IntPtr.Zero, in which case it'll return null
captainjono
@captainjono

ok thanks for this info- i didnt know if what i was trying todo was legal. the handle i am passing definitely looks valid in the debugger - this is the callback code
https://github.com/chromelyapps/Chromely/blob/9bf2efb2c25e6a9ea31b6cba8b6f422647d2642c/src/mac/chromely_mac.mm#L262

i'll keep hacking at it.

captainjono
@captainjono
was using tryget not get! and now its returned a nswindow correctly. i then do mainWin.InvokeOnMainThread(() => mainWin.ToggleFullScreen()) which throws a UI Consistancy error..? i tried multiple ways to invoke, nothing seems to come off?
Rolf Bjarne Kvinge
@rolfbjarne
did you call NSApplication.Init ()?
captainjono
@captainjono

yeh i did - but i am doing it a little later in the app bootstrapper to allow CEF to startup correctly if needs be (its a multi-process architecture that executes the host process multiple times with different commandline args and can timeout if not snappy). Could that effect Init()?

It seems like its on the correct thread to me; im doing the work in the create handler, and if i throw at that point,I can see the .dynlib createWindow in the stack. Cef has its own methods to call on the UI thread, could also try them.

captainjono
@captainjono
If i inspect the window variable in the debugger, the debugger crashes out with the same error. I can see the correct window title on a prop before it crashes, though so it feels like its connected properly to the underling api / mac window handle on some level.
captainjono
@captainjono
So i went ahead and integrated eto.forms where i was trying to hook into the window handling as i required it for other aspects of the application and have gotten it setup to the point where i can use its UI.Invoke methods to get my calls onto the right thread. i'll step through the source code and see how its achieving the integration, I want to understand the mechanics of whats going on here.
Rolf Bjarne Kvinge
@rolfbjarne
as long as the managed NSApplication.Init () method is called before you do anything else in managed code, you should be fine
Matheus Dadalto
@mthdadalto
Anyone has any idea of how to disable this from mac/win-xamarin?
 touch ~/.mtouch-launch-with-lldb
/
You must now execute:
lldb -s /tmp/mtouch-lldb-prep-cmds
Rolf Bjarne Kvinge
@rolfbjarne
execute rm ~/.mtouch-launch-with-lldb from a terminal
on the mac
Matheus Dadalto
@mthdadalto
worked, thanks
jingliancui
@jingliancui
hello team,can you provide progress of swift binding tool
fodcodecrazy0316
@fodcodecrazy0316
Hello
everyone I want to use camera permission on xamarin ios
image.png
I have added privacy string into info.plist but not working
i hope someone helps me. thanks guys
Chris Hamons
@chamons
Friendly reminder that we've moved to https://aka.ms/dotnet-discord and most folks won't be checking here in the future.
Francisco Moraes
@fmoraes74
how can I fix this?
/Users/fmoraes/Projects/TestApp/TestApp.Mac/TestApp.Mac.csproj(101,11): error MSB4226: The imported project "/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/xbuild/Xamarin/Mac/Xamarin.Mac.CSharp.targets" was not found. Also, tried to find "Xamarin/Mac/Xamarin.Mac.CSharp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "/Library/Frameworks/Mono.framework/External/xbuild/" and "/Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/docker/MonoDevelop.Docker/MSbuild" . These search paths are defined in "/Users/fmoraes/Library/Caches/VisualStudio/8.0/MSBuild/35979_1/MonoDevelop.MSBuildBuilder.exe.config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths.
Happened after the latest upgrade of VS
Francisco Moraes
@fmoraes74
nm, reinstalling Xamarin.Mac fixed it
awattar
@awattar
Hi. Is it possible to set FRAMEWORK_SEARCH_PATHS in Xamarin iOS project config?
pm64
@pm64
Knock knock, anyone home? Is it safe to update XCode to 12.2 (released yesterday)?
Julio César Rocha
@JunielKatarn

This forum has moved to Discord.

That said, yes. I used 12.2 yesterday for my XF project.

pm64
@pm64
Thanks @JunielKatarn. What is the best channel to use in Discord? I posted to #xamarin and didn't get a response.
filson1
@filson1
Hey. Any tips for getting the DeviceAgent app to install along with our Xamarin app on physical phones? We're connecting to an already installed app.