AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 28.06.2009, 03:06   #1  
Blog bot is offline
Blog bot
Участник
 
25,607 / 848 (80) +++++++
Регистрация: 28.10.2006
C# and AX Development: AOS crashed due corrupted node in the AOT
Источник: http://olondono.blogspot.com/2009/06...de-in-aot.html
==============

Warning: this post is only informative, do not try to replicate the problem described here in a production environment. !!!!

The problem:

The problem occurred when we created a 'View' with one circular reference. (wow!), after that, every time we tried to click over "Data Dictionary\Tables" or "Data Dictionary\Views", the AOS crashes (snif, snif).

How to reproduce the problem:

Warning: this post is only informative, do not try to replicate the problem described here in a production environment. !!!!

0. Make a backup. Also, make a copy of the AxCus.AOD file.
1. Create a simple view (ex. View1).
2. Add a new DataSource manually. Then, open DataSource's properties dialog and specify in the table field the name of the view you have created (ex. View1).
3. STOP at this point if you dont want to crash the AOS !!!.
4. Expand the DataSource node. Drag the field CreatedBy to the view's fields. It will created the CreatedBy1 field.
5. Save it if you are sure you want to continue. After this action, your AOS will crash. (oops !)

You can try to recover the error by deleting the corrupted node (ex. View1 or CreatedBy1 field) using this method: How to delete AOT objects (AX/Axapta) or this one: How to delete AOT nodes by code (UtilIdElements solution). None of them will work!!! (snif).

The solution:

After several tries, the only solution was open the AxCus.AOD file in a binary editor (Visual Studio is enough) and perform the next steps.

Warning: Serious problems might occur if you modify the AxCus.AOD file using this or another method. Modify system files at your own risk.

0. Make a backup. Also, make a copy of the AxCus.AOD file.
1. Stop the AOS and open the AxCus.AOD in a binary editor.
2. Locate the "CreatedBy1" field data (or your corrupted node's name). Normally, it should be near to the end of the file. (Look at pictures for details).
3. Change the reference data. It is above the field's name. Put the value FF FF (65,535) in the parent and field ids.
4. Save the file.
5. Delete the index file axapd.aoi.
6. Start the AOS again.
7. Delete the corrupted view.

Image with the corrupted node:



Image with the fixed node:



It is probable the corrupted node stays alive in the AOT, so you can try the following code to remove it:

static void Job1(Args _args) { UtilIdElements utilElement; ; ttsbegin; select utilElement where utilElement.id == 65535; // Invalid ID we have writed in the AxCus.AOD file if (utilelement) { utilElement.delete(); ttscommit; info('Record should be deleted now.'); } else { ttsAbort; info('Could not delete record, or it was not found.'); } }




Источник: http://olondono.blogspot.com/2009/06...de-in-aot.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
За это сообщение автора поблагодарили: kashperuk (5), Logger (1), alex55 (1).
Теги
view, баг, ошибка, падает, aos, представления (view)

 


Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 09:17.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.