.NET

1454 readers
5 users here now

Getting started

Useful resources

IDEs and code editors

Tools

Rules

Related communities

Wikipedia pages

founded 1 year ago
MODERATORS
176
 
 

cross-posted from: https://programming.dev/post/9220472

I've just had this happen (and then stop again) for the second time in a few weeks. This is a new MAUI app where the only thing I've changed so far, other than add a few of my own (already previously tested and working) libraries, is change the home page, and the new home page only has a couple of labels on it, so it has no complexity at all added to it yet, and yet getting this odd alleged memory issue. The first time it happened I couldn't find a fix for it, left it for a while, came back (a week's worth of reboots later) and it was working again. Then today I made one trivial change - added a debug write - and the problem came back (but got past the new line without any issues). Then I rebooted and it's working again.

I have 32Gb of RAM, with 12Gb allocated to a RAMdisk, and I have my paging files set to use the RAMdisk.

It generated a log file which said...

"Native memory allocation (mmap) failed to map 186646528 bytes for G1 virtual space"

...so it only needed 180Mb, and down near the bottom it says...

"Memory: 4k page, system-wide physical 32579M (3638M free)"

...so I had more than enough space left (so the memory message may be a red herring for whatever did cause the crash). Googling that first message brings up a bunch of matches, but none of which are for MAUI Android (all different cases with different fixes).

This is using the Android emulator on a Windows machine where I've set the paging sizes to be system-managed. I'm not sure where the Android emulator actually gets memory from though - the system RAM? The paging RAM(disk)? The build directory? The user's App directory?

It reminds me of years ago there was a similar issue with Xamarin Android where the fix/workaround was to add a line to the csproj (I think it increased the heap or something from memory), but I haven't seen that pop up in a long time. Not sure if this is the same issue or a different one.

There's no repro for it cos I can't even reliably repro it. I'm just concerned that it's going to keep coming back given I haven't even added any complexity to it yet.

Has anyone run into this and/or knows how to fix it?

177
178
 
 

Hi everyone,

i have a strange behaviour of the JIT in DotNet 8.0.

I have created a small demo project (on GitHub)

The crashing code is not verry complex. It is contained in a Cpp-Library compiled to DotNet-IL (managed C++). It is just doing some basic double math with a pow().

I can work arraund this problem by slightly changing the code but that is not satisfying. I whant to understand what i am doing wrong in c++ or if there is a bug in the JIT compiler or C++ compiler.

The code is working in a debug build and even the first 1000+ calls in a release build are working fine. At the point the Jit compiles the method again in stage 2 with full optimization the code starts crashing.

The crashing code is wrapped in a Try-Catch in the CS-Console project.

When setting a break point in the release build (after the first exception) to inspect the situation everything runs perfectly. Even after removint the break point and continue the execution the code runs fine.

Would be really nice if some one can help me with this.

Thanks in advanced!

179
 
 

cross-posted from: https://programming.dev/post/8419041

I'm just trying out the built-in builder.Logging.AddDebug(); in a MAUI app, but don't see the output anywhere. From several blogs I expected to see the messages in the Visual Studio Debug output window, but they aren't appearing.

Just using the stock-standard MAUI app, the only changes I have made are in App.cs as follows...

using Microsoft.Extensions.Logging;
using Microsoft.Maui.Controls;
namespace BaseMAUIApp;
internal class App :Application
{
public App(ILogger<App> logger) {
    logger.LogDebug("******************* Message from logger!");
// rest of code...

But I don't see my message anywhere. Is there something else I have to configure, or somewhere else I have to look?

180
181
182
5
ASP.NET Core Best Practices (learn.microsoft.com)
submitted 9 months ago by lysdexic to c/dotnet
183
184
9
2023 .NET Survey (www.surveymonkey.com)
submitted 10 months ago by starman to c/dotnet
185
186
4
submitted 10 months ago by mac to c/dotnet
187
4
submitted 10 months ago by mac to c/dotnet
188
189
190
191
 
 

cross-posted from: https://dotnet.social/users/SmartmanApps/statuses/111530527801763293

MAUI dev experience on Windows 11 vs. Windows 10
@dotnetmaui
I'm taking delivery of a new dev machine in the next day or two, and the new one is Windows 11 compatible, so I have the option there to install Win11, but I also have the option of sticking with Win10 for a while. The only thing that really stands out to me with 11 is WSL, which is "nice but not necessary".

For those #dotNetMAUI devs who have developed on both, have you found Win11 to be better? Worse? About the same?
#dotNet

192
3
submitted 10 months ago* (last edited 10 months ago) by BotticelliBots to c/dotnet
 
 

Chatbots are becoming increasingly popular due to their ability to provide instant and efficient interaction with users, automate customer service processes, and deliver personalized content. The progress of artificial intelligence and machine learning has become the reason for more functional and smarter bots. Bots find their application in the fields of messengers, commerce, education, and healthcare providing users with convenience and service accessibility. The ability of chatbots to promptly respond to queries, provide information, and even perform specific tasks makes them not only a modern trend but also a crucial element in the business's customer interaction strategy.

Bot builders provide convenient tools for creating chatbots without the need for deep programming knowledge. However, their functionality is often limited by templates and restricted options. Manual bot coding becomes necessary when developing more complex and individualized solutions. This allows for complete customization of the bot's behavior, integration of specific functions, and the provision of a unique interaction experience. Such an approach requires deeper technical skills but ensures a more flexible and personalized result, which is particularly important in fields where a high degree of customization is required.

It is essential to carefully consider the ability to work with different messengers developing bots. The diversity in the messenger world is vast, ranging from WhatsApp, Telegram, and Facebook Messenger to VK, Signal, and WeChat. Despite the popularity of Telegram, in some countries, it may be blocked. This forces adaptation to local messengers, such as WeChat in China. This geographic variability emphasizes the importance of supporting various platforms.

We have developed the Botticelli framework, which can simplify the process of creating bots by ensuring compatibility with a wide range of messengers. Botticelli is an open-source .NET Core framework for building universal bots with integration for databases, message brokers, speech engines, and artificial intelligence (such as GPT-j and ChatGPT).

Our goal is to standardize the bot creation process for various platforms. BotticelliBots ensures compatibility with diverse messengers, social networks, and other communication channels. Using this platform, developers can create and manage bots in a unified interface, significantly simplifying the development and maintenance processes. BotticelliBots aims to provide a unified and user-friendly bot management process, contributing to increased efficiency and reduced complexity in deploying chatbots across different environments and platforms.

The key advantages of BotticelliBots include:

  • сross-platform support;
    
  • high reliability;
    
  • ease of usage (a guide to a quick start);
    
  • ease of deployment;
    
  • convenient database integration;
    
  • ease of implementing artificial intelligence ChatGPT, GPT-j (Botticelli.AI);
    
  • ease of interaction with speech synthesizers (Botticelli.Talks);
    
  • convenient integration with message brokers for highly loaded systems (Botticelli.Bus);
    
  • task planning convenience (Botticelli.Scheduler).
    

BotticelliBots is a highly flexible platform that not only enables the creation and management of bots, but also integration with advanced technologies such as GPT-j and ChatGPT. This unique capability allows the use of powerful text generation models for more intelligent and diverse bot responses. Additionally, BotticelliBots supports integration with speech synthesizers, expanding the spectrum of interaction with the bot by adding audio capabilities. This enables the creation of more natural and engaging chatbots capable of processing text queries and also providing information in audio format, enhancing the quality of their communication.

For interaction with external APIs, you can use the bus (Botticelli.Bus), and there is integration with RabbitMQ. You can see the interaction scheme here.

We are currently actively working on expanding functionality. One of the key directions of development is increasing the number of supported messengers. The integration with platforms such as Facebook and WeChat is planned in the near future.

In addition, we are also focused on expanding integration capabilities with cutting-edge artificial intelligence solutions, such as ChatGPT and GPT-j. This opens up new horizons for creating more intelligent, adaptive, and contextually oriented chatbots. Developing synergy with such solutions will enhance the quality of user interaction with bots and allow to provide more personalized content.

The BotticelliBots team follows a strategy of continuous development and innovation to create more intelligent and flexible solutions that meet the needs in the field of chatbots.

Website: http://botticellibots.com/ Telegram Channel: https://t.me/botticelli_bots Email: [email protected]

193
5
submitted 10 months ago by starman to c/dotnet
 
 
194
3
submitted 10 months ago* (last edited 10 months ago) by starman to c/dotnet
195
196
 
 

cross-posted from: https://programming.dev/post/6722007

I had cause to mention this to someone today, and thought I would share this here for anyone who may not have seen it before and would be interested in this info - Creating MAUI UI's in C#

197
198
199
200
view more: ‹ prev next ›